type.googleapis.com.DepthPbMsg.js 53 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094
  1. /*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
  2. "use strict";
  3. var $protobuf = require("protobufjs/minimal");
  4. // Common aliases
  5. var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;
  6. // Exported root namespace
  7. var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
  8. $root.type = (function() {
  9. /**
  10. * Namespace type.
  11. * @exports type
  12. * @namespace
  13. */
  14. var type = {};
  15. type.googleapis = (function() {
  16. /**
  17. * Namespace googleapis.
  18. * @memberof type
  19. * @namespace
  20. */
  21. var googleapis = {};
  22. googleapis.com = (function() {
  23. /**
  24. * Namespace com.
  25. * @memberof type.googleapis
  26. * @namespace
  27. */
  28. var com = {};
  29. com.Response = (function() {
  30. /**
  31. * Properties of a Response.
  32. * @memberof type.googleapis.com
  33. * @interface IResponse
  34. * @property {string|null} [biz] Response biz
  35. * @property {string|null} [type] Response type
  36. * @property {string|null} [base] Response base
  37. * @property {string|null} [quote] Response quote
  38. * @property {string|null} [contractcode] Response contractcode
  39. * @property {string|null} [granularity] Response granularity
  40. * @property {type.googleapis.com.IData|null} [data] Response data
  41. * @property {number|null} [env] Response env
  42. */
  43. /**
  44. * Constructs a new Response.
  45. * @memberof type.googleapis.com
  46. * @classdesc Represents a Response.
  47. * @implements IResponse
  48. * @constructor
  49. * @param {type.googleapis.com.IResponse=} [properties] Properties to set
  50. */
  51. function Response(properties) {
  52. if (properties)
  53. for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
  54. if (properties[keys[i]] != null)
  55. this[keys[i]] = properties[keys[i]];
  56. }
  57. /**
  58. * Response biz.
  59. * @member {string} biz
  60. * @memberof type.googleapis.com.Response
  61. * @instance
  62. */
  63. Response.prototype.biz = "";
  64. /**
  65. * Response type.
  66. * @member {string} type
  67. * @memberof type.googleapis.com.Response
  68. * @instance
  69. */
  70. Response.prototype.type = "";
  71. /**
  72. * Response base.
  73. * @member {string} base
  74. * @memberof type.googleapis.com.Response
  75. * @instance
  76. */
  77. Response.prototype.base = "";
  78. /**
  79. * Response quote.
  80. * @member {string} quote
  81. * @memberof type.googleapis.com.Response
  82. * @instance
  83. */
  84. Response.prototype.quote = "";
  85. /**
  86. * Response contractcode.
  87. * @member {string} contractcode
  88. * @memberof type.googleapis.com.Response
  89. * @instance
  90. */
  91. Response.prototype.contractcode = "";
  92. /**
  93. * Response granularity.
  94. * @member {string} granularity
  95. * @memberof type.googleapis.com.Response
  96. * @instance
  97. */
  98. Response.prototype.granularity = "";
  99. /**
  100. * Response data.
  101. * @member {type.googleapis.com.IData|null|undefined} data
  102. * @memberof type.googleapis.com.Response
  103. * @instance
  104. */
  105. Response.prototype.data = null;
  106. /**
  107. * Response env.
  108. * @member {number} env
  109. * @memberof type.googleapis.com.Response
  110. * @instance
  111. */
  112. Response.prototype.env = 0;
  113. /**
  114. * Creates a new Response instance using the specified properties.
  115. * @function create
  116. * @memberof type.googleapis.com.Response
  117. * @static
  118. * @param {type.googleapis.com.IResponse=} [properties] Properties to set
  119. * @returns {type.googleapis.com.Response} Response instance
  120. */
  121. Response.create = function create(properties) {
  122. return new Response(properties);
  123. };
  124. /**
  125. * Encodes the specified Response message. Does not implicitly {@link type.googleapis.com.Response.verify|verify} messages.
  126. * @function encode
  127. * @memberof type.googleapis.com.Response
  128. * @static
  129. * @param {type.googleapis.com.IResponse} message Response message or plain object to encode
  130. * @param {$protobuf.Writer} [writer] Writer to encode to
  131. * @returns {$protobuf.Writer} Writer
  132. */
  133. Response.encode = function encode(message, writer) {
  134. if (!writer)
  135. writer = $Writer.create();
  136. if (message.biz != null && Object.hasOwnProperty.call(message, "biz"))
  137. writer.uint32(/* id 1, wireType 2 =*/10).string(message.biz);
  138. if (message.type != null && Object.hasOwnProperty.call(message, "type"))
  139. writer.uint32(/* id 2, wireType 2 =*/18).string(message.type);
  140. if (message.base != null && Object.hasOwnProperty.call(message, "base"))
  141. writer.uint32(/* id 3, wireType 2 =*/26).string(message.base);
  142. if (message.quote != null && Object.hasOwnProperty.call(message, "quote"))
  143. writer.uint32(/* id 4, wireType 2 =*/34).string(message.quote);
  144. if (message.contractcode != null && Object.hasOwnProperty.call(message, "contractcode"))
  145. writer.uint32(/* id 5, wireType 2 =*/42).string(message.contractcode);
  146. if (message.granularity != null && Object.hasOwnProperty.call(message, "granularity"))
  147. writer.uint32(/* id 6, wireType 2 =*/50).string(message.granularity);
  148. if (message.data != null && Object.hasOwnProperty.call(message, "data"))
  149. $root.type.googleapis.com.Data.encode(message.data, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
  150. if (message.env != null && Object.hasOwnProperty.call(message, "env"))
  151. writer.uint32(/* id 8, wireType 0 =*/64).int32(message.env);
  152. return writer;
  153. };
  154. /**
  155. * Encodes the specified Response message, length delimited. Does not implicitly {@link type.googleapis.com.Response.verify|verify} messages.
  156. * @function encodeDelimited
  157. * @memberof type.googleapis.com.Response
  158. * @static
  159. * @param {type.googleapis.com.IResponse} message Response message or plain object to encode
  160. * @param {$protobuf.Writer} [writer] Writer to encode to
  161. * @returns {$protobuf.Writer} Writer
  162. */
  163. Response.encodeDelimited = function encodeDelimited(message, writer) {
  164. return this.encode(message, writer).ldelim();
  165. };
  166. /**
  167. * Decodes a Response message from the specified reader or buffer.
  168. * @function decode
  169. * @memberof type.googleapis.com.Response
  170. * @static
  171. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  172. * @param {number} [length] Message length if known beforehand
  173. * @returns {type.googleapis.com.Response} Response
  174. * @throws {Error} If the payload is not a reader or valid buffer
  175. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  176. */
  177. Response.decode = function decode(reader, length) {
  178. if (!(reader instanceof $Reader))
  179. reader = $Reader.create(reader);
  180. var end = length === undefined ? reader.len : reader.pos + length, message = new $root.type.googleapis.com.Response();
  181. while (reader.pos < end) {
  182. var tag = reader.uint32();
  183. switch (tag >>> 3) {
  184. case 1: {
  185. message.biz = reader.string();
  186. break;
  187. }
  188. case 2: {
  189. message.type = reader.string();
  190. break;
  191. }
  192. case 3: {
  193. message.base = reader.string();
  194. break;
  195. }
  196. case 4: {
  197. message.quote = reader.string();
  198. break;
  199. }
  200. case 5: {
  201. message.contractcode = reader.string();
  202. break;
  203. }
  204. case 6: {
  205. message.granularity = reader.string();
  206. break;
  207. }
  208. case 7: {
  209. message.data = $root.type.googleapis.com.Data.decode(reader, reader.uint32());
  210. break;
  211. }
  212. case 8: {
  213. message.env = reader.int32();
  214. break;
  215. }
  216. default:
  217. reader.skipType(tag & 7);
  218. break;
  219. }
  220. }
  221. return message;
  222. };
  223. /**
  224. * Decodes a Response message from the specified reader or buffer, length delimited.
  225. * @function decodeDelimited
  226. * @memberof type.googleapis.com.Response
  227. * @static
  228. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  229. * @returns {type.googleapis.com.Response} Response
  230. * @throws {Error} If the payload is not a reader or valid buffer
  231. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  232. */
  233. Response.decodeDelimited = function decodeDelimited(reader) {
  234. if (!(reader instanceof $Reader))
  235. reader = new $Reader(reader);
  236. return this.decode(reader, reader.uint32());
  237. };
  238. /**
  239. * Verifies a Response message.
  240. * @function verify
  241. * @memberof type.googleapis.com.Response
  242. * @static
  243. * @param {Object.<string,*>} message Plain object to verify
  244. * @returns {string|null} `null` if valid, otherwise the reason why it is not
  245. */
  246. Response.verify = function verify(message) {
  247. if (typeof message !== "object" || message === null)
  248. return "object expected";
  249. if (message.biz != null && message.hasOwnProperty("biz"))
  250. if (!$util.isString(message.biz))
  251. return "biz: string expected";
  252. if (message.type != null && message.hasOwnProperty("type"))
  253. if (!$util.isString(message.type))
  254. return "type: string expected";
  255. if (message.base != null && message.hasOwnProperty("base"))
  256. if (!$util.isString(message.base))
  257. return "base: string expected";
  258. if (message.quote != null && message.hasOwnProperty("quote"))
  259. if (!$util.isString(message.quote))
  260. return "quote: string expected";
  261. if (message.contractcode != null && message.hasOwnProperty("contractcode"))
  262. if (!$util.isString(message.contractcode))
  263. return "contractcode: string expected";
  264. if (message.granularity != null && message.hasOwnProperty("granularity"))
  265. if (!$util.isString(message.granularity))
  266. return "granularity: string expected";
  267. if (message.data != null && message.hasOwnProperty("data")) {
  268. var error = $root.type.googleapis.com.Data.verify(message.data);
  269. if (error)
  270. return "data." + error;
  271. }
  272. if (message.env != null && message.hasOwnProperty("env"))
  273. if (!$util.isInteger(message.env))
  274. return "env: integer expected";
  275. return null;
  276. };
  277. /**
  278. * Creates a Response message from a plain object. Also converts values to their respective internal types.
  279. * @function fromObject
  280. * @memberof type.googleapis.com.Response
  281. * @static
  282. * @param {Object.<string,*>} object Plain object
  283. * @returns {type.googleapis.com.Response} Response
  284. */
  285. Response.fromObject = function fromObject(object) {
  286. if (object instanceof $root.type.googleapis.com.Response)
  287. return object;
  288. var message = new $root.type.googleapis.com.Response();
  289. if (object.biz != null)
  290. message.biz = String(object.biz);
  291. if (object.type != null)
  292. message.type = String(object.type);
  293. if (object.base != null)
  294. message.base = String(object.base);
  295. if (object.quote != null)
  296. message.quote = String(object.quote);
  297. if (object.contractcode != null)
  298. message.contractcode = String(object.contractcode);
  299. if (object.granularity != null)
  300. message.granularity = String(object.granularity);
  301. if (object.data != null) {
  302. if (typeof object.data !== "object")
  303. throw TypeError(".type.googleapis.com.Response.data: object expected");
  304. message.data = $root.type.googleapis.com.Data.fromObject(object.data);
  305. }
  306. if (object.env != null)
  307. message.env = object.env | 0;
  308. return message;
  309. };
  310. /**
  311. * Creates a plain object from a Response message. Also converts values to other types if specified.
  312. * @function toObject
  313. * @memberof type.googleapis.com.Response
  314. * @static
  315. * @param {type.googleapis.com.Response} message Response
  316. * @param {$protobuf.IConversionOptions} [options] Conversion options
  317. * @returns {Object.<string,*>} Plain object
  318. */
  319. Response.toObject = function toObject(message, options) {
  320. if (!options)
  321. options = {};
  322. var object = {};
  323. if (options.defaults) {
  324. object.biz = "";
  325. object.type = "";
  326. object.base = "";
  327. object.quote = "";
  328. object.contractcode = "";
  329. object.granularity = "";
  330. object.data = null;
  331. object.env = 0;
  332. }
  333. if (message.biz != null && message.hasOwnProperty("biz"))
  334. object.biz = message.biz;
  335. if (message.type != null && message.hasOwnProperty("type"))
  336. object.type = message.type;
  337. if (message.base != null && message.hasOwnProperty("base"))
  338. object.base = message.base;
  339. if (message.quote != null && message.hasOwnProperty("quote"))
  340. object.quote = message.quote;
  341. if (message.contractcode != null && message.hasOwnProperty("contractcode"))
  342. object.contractcode = message.contractcode;
  343. if (message.granularity != null && message.hasOwnProperty("granularity"))
  344. object.granularity = message.granularity;
  345. if (message.data != null && message.hasOwnProperty("data"))
  346. object.data = $root.type.googleapis.com.Data.toObject(message.data, options);
  347. if (message.env != null && message.hasOwnProperty("env"))
  348. object.env = message.env;
  349. return object;
  350. };
  351. /**
  352. * Converts this Response to JSON.
  353. * @function toJSON
  354. * @memberof type.googleapis.com.Response
  355. * @instance
  356. * @returns {Object.<string,*>} JSON object
  357. */
  358. Response.prototype.toJSON = function toJSON() {
  359. return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
  360. };
  361. /**
  362. * Gets the default type url for Response
  363. * @function getTypeUrl
  364. * @memberof type.googleapis.com.Response
  365. * @static
  366. * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
  367. * @returns {string} The default type url
  368. */
  369. Response.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
  370. if (typeUrlPrefix === undefined) {
  371. typeUrlPrefix = "type.googleapis.com";
  372. }
  373. return typeUrlPrefix + "/type.googleapis.com.Response";
  374. };
  375. return Response;
  376. })();
  377. com.Data = (function() {
  378. /**
  379. * Properties of a Data.
  380. * @memberof type.googleapis.com
  381. * @interface IData
  382. * @property {string|null} [typeUrl] Data typeUrl
  383. * @property {type.googleapis.com.IDepthPbMsg|null} [value] Data value
  384. */
  385. /**
  386. * Constructs a new Data.
  387. * @memberof type.googleapis.com
  388. * @classdesc Represents a Data.
  389. * @implements IData
  390. * @constructor
  391. * @param {type.googleapis.com.IData=} [properties] Properties to set
  392. */
  393. function Data(properties) {
  394. if (properties)
  395. for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
  396. if (properties[keys[i]] != null)
  397. this[keys[i]] = properties[keys[i]];
  398. }
  399. /**
  400. * Data typeUrl.
  401. * @member {string} typeUrl
  402. * @memberof type.googleapis.com.Data
  403. * @instance
  404. */
  405. Data.prototype.typeUrl = "";
  406. /**
  407. * Data value.
  408. * @member {type.googleapis.com.IDepthPbMsg|null|undefined} value
  409. * @memberof type.googleapis.com.Data
  410. * @instance
  411. */
  412. Data.prototype.value = null;
  413. /**
  414. * Creates a new Data instance using the specified properties.
  415. * @function create
  416. * @memberof type.googleapis.com.Data
  417. * @static
  418. * @param {type.googleapis.com.IData=} [properties] Properties to set
  419. * @returns {type.googleapis.com.Data} Data instance
  420. */
  421. Data.create = function create(properties) {
  422. return new Data(properties);
  423. };
  424. /**
  425. * Encodes the specified Data message. Does not implicitly {@link type.googleapis.com.Data.verify|verify} messages.
  426. * @function encode
  427. * @memberof type.googleapis.com.Data
  428. * @static
  429. * @param {type.googleapis.com.IData} message Data message or plain object to encode
  430. * @param {$protobuf.Writer} [writer] Writer to encode to
  431. * @returns {$protobuf.Writer} Writer
  432. */
  433. Data.encode = function encode(message, writer) {
  434. if (!writer)
  435. writer = $Writer.create();
  436. if (message.typeUrl != null && Object.hasOwnProperty.call(message, "typeUrl"))
  437. writer.uint32(/* id 1, wireType 2 =*/10).string(message.typeUrl);
  438. if (message.value != null && Object.hasOwnProperty.call(message, "value"))
  439. $root.type.googleapis.com.DepthPbMsg.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
  440. return writer;
  441. };
  442. /**
  443. * Encodes the specified Data message, length delimited. Does not implicitly {@link type.googleapis.com.Data.verify|verify} messages.
  444. * @function encodeDelimited
  445. * @memberof type.googleapis.com.Data
  446. * @static
  447. * @param {type.googleapis.com.IData} message Data message or plain object to encode
  448. * @param {$protobuf.Writer} [writer] Writer to encode to
  449. * @returns {$protobuf.Writer} Writer
  450. */
  451. Data.encodeDelimited = function encodeDelimited(message, writer) {
  452. return this.encode(message, writer).ldelim();
  453. };
  454. /**
  455. * Decodes a Data message from the specified reader or buffer.
  456. * @function decode
  457. * @memberof type.googleapis.com.Data
  458. * @static
  459. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  460. * @param {number} [length] Message length if known beforehand
  461. * @returns {type.googleapis.com.Data} Data
  462. * @throws {Error} If the payload is not a reader or valid buffer
  463. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  464. */
  465. Data.decode = function decode(reader, length) {
  466. if (!(reader instanceof $Reader))
  467. reader = $Reader.create(reader);
  468. var end = length === undefined ? reader.len : reader.pos + length, message = new $root.type.googleapis.com.Data();
  469. while (reader.pos < end) {
  470. var tag = reader.uint32();
  471. switch (tag >>> 3) {
  472. case 1: {
  473. message.typeUrl = reader.string();
  474. break;
  475. }
  476. case 2: {
  477. message.value = $root.type.googleapis.com.DepthPbMsg.decode(reader, reader.uint32());
  478. break;
  479. }
  480. default:
  481. reader.skipType(tag & 7);
  482. break;
  483. }
  484. }
  485. return message;
  486. };
  487. /**
  488. * Decodes a Data message from the specified reader or buffer, length delimited.
  489. * @function decodeDelimited
  490. * @memberof type.googleapis.com.Data
  491. * @static
  492. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  493. * @returns {type.googleapis.com.Data} Data
  494. * @throws {Error} If the payload is not a reader or valid buffer
  495. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  496. */
  497. Data.decodeDelimited = function decodeDelimited(reader) {
  498. if (!(reader instanceof $Reader))
  499. reader = new $Reader(reader);
  500. return this.decode(reader, reader.uint32());
  501. };
  502. /**
  503. * Verifies a Data message.
  504. * @function verify
  505. * @memberof type.googleapis.com.Data
  506. * @static
  507. * @param {Object.<string,*>} message Plain object to verify
  508. * @returns {string|null} `null` if valid, otherwise the reason why it is not
  509. */
  510. Data.verify = function verify(message) {
  511. if (typeof message !== "object" || message === null)
  512. return "object expected";
  513. if (message.typeUrl != null && message.hasOwnProperty("typeUrl"))
  514. if (!$util.isString(message.typeUrl))
  515. return "typeUrl: string expected";
  516. if (message.value != null && message.hasOwnProperty("value")) {
  517. var error = $root.type.googleapis.com.DepthPbMsg.verify(message.value);
  518. if (error)
  519. return "value." + error;
  520. }
  521. return null;
  522. };
  523. /**
  524. * Creates a Data message from a plain object. Also converts values to their respective internal types.
  525. * @function fromObject
  526. * @memberof type.googleapis.com.Data
  527. * @static
  528. * @param {Object.<string,*>} object Plain object
  529. * @returns {type.googleapis.com.Data} Data
  530. */
  531. Data.fromObject = function fromObject(object) {
  532. if (object instanceof $root.type.googleapis.com.Data)
  533. return object;
  534. var message = new $root.type.googleapis.com.Data();
  535. if (object.typeUrl != null)
  536. message.typeUrl = String(object.typeUrl);
  537. if (object.value != null) {
  538. if (typeof object.value !== "object")
  539. throw TypeError(".type.googleapis.com.Data.value: object expected");
  540. message.value = $root.type.googleapis.com.DepthPbMsg.fromObject(object.value);
  541. }
  542. return message;
  543. };
  544. /**
  545. * Creates a plain object from a Data message. Also converts values to other types if specified.
  546. * @function toObject
  547. * @memberof type.googleapis.com.Data
  548. * @static
  549. * @param {type.googleapis.com.Data} message Data
  550. * @param {$protobuf.IConversionOptions} [options] Conversion options
  551. * @returns {Object.<string,*>} Plain object
  552. */
  553. Data.toObject = function toObject(message, options) {
  554. if (!options)
  555. options = {};
  556. var object = {};
  557. if (options.defaults) {
  558. object.typeUrl = "";
  559. object.value = null;
  560. }
  561. if (message.typeUrl != null && message.hasOwnProperty("typeUrl"))
  562. object.typeUrl = message.typeUrl;
  563. if (message.value != null && message.hasOwnProperty("value"))
  564. object.value = $root.type.googleapis.com.DepthPbMsg.toObject(message.value, options);
  565. return object;
  566. };
  567. /**
  568. * Converts this Data to JSON.
  569. * @function toJSON
  570. * @memberof type.googleapis.com.Data
  571. * @instance
  572. * @returns {Object.<string,*>} JSON object
  573. */
  574. Data.prototype.toJSON = function toJSON() {
  575. return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
  576. };
  577. /**
  578. * Gets the default type url for Data
  579. * @function getTypeUrl
  580. * @memberof type.googleapis.com.Data
  581. * @static
  582. * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
  583. * @returns {string} The default type url
  584. */
  585. Data.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
  586. if (typeUrlPrefix === undefined) {
  587. typeUrlPrefix = "type.googleapis.com";
  588. }
  589. return typeUrlPrefix + "/type.googleapis.com.Data";
  590. };
  591. return Data;
  592. })();
  593. com.DepthPbMsg = (function() {
  594. /**
  595. * Properties of a DepthPbMsg.
  596. * @memberof type.googleapis.com
  597. * @interface IDepthPbMsg
  598. * @property {Array.<type.googleapis.com.DepthPbMsg.IBody>|null} [asksList] DepthPbMsg asksList
  599. * @property {Array.<type.googleapis.com.DepthPbMsg.IBody>|null} [bidsList] DepthPbMsg bidsList
  600. */
  601. /**
  602. * Constructs a new DepthPbMsg.
  603. * @memberof type.googleapis.com
  604. * @classdesc Represents a DepthPbMsg.
  605. * @implements IDepthPbMsg
  606. * @constructor
  607. * @param {type.googleapis.com.IDepthPbMsg=} [properties] Properties to set
  608. */
  609. function DepthPbMsg(properties) {
  610. this.asksList = [];
  611. this.bidsList = [];
  612. if (properties)
  613. for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
  614. if (properties[keys[i]] != null)
  615. this[keys[i]] = properties[keys[i]];
  616. }
  617. /**
  618. * DepthPbMsg asksList.
  619. * @member {Array.<type.googleapis.com.DepthPbMsg.IBody>} asksList
  620. * @memberof type.googleapis.com.DepthPbMsg
  621. * @instance
  622. */
  623. DepthPbMsg.prototype.asksList = $util.emptyArray;
  624. /**
  625. * DepthPbMsg bidsList.
  626. * @member {Array.<type.googleapis.com.DepthPbMsg.IBody>} bidsList
  627. * @memberof type.googleapis.com.DepthPbMsg
  628. * @instance
  629. */
  630. DepthPbMsg.prototype.bidsList = $util.emptyArray;
  631. /**
  632. * Creates a new DepthPbMsg instance using the specified properties.
  633. * @function create
  634. * @memberof type.googleapis.com.DepthPbMsg
  635. * @static
  636. * @param {type.googleapis.com.IDepthPbMsg=} [properties] Properties to set
  637. * @returns {type.googleapis.com.DepthPbMsg} DepthPbMsg instance
  638. */
  639. DepthPbMsg.create = function create(properties) {
  640. return new DepthPbMsg(properties);
  641. };
  642. /**
  643. * Encodes the specified DepthPbMsg message. Does not implicitly {@link type.googleapis.com.DepthPbMsg.verify|verify} messages.
  644. * @function encode
  645. * @memberof type.googleapis.com.DepthPbMsg
  646. * @static
  647. * @param {type.googleapis.com.IDepthPbMsg} message DepthPbMsg message or plain object to encode
  648. * @param {$protobuf.Writer} [writer] Writer to encode to
  649. * @returns {$protobuf.Writer} Writer
  650. */
  651. DepthPbMsg.encode = function encode(message, writer) {
  652. if (!writer)
  653. writer = $Writer.create();
  654. if (message.asksList != null && message.asksList.length)
  655. for (var i = 0; i < message.asksList.length; ++i)
  656. $root.type.googleapis.com.DepthPbMsg.Body.encode(message.asksList[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
  657. if (message.bidsList != null && message.bidsList.length)
  658. for (var i = 0; i < message.bidsList.length; ++i)
  659. $root.type.googleapis.com.DepthPbMsg.Body.encode(message.bidsList[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
  660. return writer;
  661. };
  662. /**
  663. * Encodes the specified DepthPbMsg message, length delimited. Does not implicitly {@link type.googleapis.com.DepthPbMsg.verify|verify} messages.
  664. * @function encodeDelimited
  665. * @memberof type.googleapis.com.DepthPbMsg
  666. * @static
  667. * @param {type.googleapis.com.IDepthPbMsg} message DepthPbMsg message or plain object to encode
  668. * @param {$protobuf.Writer} [writer] Writer to encode to
  669. * @returns {$protobuf.Writer} Writer
  670. */
  671. DepthPbMsg.encodeDelimited = function encodeDelimited(message, writer) {
  672. return this.encode(message, writer).ldelim();
  673. };
  674. /**
  675. * Decodes a DepthPbMsg message from the specified reader or buffer.
  676. * @function decode
  677. * @memberof type.googleapis.com.DepthPbMsg
  678. * @static
  679. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  680. * @param {number} [length] Message length if known beforehand
  681. * @returns {type.googleapis.com.DepthPbMsg} DepthPbMsg
  682. * @throws {Error} If the payload is not a reader or valid buffer
  683. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  684. */
  685. DepthPbMsg.decode = function decode(reader, length) {
  686. if (!(reader instanceof $Reader))
  687. reader = $Reader.create(reader);
  688. var end = length === undefined ? reader.len : reader.pos + length, message = new $root.type.googleapis.com.DepthPbMsg();
  689. while (reader.pos < end) {
  690. var tag = reader.uint32();
  691. switch (tag >>> 3) {
  692. case 1: {
  693. if (!(message.asksList && message.asksList.length))
  694. message.asksList = [];
  695. message.asksList.push($root.type.googleapis.com.DepthPbMsg.Body.decode(reader, reader.uint32()));
  696. break;
  697. }
  698. case 2: {
  699. if (!(message.bidsList && message.bidsList.length))
  700. message.bidsList = [];
  701. message.bidsList.push($root.type.googleapis.com.DepthPbMsg.Body.decode(reader, reader.uint32()));
  702. break;
  703. }
  704. default:
  705. reader.skipType(tag & 7);
  706. break;
  707. }
  708. }
  709. return message;
  710. };
  711. /**
  712. * Decodes a DepthPbMsg message from the specified reader or buffer, length delimited.
  713. * @function decodeDelimited
  714. * @memberof type.googleapis.com.DepthPbMsg
  715. * @static
  716. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  717. * @returns {type.googleapis.com.DepthPbMsg} DepthPbMsg
  718. * @throws {Error} If the payload is not a reader or valid buffer
  719. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  720. */
  721. DepthPbMsg.decodeDelimited = function decodeDelimited(reader) {
  722. if (!(reader instanceof $Reader))
  723. reader = new $Reader(reader);
  724. return this.decode(reader, reader.uint32());
  725. };
  726. /**
  727. * Verifies a DepthPbMsg message.
  728. * @function verify
  729. * @memberof type.googleapis.com.DepthPbMsg
  730. * @static
  731. * @param {Object.<string,*>} message Plain object to verify
  732. * @returns {string|null} `null` if valid, otherwise the reason why it is not
  733. */
  734. DepthPbMsg.verify = function verify(message) {
  735. if (typeof message !== "object" || message === null)
  736. return "object expected";
  737. if (message.asksList != null && message.hasOwnProperty("asksList")) {
  738. if (!Array.isArray(message.asksList))
  739. return "asksList: array expected";
  740. for (var i = 0; i < message.asksList.length; ++i) {
  741. var error = $root.type.googleapis.com.DepthPbMsg.Body.verify(message.asksList[i]);
  742. if (error)
  743. return "asksList." + error;
  744. }
  745. }
  746. if (message.bidsList != null && message.hasOwnProperty("bidsList")) {
  747. if (!Array.isArray(message.bidsList))
  748. return "bidsList: array expected";
  749. for (var i = 0; i < message.bidsList.length; ++i) {
  750. var error = $root.type.googleapis.com.DepthPbMsg.Body.verify(message.bidsList[i]);
  751. if (error)
  752. return "bidsList." + error;
  753. }
  754. }
  755. return null;
  756. };
  757. /**
  758. * Creates a DepthPbMsg message from a plain object. Also converts values to their respective internal types.
  759. * @function fromObject
  760. * @memberof type.googleapis.com.DepthPbMsg
  761. * @static
  762. * @param {Object.<string,*>} object Plain object
  763. * @returns {type.googleapis.com.DepthPbMsg} DepthPbMsg
  764. */
  765. DepthPbMsg.fromObject = function fromObject(object) {
  766. if (object instanceof $root.type.googleapis.com.DepthPbMsg)
  767. return object;
  768. var message = new $root.type.googleapis.com.DepthPbMsg();
  769. if (object.asksList) {
  770. if (!Array.isArray(object.asksList))
  771. throw TypeError(".type.googleapis.com.DepthPbMsg.asksList: array expected");
  772. message.asksList = [];
  773. for (var i = 0; i < object.asksList.length; ++i) {
  774. if (typeof object.asksList[i] !== "object")
  775. throw TypeError(".type.googleapis.com.DepthPbMsg.asksList: object expected");
  776. message.asksList[i] = $root.type.googleapis.com.DepthPbMsg.Body.fromObject(object.asksList[i]);
  777. }
  778. }
  779. if (object.bidsList) {
  780. if (!Array.isArray(object.bidsList))
  781. throw TypeError(".type.googleapis.com.DepthPbMsg.bidsList: array expected");
  782. message.bidsList = [];
  783. for (var i = 0; i < object.bidsList.length; ++i) {
  784. if (typeof object.bidsList[i] !== "object")
  785. throw TypeError(".type.googleapis.com.DepthPbMsg.bidsList: object expected");
  786. message.bidsList[i] = $root.type.googleapis.com.DepthPbMsg.Body.fromObject(object.bidsList[i]);
  787. }
  788. }
  789. return message;
  790. };
  791. /**
  792. * Creates a plain object from a DepthPbMsg message. Also converts values to other types if specified.
  793. * @function toObject
  794. * @memberof type.googleapis.com.DepthPbMsg
  795. * @static
  796. * @param {type.googleapis.com.DepthPbMsg} message DepthPbMsg
  797. * @param {$protobuf.IConversionOptions} [options] Conversion options
  798. * @returns {Object.<string,*>} Plain object
  799. */
  800. DepthPbMsg.toObject = function toObject(message, options) {
  801. if (!options)
  802. options = {};
  803. var object = {};
  804. if (options.arrays || options.defaults) {
  805. object.asksList = [];
  806. object.bidsList = [];
  807. }
  808. if (message.asksList && message.asksList.length) {
  809. object.asksList = [];
  810. for (var j = 0; j < message.asksList.length; ++j)
  811. object.asksList[j] = $root.type.googleapis.com.DepthPbMsg.Body.toObject(message.asksList[j], options);
  812. }
  813. if (message.bidsList && message.bidsList.length) {
  814. object.bidsList = [];
  815. for (var j = 0; j < message.bidsList.length; ++j)
  816. object.bidsList[j] = $root.type.googleapis.com.DepthPbMsg.Body.toObject(message.bidsList[j], options);
  817. }
  818. return object;
  819. };
  820. /**
  821. * Converts this DepthPbMsg to JSON.
  822. * @function toJSON
  823. * @memberof type.googleapis.com.DepthPbMsg
  824. * @instance
  825. * @returns {Object.<string,*>} JSON object
  826. */
  827. DepthPbMsg.prototype.toJSON = function toJSON() {
  828. return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
  829. };
  830. /**
  831. * Gets the default type url for DepthPbMsg
  832. * @function getTypeUrl
  833. * @memberof type.googleapis.com.DepthPbMsg
  834. * @static
  835. * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
  836. * @returns {string} The default type url
  837. */
  838. DepthPbMsg.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
  839. if (typeUrlPrefix === undefined) {
  840. typeUrlPrefix = "type.googleapis.com";
  841. }
  842. return typeUrlPrefix + "/type.googleapis.com.DepthPbMsg";
  843. };
  844. DepthPbMsg.Body = (function() {
  845. /**
  846. * Properties of a Body.
  847. * @memberof type.googleapis.com.DepthPbMsg
  848. * @interface IBody
  849. */
  850. /**
  851. * Constructs a new Body.
  852. * @memberof type.googleapis.com.DepthPbMsg
  853. * @classdesc Represents a Body.
  854. * @implements IBody
  855. * @constructor
  856. * @param {type.googleapis.com.DepthPbMsg.IBody=} [properties] Properties to set
  857. */
  858. function Body(properties) {
  859. if (properties)
  860. for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
  861. if (properties[keys[i]] != null)
  862. this[keys[i]] = properties[keys[i]];
  863. }
  864. /**
  865. * Creates a new Body instance using the specified properties.
  866. * @function create
  867. * @memberof type.googleapis.com.DepthPbMsg.Body
  868. * @static
  869. * @param {type.googleapis.com.DepthPbMsg.IBody=} [properties] Properties to set
  870. * @returns {type.googleapis.com.DepthPbMsg.Body} Body instance
  871. */
  872. Body.create = function create(properties) {
  873. return new Body(properties);
  874. };
  875. /**
  876. * Encodes the specified Body message. Does not implicitly {@link type.googleapis.com.DepthPbMsg.Body.verify|verify} messages.
  877. * @function encode
  878. * @memberof type.googleapis.com.DepthPbMsg.Body
  879. * @static
  880. * @param {type.googleapis.com.DepthPbMsg.IBody} message Body message or plain object to encode
  881. * @param {$protobuf.Writer} [writer] Writer to encode to
  882. * @returns {$protobuf.Writer} Writer
  883. */
  884. Body.encode = function encode(message, writer) {
  885. if (!writer)
  886. writer = $Writer.create();
  887. return writer;
  888. };
  889. /**
  890. * Encodes the specified Body message, length delimited. Does not implicitly {@link type.googleapis.com.DepthPbMsg.Body.verify|verify} messages.
  891. * @function encodeDelimited
  892. * @memberof type.googleapis.com.DepthPbMsg.Body
  893. * @static
  894. * @param {type.googleapis.com.DepthPbMsg.IBody} message Body message or plain object to encode
  895. * @param {$protobuf.Writer} [writer] Writer to encode to
  896. * @returns {$protobuf.Writer} Writer
  897. */
  898. Body.encodeDelimited = function encodeDelimited(message, writer) {
  899. return this.encode(message, writer).ldelim();
  900. };
  901. /**
  902. * Decodes a Body message from the specified reader or buffer.
  903. * @function decode
  904. * @memberof type.googleapis.com.DepthPbMsg.Body
  905. * @static
  906. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  907. * @param {number} [length] Message length if known beforehand
  908. * @returns {type.googleapis.com.DepthPbMsg.Body} Body
  909. * @throws {Error} If the payload is not a reader or valid buffer
  910. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  911. */
  912. Body.decode = function decode(reader, length) {
  913. if (!(reader instanceof $Reader))
  914. reader = $Reader.create(reader);
  915. var end = length === undefined ? reader.len : reader.pos + length, message = new $root.type.googleapis.com.DepthPbMsg.Body();
  916. while (reader.pos < end) {
  917. var tag = reader.uint32();
  918. switch (tag >>> 3) {
  919. default:
  920. reader.skipType(tag & 7);
  921. break;
  922. }
  923. }
  924. return message;
  925. };
  926. /**
  927. * Decodes a Body message from the specified reader or buffer, length delimited.
  928. * @function decodeDelimited
  929. * @memberof type.googleapis.com.DepthPbMsg.Body
  930. * @static
  931. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  932. * @returns {type.googleapis.com.DepthPbMsg.Body} Body
  933. * @throws {Error} If the payload is not a reader or valid buffer
  934. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  935. */
  936. Body.decodeDelimited = function decodeDelimited(reader) {
  937. if (!(reader instanceof $Reader))
  938. reader = new $Reader(reader);
  939. return this.decode(reader, reader.uint32());
  940. };
  941. /**
  942. * Verifies a Body message.
  943. * @function verify
  944. * @memberof type.googleapis.com.DepthPbMsg.Body
  945. * @static
  946. * @param {Object.<string,*>} message Plain object to verify
  947. * @returns {string|null} `null` if valid, otherwise the reason why it is not
  948. */
  949. Body.verify = function verify(message) {
  950. if (typeof message !== "object" || message === null)
  951. return "object expected";
  952. return null;
  953. };
  954. /**
  955. * Creates a Body message from a plain object. Also converts values to their respective internal types.
  956. * @function fromObject
  957. * @memberof type.googleapis.com.DepthPbMsg.Body
  958. * @static
  959. * @param {Object.<string,*>} object Plain object
  960. * @returns {type.googleapis.com.DepthPbMsg.Body} Body
  961. */
  962. Body.fromObject = function fromObject(object) {
  963. if (object instanceof $root.type.googleapis.com.DepthPbMsg.Body)
  964. return object;
  965. return new $root.type.googleapis.com.DepthPbMsg.Body();
  966. };
  967. /**
  968. * Creates a plain object from a Body message. Also converts values to other types if specified.
  969. * @function toObject
  970. * @memberof type.googleapis.com.DepthPbMsg.Body
  971. * @static
  972. * @param {type.googleapis.com.DepthPbMsg.Body} message Body
  973. * @param {$protobuf.IConversionOptions} [options] Conversion options
  974. * @returns {Object.<string,*>} Plain object
  975. */
  976. Body.toObject = function toObject() {
  977. return {};
  978. };
  979. /**
  980. * Converts this Body to JSON.
  981. * @function toJSON
  982. * @memberof type.googleapis.com.DepthPbMsg.Body
  983. * @instance
  984. * @returns {Object.<string,*>} JSON object
  985. */
  986. Body.prototype.toJSON = function toJSON() {
  987. return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
  988. };
  989. /**
  990. * Gets the default type url for Body
  991. * @function getTypeUrl
  992. * @memberof type.googleapis.com.DepthPbMsg.Body
  993. * @static
  994. * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
  995. * @returns {string} The default type url
  996. */
  997. Body.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
  998. if (typeUrlPrefix === undefined) {
  999. typeUrlPrefix = "type.googleapis.com";
  1000. }
  1001. return typeUrlPrefix + "/type.googleapis.com.DepthPbMsg.Body";
  1002. };
  1003. return Body;
  1004. })();
  1005. return DepthPbMsg;
  1006. })();
  1007. return com;
  1008. })();
  1009. return googleapis;
  1010. })();
  1011. return type;
  1012. })();
  1013. module.exports = $root;