/*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.DepthPbMsg = (function() { /** * Namespace DepthPbMsg. * @memberof type.googleapis.com * @namespace */ var DepthPbMsg = {}; DepthPbMsg.Response = (function() { /** * Properties of a Response. * @memberof type.googleapis.com.DepthPbMsg * @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.DepthPbMsg.IData|null} [data] Response data * @property {number|null} [env] Response env */ /** * Constructs a new Response. * @memberof type.googleapis.com.DepthPbMsg * @classdesc Represents a Response. * @implements IResponse * @constructor * @param {type.googleapis.com.DepthPbMsg.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.DepthPbMsg.Response * @instance */ Response.prototype.biz = ""; /** * Response type. * @member {string} type * @memberof type.googleapis.com.DepthPbMsg.Response * @instance */ Response.prototype.type = ""; /** * Response base. * @member {string} base * @memberof type.googleapis.com.DepthPbMsg.Response * @instance */ Response.prototype.base = ""; /** * Response quote. * @member {string} quote * @memberof type.googleapis.com.DepthPbMsg.Response * @instance */ Response.prototype.quote = ""; /** * Response contractcode. * @member {string} contractcode * @memberof type.googleapis.com.DepthPbMsg.Response * @instance */ Response.prototype.contractcode = ""; /** * Response granularity. * @member {string} granularity * @memberof type.googleapis.com.DepthPbMsg.Response * @instance */ Response.prototype.granularity = ""; /** * Response data. * @member {type.googleapis.com.DepthPbMsg.IData|null|undefined} data * @memberof type.googleapis.com.DepthPbMsg.Response * @instance */ Response.prototype.data = null; /** * Response env. * @member {number} env * @memberof type.googleapis.com.DepthPbMsg.Response * @instance */ Response.prototype.env = 0; /** * Creates a new Response instance using the specified properties. * @function create * @memberof type.googleapis.com.DepthPbMsg.Response * @static * @param {type.googleapis.com.DepthPbMsg.IResponse=} [properties] Properties to set * @returns {type.googleapis.com.DepthPbMsg.Response} Response instance */ Response.create = function create(properties) { return new Response(properties); }; /** * Encodes the specified Response message. Does not implicitly {@link type.googleapis.com.DepthPbMsg.Response.verify|verify} messages. * @function encode * @memberof type.googleapis.com.DepthPbMsg.Response * @static * @param {type.googleapis.com.DepthPbMsg.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.DepthPbMsg.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.DepthPbMsg.Response.verify|verify} messages. * @function encodeDelimited * @memberof type.googleapis.com.DepthPbMsg.Response * @static * @param {type.googleapis.com.DepthPbMsg.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.DepthPbMsg.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.DepthPbMsg.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.DepthPbMsg.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.DepthPbMsg.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.DepthPbMsg.Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {type.googleapis.com.DepthPbMsg.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.DepthPbMsg.Response * @static * @param {Object.} 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.DepthPbMsg.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.DepthPbMsg.Response * @static * @param {Object.} object Plain object * @returns {type.googleapis.com.DepthPbMsg.Response} Response */ Response.fromObject = function fromObject(object) { if (object instanceof $root.type.googleapis.com.DepthPbMsg.Response) return object; var message = new $root.type.googleapis.com.DepthPbMsg.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.DepthPbMsg.Response.data: object expected"); message.data = $root.type.googleapis.com.DepthPbMsg.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.DepthPbMsg.Response * @static * @param {type.googleapis.com.DepthPbMsg.Response} message Response * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} 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.DepthPbMsg.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.DepthPbMsg.Response * @instance * @returns {Object.} 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.DepthPbMsg.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.DepthPbMsg.Response"; }; return Response; })(); DepthPbMsg.Data = (function() { /** * Properties of a Data. * @memberof type.googleapis.com.DepthPbMsg * @interface IData * @property {string|null} [typeUrl] Data typeUrl * @property {type.googleapis.com.DepthPbMsg.IDepthPbMsg|null} [value] Data value */ /** * Constructs a new Data. * @memberof type.googleapis.com.DepthPbMsg * @classdesc Represents a Data. * @implements IData * @constructor * @param {type.googleapis.com.DepthPbMsg.IData=} [properties] Properties to set */ function Data(properties) { if (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 typeUrl. * @member {string} typeUrl * @memberof type.googleapis.com.DepthPbMsg.Data * @instance */ Data.prototype.typeUrl = ""; /** * Data value. * @member {type.googleapis.com.DepthPbMsg.IDepthPbMsg|null|undefined} value * @memberof type.googleapis.com.DepthPbMsg.Data * @instance */ Data.prototype.value = null; /** * Creates a new Data instance using the specified properties. * @function create * @memberof type.googleapis.com.DepthPbMsg.Data * @static * @param {type.googleapis.com.DepthPbMsg.IData=} [properties] Properties to set * @returns {type.googleapis.com.DepthPbMsg.Data} Data instance */ Data.create = function create(properties) { return new Data(properties); }; /** * Encodes the specified Data message. Does not implicitly {@link type.googleapis.com.DepthPbMsg.Data.verify|verify} messages. * @function encode * @memberof type.googleapis.com.DepthPbMsg.Data * @static * @param {type.googleapis.com.DepthPbMsg.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.typeUrl != null && Object.hasOwnProperty.call(message, "typeUrl")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.typeUrl); if (message.value != null && Object.hasOwnProperty.call(message, "value")) $root.type.googleapis.com.DepthPbMsg.DepthPbMsg.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified Data message, length delimited. Does not implicitly {@link type.googleapis.com.DepthPbMsg.Data.verify|verify} messages. * @function encodeDelimited * @memberof type.googleapis.com.DepthPbMsg.Data * @static * @param {type.googleapis.com.DepthPbMsg.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.DepthPbMsg.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.DepthPbMsg.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.DepthPbMsg.Data(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.typeUrl = reader.string(); break; } case 2: { message.value = $root.type.googleapis.com.DepthPbMsg.DepthPbMsg.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.DepthPbMsg.Data * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {type.googleapis.com.DepthPbMsg.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.DepthPbMsg.Data * @static * @param {Object.} 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.typeUrl != null && message.hasOwnProperty("typeUrl")) if (!$util.isString(message.typeUrl)) return "typeUrl: string expected"; if (message.value != null && message.hasOwnProperty("value")) { var error = $root.type.googleapis.com.DepthPbMsg.DepthPbMsg.verify(message.value); if (error) return "value." + 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.DepthPbMsg.Data * @static * @param {Object.} object Plain object * @returns {type.googleapis.com.DepthPbMsg.Data} Data */ Data.fromObject = function fromObject(object) { if (object instanceof $root.type.googleapis.com.DepthPbMsg.Data) return object; var message = new $root.type.googleapis.com.DepthPbMsg.Data(); if (object.typeUrl != null) message.typeUrl = String(object.typeUrl); if (object.value != null) { if (typeof object.value !== "object") throw TypeError(".type.googleapis.com.DepthPbMsg.Data.value: object expected"); message.value = $root.type.googleapis.com.DepthPbMsg.DepthPbMsg.fromObject(object.value); } return message; }; /** * Creates a plain object from a Data message. Also converts values to other types if specified. * @function toObject * @memberof type.googleapis.com.DepthPbMsg.Data * @static * @param {type.googleapis.com.DepthPbMsg.Data} message Data * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ Data.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.typeUrl = ""; object.value = null; } if (message.typeUrl != null && message.hasOwnProperty("typeUrl")) object.typeUrl = message.typeUrl; if (message.value != null && message.hasOwnProperty("value")) object.value = $root.type.googleapis.com.DepthPbMsg.DepthPbMsg.toObject(message.value, options); return object; }; /** * Converts this Data to JSON. * @function toJSON * @memberof type.googleapis.com.DepthPbMsg.Data * @instance * @returns {Object.} 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.DepthPbMsg.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.DepthPbMsg.Data"; }; return Data; })(); DepthPbMsg.DepthPbMsg = (function() { /** * Properties of a DepthPbMsg. * @memberof type.googleapis.com.DepthPbMsg * @interface IDepthPbMsg * @property {Array.|null} [asksList] DepthPbMsg asksList * @property {Array.|null} [bidsList] DepthPbMsg bidsList */ /** * Constructs a new DepthPbMsg. * @memberof type.googleapis.com.DepthPbMsg * @classdesc Represents a DepthPbMsg. * @implements IDepthPbMsg * @constructor * @param {type.googleapis.com.DepthPbMsg.IDepthPbMsg=} [properties] Properties to set */ function DepthPbMsg(properties) { this.asksList = []; this.bidsList = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * DepthPbMsg asksList. * @member {Array.} asksList * @memberof type.googleapis.com.DepthPbMsg.DepthPbMsg * @instance */ DepthPbMsg.prototype.asksList = $util.emptyArray; /** * DepthPbMsg bidsList. * @member {Array.} bidsList * @memberof type.googleapis.com.DepthPbMsg.DepthPbMsg * @instance */ DepthPbMsg.prototype.bidsList = $util.emptyArray; /** * Creates a new DepthPbMsg instance using the specified properties. * @function create * @memberof type.googleapis.com.DepthPbMsg.DepthPbMsg * @static * @param {type.googleapis.com.DepthPbMsg.IDepthPbMsg=} [properties] Properties to set * @returns {type.googleapis.com.DepthPbMsg.DepthPbMsg} DepthPbMsg instance */ DepthPbMsg.create = function create(properties) { return new DepthPbMsg(properties); }; /** * Encodes the specified DepthPbMsg message. Does not implicitly {@link type.googleapis.com.DepthPbMsg.DepthPbMsg.verify|verify} messages. * @function encode * @memberof type.googleapis.com.DepthPbMsg.DepthPbMsg * @static * @param {type.googleapis.com.DepthPbMsg.IDepthPbMsg} message DepthPbMsg message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ DepthPbMsg.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.asksList != null && message.asksList.length) for (var i = 0; i < message.asksList.length; ++i) $root.type.googleapis.com.DepthPbMsg.DepthPbMsg.Body.encode(message.asksList[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.bidsList != null && message.bidsList.length) for (var i = 0; i < message.bidsList.length; ++i) $root.type.googleapis.com.DepthPbMsg.DepthPbMsg.Body.encode(message.bidsList[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified DepthPbMsg message, length delimited. Does not implicitly {@link type.googleapis.com.DepthPbMsg.DepthPbMsg.verify|verify} messages. * @function encodeDelimited * @memberof type.googleapis.com.DepthPbMsg.DepthPbMsg * @static * @param {type.googleapis.com.DepthPbMsg.IDepthPbMsg} message DepthPbMsg message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ DepthPbMsg.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a DepthPbMsg message from the specified reader or buffer. * @function decode * @memberof type.googleapis.com.DepthPbMsg.DepthPbMsg * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {type.googleapis.com.DepthPbMsg.DepthPbMsg} DepthPbMsg * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ DepthPbMsg.decode = 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.DepthPbMsg.DepthPbMsg(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (!(message.asksList && message.asksList.length)) message.asksList = []; message.asksList.push($root.type.googleapis.com.DepthPbMsg.DepthPbMsg.Body.decode(reader, reader.uint32())); break; } case 2: { if (!(message.bidsList && message.bidsList.length)) message.bidsList = []; message.bidsList.push($root.type.googleapis.com.DepthPbMsg.DepthPbMsg.Body.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a DepthPbMsg message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof type.googleapis.com.DepthPbMsg.DepthPbMsg * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {type.googleapis.com.DepthPbMsg.DepthPbMsg} DepthPbMsg * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ DepthPbMsg.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a DepthPbMsg message. * @function verify * @memberof type.googleapis.com.DepthPbMsg.DepthPbMsg * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ DepthPbMsg.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.asksList != null && message.hasOwnProperty("asksList")) { if (!Array.isArray(message.asksList)) return "asksList: array expected"; for (var i = 0; i < message.asksList.length; ++i) { var error = $root.type.googleapis.com.DepthPbMsg.DepthPbMsg.Body.verify(message.asksList[i]); if (error) return "asksList." + error; } } if (message.bidsList != null && message.hasOwnProperty("bidsList")) { if (!Array.isArray(message.bidsList)) return "bidsList: array expected"; for (var i = 0; i < message.bidsList.length; ++i) { var error = $root.type.googleapis.com.DepthPbMsg.DepthPbMsg.Body.verify(message.bidsList[i]); if (error) return "bidsList." + error; } } return null; }; /** * Creates a DepthPbMsg message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof type.googleapis.com.DepthPbMsg.DepthPbMsg * @static * @param {Object.} object Plain object * @returns {type.googleapis.com.DepthPbMsg.DepthPbMsg} DepthPbMsg */ DepthPbMsg.fromObject = function fromObject(object) { if (object instanceof $root.type.googleapis.com.DepthPbMsg.DepthPbMsg) return object; var message = new $root.type.googleapis.com.DepthPbMsg.DepthPbMsg(); if (object.asksList) { if (!Array.isArray(object.asksList)) throw TypeError(".type.googleapis.com.DepthPbMsg.DepthPbMsg.asksList: array expected"); message.asksList = []; for (var i = 0; i < object.asksList.length; ++i) { if (typeof object.asksList[i] !== "object") throw TypeError(".type.googleapis.com.DepthPbMsg.DepthPbMsg.asksList: object expected"); message.asksList[i] = $root.type.googleapis.com.DepthPbMsg.DepthPbMsg.Body.fromObject(object.asksList[i]); } } if (object.bidsList) { if (!Array.isArray(object.bidsList)) throw TypeError(".type.googleapis.com.DepthPbMsg.DepthPbMsg.bidsList: array expected"); message.bidsList = []; for (var i = 0; i < object.bidsList.length; ++i) { if (typeof object.bidsList[i] !== "object") throw TypeError(".type.googleapis.com.DepthPbMsg.DepthPbMsg.bidsList: object expected"); message.bidsList[i] = $root.type.googleapis.com.DepthPbMsg.DepthPbMsg.Body.fromObject(object.bidsList[i]); } } return message; }; /** * Creates a plain object from a DepthPbMsg message. Also converts values to other types if specified. * @function toObject * @memberof type.googleapis.com.DepthPbMsg.DepthPbMsg * @static * @param {type.googleapis.com.DepthPbMsg.DepthPbMsg} message DepthPbMsg * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ DepthPbMsg.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { object.asksList = []; object.bidsList = []; } if (message.asksList && message.asksList.length) { object.asksList = []; for (var j = 0; j < message.asksList.length; ++j) object.asksList[j] = $root.type.googleapis.com.DepthPbMsg.DepthPbMsg.Body.toObject(message.asksList[j], options); } if (message.bidsList && message.bidsList.length) { object.bidsList = []; for (var j = 0; j < message.bidsList.length; ++j) object.bidsList[j] = $root.type.googleapis.com.DepthPbMsg.DepthPbMsg.Body.toObject(message.bidsList[j], options); } return object; }; /** * Converts this DepthPbMsg to JSON. * @function toJSON * @memberof type.googleapis.com.DepthPbMsg.DepthPbMsg * @instance * @returns {Object.} JSON object */ DepthPbMsg.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for DepthPbMsg * @function getTypeUrl * @memberof type.googleapis.com.DepthPbMsg.DepthPbMsg * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ DepthPbMsg.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/type.googleapis.com.DepthPbMsg.DepthPbMsg"; }; DepthPbMsg.Body = (function() { /** * Properties of a Body. * @memberof type.googleapis.com.DepthPbMsg.DepthPbMsg * @interface IBody */ /** * Constructs a new Body. * @memberof type.googleapis.com.DepthPbMsg.DepthPbMsg * @classdesc Represents a Body. * @implements IBody * @constructor * @param {type.googleapis.com.DepthPbMsg.DepthPbMsg.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]]; } /** * Creates a new Body instance using the specified properties. * @function create * @memberof type.googleapis.com.DepthPbMsg.DepthPbMsg.Body * @static * @param {type.googleapis.com.DepthPbMsg.DepthPbMsg.IBody=} [properties] Properties to set * @returns {type.googleapis.com.DepthPbMsg.DepthPbMsg.Body} Body instance */ Body.create = function create(properties) { return new Body(properties); }; /** * Encodes the specified Body message. Does not implicitly {@link type.googleapis.com.DepthPbMsg.DepthPbMsg.Body.verify|verify} messages. * @function encode * @memberof type.googleapis.com.DepthPbMsg.DepthPbMsg.Body * @static * @param {type.googleapis.com.DepthPbMsg.DepthPbMsg.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(); return writer; }; /** * Encodes the specified Body message, length delimited. Does not implicitly {@link type.googleapis.com.DepthPbMsg.DepthPbMsg.Body.verify|verify} messages. * @function encodeDelimited * @memberof type.googleapis.com.DepthPbMsg.DepthPbMsg.Body * @static * @param {type.googleapis.com.DepthPbMsg.DepthPbMsg.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.DepthPbMsg.DepthPbMsg.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.DepthPbMsg.DepthPbMsg.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.DepthPbMsg.DepthPbMsg.Body(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { 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.DepthPbMsg.DepthPbMsg.Body * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {type.googleapis.com.DepthPbMsg.DepthPbMsg.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.DepthPbMsg.DepthPbMsg.Body * @static * @param {Object.} 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"; return null; }; /** * Creates a Body message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof type.googleapis.com.DepthPbMsg.DepthPbMsg.Body * @static * @param {Object.} object Plain object * @returns {type.googleapis.com.DepthPbMsg.DepthPbMsg.Body} Body */ Body.fromObject = function fromObject(object) { if (object instanceof $root.type.googleapis.com.DepthPbMsg.DepthPbMsg.Body) return object; return new $root.type.googleapis.com.DepthPbMsg.DepthPbMsg.Body(); }; /** * Creates a plain object from a Body message. Also converts values to other types if specified. * @function toObject * @memberof type.googleapis.com.DepthPbMsg.DepthPbMsg.Body * @static * @param {type.googleapis.com.DepthPbMsg.DepthPbMsg.Body} message Body * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ Body.toObject = function toObject() { return {}; }; /** * Converts this Body to JSON. * @function toJSON * @memberof type.googleapis.com.DepthPbMsg.DepthPbMsg.Body * @instance * @returns {Object.} 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.DepthPbMsg.DepthPbMsg.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.DepthPbMsg.DepthPbMsg.Body"; }; return Body; })(); return DepthPbMsg; })(); return DepthPbMsg; })(); return com; })(); return googleapis; })(); return type; })(); module.exports = $root;