/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
"use strict";

var $protobuf = require("protobufjs/minimal");

// Common aliases
var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;

// Exported root namespace
var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});

$root.type = (function() {

    /**
     * Namespace type.
     * @exports type
     * @namespace
     */
    var type = {};

    type.googleapis = (function() {

        /**
         * Namespace googleapis.
         * @memberof type
         * @namespace
         */
        var googleapis = {};

        googleapis.com = (function() {

            /**
             * Namespace com.
             * @memberof type.googleapis
             * @namespace
             */
            var com = {};

            com.FillsPbMsg = (function() {

                /**
                 * Namespace FillsPbMsg.
                 * @memberof type.googleapis.com
                 * @namespace
                 */
                var FillsPbMsg = {};

                FillsPbMsg.Response = (function() {

                    /**
                     * Properties of a Response.
                     * @memberof type.googleapis.com.FillsPbMsg
                     * @interface IResponse
                     * @property {string|null} [biz] Response biz
                     * @property {string|null} [type] Response type
                     * @property {string|null} [base] Response base
                     * @property {string|null} [quote] Response quote
                     * @property {string|null} [contractcode] Response contractcode
                     * @property {string|null} [granularity] Response granularity
                     * @property {type.googleapis.com.FillsPbMsg.IData|null} [data] Response data
                     * @property {number|null} [env] Response env
                     */

                    /**
                     * Constructs a new Response.
                     * @memberof type.googleapis.com.FillsPbMsg
                     * @classdesc Represents a Response.
                     * @implements IResponse
                     * @constructor
                     * @param {type.googleapis.com.FillsPbMsg.IResponse=} [properties] Properties to set
                     */
                    function Response(properties) {
                        if (properties)
                            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                if (properties[keys[i]] != null)
                                    this[keys[i]] = properties[keys[i]];
                    }

                    /**
                     * Response biz.
                     * @member {string} biz
                     * @memberof type.googleapis.com.FillsPbMsg.Response
                     * @instance
                     */
                    Response.prototype.biz = "";

                    /**
                     * Response type.
                     * @member {string} type
                     * @memberof type.googleapis.com.FillsPbMsg.Response
                     * @instance
                     */
                    Response.prototype.type = "";

                    /**
                     * Response base.
                     * @member {string} base
                     * @memberof type.googleapis.com.FillsPbMsg.Response
                     * @instance
                     */
                    Response.prototype.base = "";

                    /**
                     * Response quote.
                     * @member {string} quote
                     * @memberof type.googleapis.com.FillsPbMsg.Response
                     * @instance
                     */
                    Response.prototype.quote = "";

                    /**
                     * Response contractcode.
                     * @member {string} contractcode
                     * @memberof type.googleapis.com.FillsPbMsg.Response
                     * @instance
                     */
                    Response.prototype.contractcode = "";

                    /**
                     * Response granularity.
                     * @member {string} granularity
                     * @memberof type.googleapis.com.FillsPbMsg.Response
                     * @instance
                     */
                    Response.prototype.granularity = "";

                    /**
                     * Response data.
                     * @member {type.googleapis.com.FillsPbMsg.IData|null|undefined} data
                     * @memberof type.googleapis.com.FillsPbMsg.Response
                     * @instance
                     */
                    Response.prototype.data = null;

                    /**
                     * Response env.
                     * @member {number} env
                     * @memberof type.googleapis.com.FillsPbMsg.Response
                     * @instance
                     */
                    Response.prototype.env = 0;

                    /**
                     * Creates a new Response instance using the specified properties.
                     * @function create
                     * @memberof type.googleapis.com.FillsPbMsg.Response
                     * @static
                     * @param {type.googleapis.com.FillsPbMsg.IResponse=} [properties] Properties to set
                     * @returns {type.googleapis.com.FillsPbMsg.Response} Response instance
                     */
                    Response.create = function create(properties) {
                        return new Response(properties);
                    };

                    /**
                     * Encodes the specified Response message. Does not implicitly {@link type.googleapis.com.FillsPbMsg.Response.verify|verify} messages.
                     * @function encode
                     * @memberof type.googleapis.com.FillsPbMsg.Response
                     * @static
                     * @param {type.googleapis.com.FillsPbMsg.IResponse} message Response message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    Response.encode = function encode(message, writer) {
                        if (!writer)
                            writer = $Writer.create();
                        if (message.biz != null && Object.hasOwnProperty.call(message, "biz"))
                            writer.uint32(/* id 1, wireType 2 =*/10).string(message.biz);
                        if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                            writer.uint32(/* id 2, wireType 2 =*/18).string(message.type);
                        if (message.base != null && Object.hasOwnProperty.call(message, "base"))
                            writer.uint32(/* id 3, wireType 2 =*/26).string(message.base);
                        if (message.quote != null && Object.hasOwnProperty.call(message, "quote"))
                            writer.uint32(/* id 4, wireType 2 =*/34).string(message.quote);
                        if (message.contractcode != null && Object.hasOwnProperty.call(message, "contractcode"))
                            writer.uint32(/* id 5, wireType 2 =*/42).string(message.contractcode);
                        if (message.granularity != null && Object.hasOwnProperty.call(message, "granularity"))
                            writer.uint32(/* id 6, wireType 2 =*/50).string(message.granularity);
                        if (message.data != null && Object.hasOwnProperty.call(message, "data"))
                            $root.type.googleapis.com.FillsPbMsg.Data.encode(message.data, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
                        if (message.env != null && Object.hasOwnProperty.call(message, "env"))
                            writer.uint32(/* id 8, wireType 0 =*/64).int32(message.env);
                        return writer;
                    };

                    /**
                     * Encodes the specified Response message, length delimited. Does not implicitly {@link type.googleapis.com.FillsPbMsg.Response.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof type.googleapis.com.FillsPbMsg.Response
                     * @static
                     * @param {type.googleapis.com.FillsPbMsg.IResponse} message Response message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    Response.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a Response message from the specified reader or buffer.
                     * @function decode
                     * @memberof type.googleapis.com.FillsPbMsg.Response
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @param {number} [length] Message length if known beforehand
                     * @returns {type.googleapis.com.FillsPbMsg.Response} Response
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    Response.decode = function decode(reader, length) {
                        if (!(reader instanceof $Reader))
                            reader = $Reader.create(reader);
                        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.type.googleapis.com.FillsPbMsg.Response();
                        while (reader.pos < end) {
                            var tag = reader.uint32();
                            switch (tag >>> 3) {
                            case 1: {
                                    message.biz = reader.string();
                                    break;
                                }
                            case 2: {
                                    message.type = reader.string();
                                    break;
                                }
                            case 3: {
                                    message.base = reader.string();
                                    break;
                                }
                            case 4: {
                                    message.quote = reader.string();
                                    break;
                                }
                            case 5: {
                                    message.contractcode = reader.string();
                                    break;
                                }
                            case 6: {
                                    message.granularity = reader.string();
                                    break;
                                }
                            case 7: {
                                    message.data = $root.type.googleapis.com.FillsPbMsg.Data.decode(reader, reader.uint32());
                                    break;
                                }
                            case 8: {
                                    message.env = reader.int32();
                                    break;
                                }
                            default:
                                reader.skipType(tag & 7);
                                break;
                            }
                        }
                        return message;
                    };

                    /**
                     * Decodes a Response message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof type.googleapis.com.FillsPbMsg.Response
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {type.googleapis.com.FillsPbMsg.Response} Response
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    Response.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a Response message.
                     * @function verify
                     * @memberof type.googleapis.com.FillsPbMsg.Response
                     * @static
                     * @param {Object.<string,*>} message Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    Response.verify = function verify(message) {
                        if (typeof message !== "object" || message === null)
                            return "object expected";
                        if (message.biz != null && message.hasOwnProperty("biz"))
                            if (!$util.isString(message.biz))
                                return "biz: string expected";
                        if (message.type != null && message.hasOwnProperty("type"))
                            if (!$util.isString(message.type))
                                return "type: string expected";
                        if (message.base != null && message.hasOwnProperty("base"))
                            if (!$util.isString(message.base))
                                return "base: string expected";
                        if (message.quote != null && message.hasOwnProperty("quote"))
                            if (!$util.isString(message.quote))
                                return "quote: string expected";
                        if (message.contractcode != null && message.hasOwnProperty("contractcode"))
                            if (!$util.isString(message.contractcode))
                                return "contractcode: string expected";
                        if (message.granularity != null && message.hasOwnProperty("granularity"))
                            if (!$util.isString(message.granularity))
                                return "granularity: string expected";
                        if (message.data != null && message.hasOwnProperty("data")) {
                            var error = $root.type.googleapis.com.FillsPbMsg.Data.verify(message.data);
                            if (error)
                                return "data." + error;
                        }
                        if (message.env != null && message.hasOwnProperty("env"))
                            if (!$util.isInteger(message.env))
                                return "env: integer expected";
                        return null;
                    };

                    /**
                     * Creates a Response message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof type.googleapis.com.FillsPbMsg.Response
                     * @static
                     * @param {Object.<string,*>} object Plain object
                     * @returns {type.googleapis.com.FillsPbMsg.Response} Response
                     */
                    Response.fromObject = function fromObject(object) {
                        if (object instanceof $root.type.googleapis.com.FillsPbMsg.Response)
                            return object;
                        var message = new $root.type.googleapis.com.FillsPbMsg.Response();
                        if (object.biz != null)
                            message.biz = String(object.biz);
                        if (object.type != null)
                            message.type = String(object.type);
                        if (object.base != null)
                            message.base = String(object.base);
                        if (object.quote != null)
                            message.quote = String(object.quote);
                        if (object.contractcode != null)
                            message.contractcode = String(object.contractcode);
                        if (object.granularity != null)
                            message.granularity = String(object.granularity);
                        if (object.data != null) {
                            if (typeof object.data !== "object")
                                throw TypeError(".type.googleapis.com.FillsPbMsg.Response.data: object expected");
                            message.data = $root.type.googleapis.com.FillsPbMsg.Data.fromObject(object.data);
                        }
                        if (object.env != null)
                            message.env = object.env | 0;
                        return message;
                    };

                    /**
                     * Creates a plain object from a Response message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof type.googleapis.com.FillsPbMsg.Response
                     * @static
                     * @param {type.googleapis.com.FillsPbMsg.Response} message Response
                     * @param {$protobuf.IConversionOptions} [options] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    Response.toObject = function toObject(message, options) {
                        if (!options)
                            options = {};
                        var object = {};
                        if (options.defaults) {
                            object.biz = "";
                            object.type = "";
                            object.base = "";
                            object.quote = "";
                            object.contractcode = "";
                            object.granularity = "";
                            object.data = null;
                            object.env = 0;
                        }
                        if (message.biz != null && message.hasOwnProperty("biz"))
                            object.biz = message.biz;
                        if (message.type != null && message.hasOwnProperty("type"))
                            object.type = message.type;
                        if (message.base != null && message.hasOwnProperty("base"))
                            object.base = message.base;
                        if (message.quote != null && message.hasOwnProperty("quote"))
                            object.quote = message.quote;
                        if (message.contractcode != null && message.hasOwnProperty("contractcode"))
                            object.contractcode = message.contractcode;
                        if (message.granularity != null && message.hasOwnProperty("granularity"))
                            object.granularity = message.granularity;
                        if (message.data != null && message.hasOwnProperty("data"))
                            object.data = $root.type.googleapis.com.FillsPbMsg.Data.toObject(message.data, options);
                        if (message.env != null && message.hasOwnProperty("env"))
                            object.env = message.env;
                        return object;
                    };

                    /**
                     * Converts this Response to JSON.
                     * @function toJSON
                     * @memberof type.googleapis.com.FillsPbMsg.Response
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    Response.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                    };

                    /**
                     * Gets the default type url for Response
                     * @function getTypeUrl
                     * @memberof type.googleapis.com.FillsPbMsg.Response
                     * @static
                     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                     * @returns {string} The default type url
                     */
                    Response.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                        if (typeUrlPrefix === undefined) {
                            typeUrlPrefix = "type.googleapis.com";
                        }
                        return typeUrlPrefix + "/type.googleapis.com.FillsPbMsg.Response";
                    };

                    return Response;
                })();

                FillsPbMsg.Data = (function() {

                    /**
                     * Properties of a Data.
                     * @memberof type.googleapis.com.FillsPbMsg
                     * @interface IData
                     * @property {Array.<type.googleapis.com.FillsPbMsg.IBody>|null} [fills] Data fills
                     */

                    /**
                     * Constructs a new Data.
                     * @memberof type.googleapis.com.FillsPbMsg
                     * @classdesc Represents a Data.
                     * @implements IData
                     * @constructor
                     * @param {type.googleapis.com.FillsPbMsg.IData=} [properties] Properties to set
                     */
                    function Data(properties) {
                        this.fills = [];
                        if (properties)
                            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                if (properties[keys[i]] != null)
                                    this[keys[i]] = properties[keys[i]];
                    }

                    /**
                     * Data fills.
                     * @member {Array.<type.googleapis.com.FillsPbMsg.IBody>} fills
                     * @memberof type.googleapis.com.FillsPbMsg.Data
                     * @instance
                     */
                    Data.prototype.fills = $util.emptyArray;

                    /**
                     * Creates a new Data instance using the specified properties.
                     * @function create
                     * @memberof type.googleapis.com.FillsPbMsg.Data
                     * @static
                     * @param {type.googleapis.com.FillsPbMsg.IData=} [properties] Properties to set
                     * @returns {type.googleapis.com.FillsPbMsg.Data} Data instance
                     */
                    Data.create = function create(properties) {
                        return new Data(properties);
                    };

                    /**
                     * Encodes the specified Data message. Does not implicitly {@link type.googleapis.com.FillsPbMsg.Data.verify|verify} messages.
                     * @function encode
                     * @memberof type.googleapis.com.FillsPbMsg.Data
                     * @static
                     * @param {type.googleapis.com.FillsPbMsg.IData} message Data message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    Data.encode = function encode(message, writer) {
                        if (!writer)
                            writer = $Writer.create();
                        if (message.fills != null && message.fills.length)
                            for (var i = 0; i < message.fills.length; ++i)
                                $root.type.googleapis.com.FillsPbMsg.Body.encode(message.fills[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                        return writer;
                    };

                    /**
                     * Encodes the specified Data message, length delimited. Does not implicitly {@link type.googleapis.com.FillsPbMsg.Data.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof type.googleapis.com.FillsPbMsg.Data
                     * @static
                     * @param {type.googleapis.com.FillsPbMsg.IData} message Data message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    Data.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a Data message from the specified reader or buffer.
                     * @function decode
                     * @memberof type.googleapis.com.FillsPbMsg.Data
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @param {number} [length] Message length if known beforehand
                     * @returns {type.googleapis.com.FillsPbMsg.Data} Data
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    Data.decode = function decode(reader, length) {
                        if (!(reader instanceof $Reader))
                            reader = $Reader.create(reader);
                        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.type.googleapis.com.FillsPbMsg.Data();
                        while (reader.pos < end) {
                            var tag = reader.uint32();
                            switch (tag >>> 3) {
                            case 1: {
                                    if (!(message.fills && message.fills.length))
                                        message.fills = [];
                                    message.fills.push($root.type.googleapis.com.FillsPbMsg.Body.decode(reader, reader.uint32()));
                                    break;
                                }
                            default:
                                reader.skipType(tag & 7);
                                break;
                            }
                        }
                        return message;
                    };

                    /**
                     * Decodes a Data message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof type.googleapis.com.FillsPbMsg.Data
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {type.googleapis.com.FillsPbMsg.Data} Data
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    Data.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a Data message.
                     * @function verify
                     * @memberof type.googleapis.com.FillsPbMsg.Data
                     * @static
                     * @param {Object.<string,*>} message Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    Data.verify = function verify(message) {
                        if (typeof message !== "object" || message === null)
                            return "object expected";
                        if (message.fills != null && message.hasOwnProperty("fills")) {
                            if (!Array.isArray(message.fills))
                                return "fills: array expected";
                            for (var i = 0; i < message.fills.length; ++i) {
                                var error = $root.type.googleapis.com.FillsPbMsg.Body.verify(message.fills[i]);
                                if (error)
                                    return "fills." + error;
                            }
                        }
                        return null;
                    };

                    /**
                     * Creates a Data message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof type.googleapis.com.FillsPbMsg.Data
                     * @static
                     * @param {Object.<string,*>} object Plain object
                     * @returns {type.googleapis.com.FillsPbMsg.Data} Data
                     */
                    Data.fromObject = function fromObject(object) {
                        if (object instanceof $root.type.googleapis.com.FillsPbMsg.Data)
                            return object;
                        var message = new $root.type.googleapis.com.FillsPbMsg.Data();
                        if (object.fills) {
                            if (!Array.isArray(object.fills))
                                throw TypeError(".type.googleapis.com.FillsPbMsg.Data.fills: array expected");
                            message.fills = [];
                            for (var i = 0; i < object.fills.length; ++i) {
                                if (typeof object.fills[i] !== "object")
                                    throw TypeError(".type.googleapis.com.FillsPbMsg.Data.fills: object expected");
                                message.fills[i] = $root.type.googleapis.com.FillsPbMsg.Body.fromObject(object.fills[i]);
                            }
                        }
                        return message;
                    };

                    /**
                     * Creates a plain object from a Data message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof type.googleapis.com.FillsPbMsg.Data
                     * @static
                     * @param {type.googleapis.com.FillsPbMsg.Data} message Data
                     * @param {$protobuf.IConversionOptions} [options] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    Data.toObject = function toObject(message, options) {
                        if (!options)
                            options = {};
                        var object = {};
                        if (options.arrays || options.defaults)
                            object.fills = [];
                        if (message.fills && message.fills.length) {
                            object.fills = [];
                            for (var j = 0; j < message.fills.length; ++j)
                                object.fills[j] = $root.type.googleapis.com.FillsPbMsg.Body.toObject(message.fills[j], options);
                        }
                        return object;
                    };

                    /**
                     * Converts this Data to JSON.
                     * @function toJSON
                     * @memberof type.googleapis.com.FillsPbMsg.Data
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    Data.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                    };

                    /**
                     * Gets the default type url for Data
                     * @function getTypeUrl
                     * @memberof type.googleapis.com.FillsPbMsg.Data
                     * @static
                     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                     * @returns {string} The default type url
                     */
                    Data.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                        if (typeUrlPrefix === undefined) {
                            typeUrlPrefix = "type.googleapis.com";
                        }
                        return typeUrlPrefix + "/type.googleapis.com.FillsPbMsg.Data";
                    };

                    return Data;
                })();

                FillsPbMsg.Body = (function() {

                    /**
                     * Properties of a Body.
                     * @memberof type.googleapis.com.FillsPbMsg
                     * @interface IBody
                     * @property {string|null} [price] Body price
                     * @property {string|null} [amount] Body amount
                     * @property {string|null} [side] Body side
                     * @property {number|Long|null} [createddate] Body createddate
                     * @property {number|Long|null} [id] Body id
                     */

                    /**
                     * Constructs a new Body.
                     * @memberof type.googleapis.com.FillsPbMsg
                     * @classdesc Represents a Body.
                     * @implements IBody
                     * @constructor
                     * @param {type.googleapis.com.FillsPbMsg.IBody=} [properties] Properties to set
                     */
                    function Body(properties) {
                        if (properties)
                            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                if (properties[keys[i]] != null)
                                    this[keys[i]] = properties[keys[i]];
                    }

                    /**
                     * Body price.
                     * @member {string} price
                     * @memberof type.googleapis.com.FillsPbMsg.Body
                     * @instance
                     */
                    Body.prototype.price = "";

                    /**
                     * Body amount.
                     * @member {string} amount
                     * @memberof type.googleapis.com.FillsPbMsg.Body
                     * @instance
                     */
                    Body.prototype.amount = "";

                    /**
                     * Body side.
                     * @member {string} side
                     * @memberof type.googleapis.com.FillsPbMsg.Body
                     * @instance
                     */
                    Body.prototype.side = "";

                    /**
                     * Body createddate.
                     * @member {number|Long} createddate
                     * @memberof type.googleapis.com.FillsPbMsg.Body
                     * @instance
                     */
                    Body.prototype.createddate = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                    /**
                     * Body id.
                     * @member {number|Long} id
                     * @memberof type.googleapis.com.FillsPbMsg.Body
                     * @instance
                     */
                    Body.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                    /**
                     * Creates a new Body instance using the specified properties.
                     * @function create
                     * @memberof type.googleapis.com.FillsPbMsg.Body
                     * @static
                     * @param {type.googleapis.com.FillsPbMsg.IBody=} [properties] Properties to set
                     * @returns {type.googleapis.com.FillsPbMsg.Body} Body instance
                     */
                    Body.create = function create(properties) {
                        return new Body(properties);
                    };

                    /**
                     * Encodes the specified Body message. Does not implicitly {@link type.googleapis.com.FillsPbMsg.Body.verify|verify} messages.
                     * @function encode
                     * @memberof type.googleapis.com.FillsPbMsg.Body
                     * @static
                     * @param {type.googleapis.com.FillsPbMsg.IBody} message Body message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    Body.encode = function encode(message, writer) {
                        if (!writer)
                            writer = $Writer.create();
                        if (message.price != null && Object.hasOwnProperty.call(message, "price"))
                            writer.uint32(/* id 1, wireType 2 =*/10).string(message.price);
                        if (message.amount != null && Object.hasOwnProperty.call(message, "amount"))
                            writer.uint32(/* id 2, wireType 2 =*/18).string(message.amount);
                        if (message.side != null && Object.hasOwnProperty.call(message, "side"))
                            writer.uint32(/* id 3, wireType 2 =*/26).string(message.side);
                        if (message.createddate != null && Object.hasOwnProperty.call(message, "createddate"))
                            writer.uint32(/* id 4, wireType 0 =*/32).int64(message.createddate);
                        if (message.id != null && Object.hasOwnProperty.call(message, "id"))
                            writer.uint32(/* id 5, wireType 0 =*/40).int64(message.id);
                        return writer;
                    };

                    /**
                     * Encodes the specified Body message, length delimited. Does not implicitly {@link type.googleapis.com.FillsPbMsg.Body.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof type.googleapis.com.FillsPbMsg.Body
                     * @static
                     * @param {type.googleapis.com.FillsPbMsg.IBody} message Body message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    Body.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a Body message from the specified reader or buffer.
                     * @function decode
                     * @memberof type.googleapis.com.FillsPbMsg.Body
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @param {number} [length] Message length if known beforehand
                     * @returns {type.googleapis.com.FillsPbMsg.Body} Body
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    Body.decode = function decode(reader, length) {
                        if (!(reader instanceof $Reader))
                            reader = $Reader.create(reader);
                        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.type.googleapis.com.FillsPbMsg.Body();
                        while (reader.pos < end) {
                            var tag = reader.uint32();
                            switch (tag >>> 3) {
                            case 1: {
                                    message.price = reader.string();
                                    break;
                                }
                            case 2: {
                                    message.amount = reader.string();
                                    break;
                                }
                            case 3: {
                                    message.side = reader.string();
                                    break;
                                }
                            case 4: {
                                    message.createddate = reader.int64();
                                    break;
                                }
                            case 5: {
                                    message.id = reader.int64();
                                    break;
                                }
                            default:
                                reader.skipType(tag & 7);
                                break;
                            }
                        }
                        return message;
                    };

                    /**
                     * Decodes a Body message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof type.googleapis.com.FillsPbMsg.Body
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {type.googleapis.com.FillsPbMsg.Body} Body
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    Body.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a Body message.
                     * @function verify
                     * @memberof type.googleapis.com.FillsPbMsg.Body
                     * @static
                     * @param {Object.<string,*>} message Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    Body.verify = function verify(message) {
                        if (typeof message !== "object" || message === null)
                            return "object expected";
                        if (message.price != null && message.hasOwnProperty("price"))
                            if (!$util.isString(message.price))
                                return "price: string expected";
                        if (message.amount != null && message.hasOwnProperty("amount"))
                            if (!$util.isString(message.amount))
                                return "amount: string expected";
                        if (message.side != null && message.hasOwnProperty("side"))
                            if (!$util.isString(message.side))
                                return "side: string expected";
                        if (message.createddate != null && message.hasOwnProperty("createddate"))
                            if (!$util.isInteger(message.createddate) && !(message.createddate && $util.isInteger(message.createddate.low) && $util.isInteger(message.createddate.high)))
                                return "createddate: integer|Long expected";
                        if (message.id != null && message.hasOwnProperty("id"))
                            if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high)))
                                return "id: integer|Long expected";
                        return null;
                    };

                    /**
                     * Creates a Body message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof type.googleapis.com.FillsPbMsg.Body
                     * @static
                     * @param {Object.<string,*>} object Plain object
                     * @returns {type.googleapis.com.FillsPbMsg.Body} Body
                     */
                    Body.fromObject = function fromObject(object) {
                        if (object instanceof $root.type.googleapis.com.FillsPbMsg.Body)
                            return object;
                        var message = new $root.type.googleapis.com.FillsPbMsg.Body();
                        if (object.price != null)
                            message.price = String(object.price);
                        if (object.amount != null)
                            message.amount = String(object.amount);
                        if (object.side != null)
                            message.side = String(object.side);
                        if (object.createddate != null)
                            if ($util.Long)
                                (message.createddate = $util.Long.fromValue(object.createddate)).unsigned = false;
                            else if (typeof object.createddate === "string")
                                message.createddate = parseInt(object.createddate, 10);
                            else if (typeof object.createddate === "number")
                                message.createddate = object.createddate;
                            else if (typeof object.createddate === "object")
                                message.createddate = new $util.LongBits(object.createddate.low >>> 0, object.createddate.high >>> 0).toNumber();
                        if (object.id != null)
                            if ($util.Long)
                                (message.id = $util.Long.fromValue(object.id)).unsigned = false;
                            else if (typeof object.id === "string")
                                message.id = parseInt(object.id, 10);
                            else if (typeof object.id === "number")
                                message.id = object.id;
                            else if (typeof object.id === "object")
                                message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber();
                        return message;
                    };

                    /**
                     * Creates a plain object from a Body message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof type.googleapis.com.FillsPbMsg.Body
                     * @static
                     * @param {type.googleapis.com.FillsPbMsg.Body} message Body
                     * @param {$protobuf.IConversionOptions} [options] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    Body.toObject = function toObject(message, options) {
                        if (!options)
                            options = {};
                        var object = {};
                        if (options.defaults) {
                            object.price = "";
                            object.amount = "";
                            object.side = "";
                            if ($util.Long) {
                                var long = new $util.Long(0, 0, false);
                                object.createddate = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                            } else
                                object.createddate = options.longs === String ? "0" : 0;
                            if ($util.Long) {
                                var long = new $util.Long(0, 0, false);
                                object.id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                            } else
                                object.id = options.longs === String ? "0" : 0;
                        }
                        if (message.price != null && message.hasOwnProperty("price"))
                            object.price = message.price;
                        if (message.amount != null && message.hasOwnProperty("amount"))
                            object.amount = message.amount;
                        if (message.side != null && message.hasOwnProperty("side"))
                            object.side = message.side;
                        if (message.createddate != null && message.hasOwnProperty("createddate"))
                            if (typeof message.createddate === "number")
                                object.createddate = options.longs === String ? String(message.createddate) : message.createddate;
                            else
                                object.createddate = options.longs === String ? $util.Long.prototype.toString.call(message.createddate) : options.longs === Number ? new $util.LongBits(message.createddate.low >>> 0, message.createddate.high >>> 0).toNumber() : message.createddate;
                        if (message.id != null && message.hasOwnProperty("id"))
                            if (typeof message.id === "number")
                                object.id = options.longs === String ? String(message.id) : message.id;
                            else
                                object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber() : message.id;
                        return object;
                    };

                    /**
                     * Converts this Body to JSON.
                     * @function toJSON
                     * @memberof type.googleapis.com.FillsPbMsg.Body
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    Body.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                    };

                    /**
                     * Gets the default type url for Body
                     * @function getTypeUrl
                     * @memberof type.googleapis.com.FillsPbMsg.Body
                     * @static
                     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                     * @returns {string} The default type url
                     */
                    Body.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                        if (typeUrlPrefix === undefined) {
                            typeUrlPrefix = "type.googleapis.com";
                        }
                        return typeUrlPrefix + "/type.googleapis.com.FillsPbMsg.Body";
                    };

                    return Body;
                })();

                return FillsPbMsg;
            })();

            return com;
        })();

        return googleapis;
    })();

    return type;
})();

module.exports = $root;
