type.googleapis.com.FillsPbMsg.js 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974
  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.IOrderVoPb|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.IOrderVoPb|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.OrderVoPb.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.OrderVoPb.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.OrderVoPb.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.OrderVoPb.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.OrderVoPb.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.OrderVoPb = (function() {
  594. /**
  595. * Properties of an OrderVoPb.
  596. * @memberof type.googleapis.com
  597. * @interface IOrderVoPb
  598. * @property {string|null} [price] OrderVoPb price
  599. * @property {string|null} [amount] OrderVoPb amount
  600. * @property {string|null} [side] OrderVoPb side
  601. * @property {number|Long|null} [createddate] OrderVoPb createddate
  602. * @property {number|Long|null} [id] OrderVoPb id
  603. */
  604. /**
  605. * Constructs a new OrderVoPb.
  606. * @memberof type.googleapis.com
  607. * @classdesc Represents an OrderVoPb.
  608. * @implements IOrderVoPb
  609. * @constructor
  610. * @param {type.googleapis.com.IOrderVoPb=} [properties] Properties to set
  611. */
  612. function OrderVoPb(properties) {
  613. if (properties)
  614. for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
  615. if (properties[keys[i]] != null)
  616. this[keys[i]] = properties[keys[i]];
  617. }
  618. /**
  619. * OrderVoPb price.
  620. * @member {string} price
  621. * @memberof type.googleapis.com.OrderVoPb
  622. * @instance
  623. */
  624. OrderVoPb.prototype.price = "";
  625. /**
  626. * OrderVoPb amount.
  627. * @member {string} amount
  628. * @memberof type.googleapis.com.OrderVoPb
  629. * @instance
  630. */
  631. OrderVoPb.prototype.amount = "";
  632. /**
  633. * OrderVoPb side.
  634. * @member {string} side
  635. * @memberof type.googleapis.com.OrderVoPb
  636. * @instance
  637. */
  638. OrderVoPb.prototype.side = "";
  639. /**
  640. * OrderVoPb createddate.
  641. * @member {number|Long} createddate
  642. * @memberof type.googleapis.com.OrderVoPb
  643. * @instance
  644. */
  645. OrderVoPb.prototype.createddate = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
  646. /**
  647. * OrderVoPb id.
  648. * @member {number|Long} id
  649. * @memberof type.googleapis.com.OrderVoPb
  650. * @instance
  651. */
  652. OrderVoPb.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
  653. /**
  654. * Creates a new OrderVoPb instance using the specified properties.
  655. * @function create
  656. * @memberof type.googleapis.com.OrderVoPb
  657. * @static
  658. * @param {type.googleapis.com.IOrderVoPb=} [properties] Properties to set
  659. * @returns {type.googleapis.com.OrderVoPb} OrderVoPb instance
  660. */
  661. OrderVoPb.create = function create(properties) {
  662. return new OrderVoPb(properties);
  663. };
  664. /**
  665. * Encodes the specified OrderVoPb message. Does not implicitly {@link type.googleapis.com.OrderVoPb.verify|verify} messages.
  666. * @function encode
  667. * @memberof type.googleapis.com.OrderVoPb
  668. * @static
  669. * @param {type.googleapis.com.IOrderVoPb} message OrderVoPb message or plain object to encode
  670. * @param {$protobuf.Writer} [writer] Writer to encode to
  671. * @returns {$protobuf.Writer} Writer
  672. */
  673. OrderVoPb.encode = function encode(message, writer) {
  674. if (!writer)
  675. writer = $Writer.create();
  676. if (message.price != null && Object.hasOwnProperty.call(message, "price"))
  677. writer.uint32(/* id 1, wireType 2 =*/10).string(message.price);
  678. if (message.amount != null && Object.hasOwnProperty.call(message, "amount"))
  679. writer.uint32(/* id 2, wireType 2 =*/18).string(message.amount);
  680. if (message.side != null && Object.hasOwnProperty.call(message, "side"))
  681. writer.uint32(/* id 3, wireType 2 =*/26).string(message.side);
  682. if (message.createddate != null && Object.hasOwnProperty.call(message, "createddate"))
  683. writer.uint32(/* id 4, wireType 0 =*/32).int64(message.createddate);
  684. if (message.id != null && Object.hasOwnProperty.call(message, "id"))
  685. writer.uint32(/* id 5, wireType 0 =*/40).int64(message.id);
  686. return writer;
  687. };
  688. /**
  689. * Encodes the specified OrderVoPb message, length delimited. Does not implicitly {@link type.googleapis.com.OrderVoPb.verify|verify} messages.
  690. * @function encodeDelimited
  691. * @memberof type.googleapis.com.OrderVoPb
  692. * @static
  693. * @param {type.googleapis.com.IOrderVoPb} message OrderVoPb message or plain object to encode
  694. * @param {$protobuf.Writer} [writer] Writer to encode to
  695. * @returns {$protobuf.Writer} Writer
  696. */
  697. OrderVoPb.encodeDelimited = function encodeDelimited(message, writer) {
  698. return this.encode(message, writer).ldelim();
  699. };
  700. /**
  701. * Decodes an OrderVoPb message from the specified reader or buffer.
  702. * @function decode
  703. * @memberof type.googleapis.com.OrderVoPb
  704. * @static
  705. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  706. * @param {number} [length] Message length if known beforehand
  707. * @returns {type.googleapis.com.OrderVoPb} OrderVoPb
  708. * @throws {Error} If the payload is not a reader or valid buffer
  709. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  710. */
  711. OrderVoPb.decode = function decode(reader, length) {
  712. if (!(reader instanceof $Reader))
  713. reader = $Reader.create(reader);
  714. var end = length === undefined ? reader.len : reader.pos + length, message = new $root.type.googleapis.com.OrderVoPb();
  715. while (reader.pos < end) {
  716. var tag = reader.uint32();
  717. switch (tag >>> 3) {
  718. case 1: {
  719. message.price = reader.string();
  720. break;
  721. }
  722. case 2: {
  723. message.amount = reader.string();
  724. break;
  725. }
  726. case 3: {
  727. message.side = reader.string();
  728. break;
  729. }
  730. case 4: {
  731. message.createddate = reader.int64();
  732. break;
  733. }
  734. case 5: {
  735. message.id = reader.int64();
  736. break;
  737. }
  738. default:
  739. reader.skipType(tag & 7);
  740. break;
  741. }
  742. }
  743. return message;
  744. };
  745. /**
  746. * Decodes an OrderVoPb message from the specified reader or buffer, length delimited.
  747. * @function decodeDelimited
  748. * @memberof type.googleapis.com.OrderVoPb
  749. * @static
  750. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  751. * @returns {type.googleapis.com.OrderVoPb} OrderVoPb
  752. * @throws {Error} If the payload is not a reader or valid buffer
  753. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  754. */
  755. OrderVoPb.decodeDelimited = function decodeDelimited(reader) {
  756. if (!(reader instanceof $Reader))
  757. reader = new $Reader(reader);
  758. return this.decode(reader, reader.uint32());
  759. };
  760. /**
  761. * Verifies an OrderVoPb message.
  762. * @function verify
  763. * @memberof type.googleapis.com.OrderVoPb
  764. * @static
  765. * @param {Object.<string,*>} message Plain object to verify
  766. * @returns {string|null} `null` if valid, otherwise the reason why it is not
  767. */
  768. OrderVoPb.verify = function verify(message) {
  769. if (typeof message !== "object" || message === null)
  770. return "object expected";
  771. if (message.price != null && message.hasOwnProperty("price"))
  772. if (!$util.isString(message.price))
  773. return "price: string expected";
  774. if (message.amount != null && message.hasOwnProperty("amount"))
  775. if (!$util.isString(message.amount))
  776. return "amount: string expected";
  777. if (message.side != null && message.hasOwnProperty("side"))
  778. if (!$util.isString(message.side))
  779. return "side: string expected";
  780. if (message.createddate != null && message.hasOwnProperty("createddate"))
  781. if (!$util.isInteger(message.createddate) && !(message.createddate && $util.isInteger(message.createddate.low) && $util.isInteger(message.createddate.high)))
  782. return "createddate: integer|Long expected";
  783. if (message.id != null && message.hasOwnProperty("id"))
  784. if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high)))
  785. return "id: integer|Long expected";
  786. return null;
  787. };
  788. /**
  789. * Creates an OrderVoPb message from a plain object. Also converts values to their respective internal types.
  790. * @function fromObject
  791. * @memberof type.googleapis.com.OrderVoPb
  792. * @static
  793. * @param {Object.<string,*>} object Plain object
  794. * @returns {type.googleapis.com.OrderVoPb} OrderVoPb
  795. */
  796. OrderVoPb.fromObject = function fromObject(object) {
  797. if (object instanceof $root.type.googleapis.com.OrderVoPb)
  798. return object;
  799. var message = new $root.type.googleapis.com.OrderVoPb();
  800. if (object.price != null)
  801. message.price = String(object.price);
  802. if (object.amount != null)
  803. message.amount = String(object.amount);
  804. if (object.side != null)
  805. message.side = String(object.side);
  806. if (object.createddate != null)
  807. if ($util.Long)
  808. (message.createddate = $util.Long.fromValue(object.createddate)).unsigned = false;
  809. else if (typeof object.createddate === "string")
  810. message.createddate = parseInt(object.createddate, 10);
  811. else if (typeof object.createddate === "number")
  812. message.createddate = object.createddate;
  813. else if (typeof object.createddate === "object")
  814. message.createddate = new $util.LongBits(object.createddate.low >>> 0, object.createddate.high >>> 0).toNumber();
  815. if (object.id != null)
  816. if ($util.Long)
  817. (message.id = $util.Long.fromValue(object.id)).unsigned = false;
  818. else if (typeof object.id === "string")
  819. message.id = parseInt(object.id, 10);
  820. else if (typeof object.id === "number")
  821. message.id = object.id;
  822. else if (typeof object.id === "object")
  823. message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber();
  824. return message;
  825. };
  826. /**
  827. * Creates a plain object from an OrderVoPb message. Also converts values to other types if specified.
  828. * @function toObject
  829. * @memberof type.googleapis.com.OrderVoPb
  830. * @static
  831. * @param {type.googleapis.com.OrderVoPb} message OrderVoPb
  832. * @param {$protobuf.IConversionOptions} [options] Conversion options
  833. * @returns {Object.<string,*>} Plain object
  834. */
  835. OrderVoPb.toObject = function toObject(message, options) {
  836. if (!options)
  837. options = {};
  838. var object = {};
  839. if (options.defaults) {
  840. object.price = "";
  841. object.amount = "";
  842. object.side = "";
  843. if ($util.Long) {
  844. var long = new $util.Long(0, 0, false);
  845. object.createddate = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
  846. } else
  847. object.createddate = options.longs === String ? "0" : 0;
  848. if ($util.Long) {
  849. var long = new $util.Long(0, 0, false);
  850. object.id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
  851. } else
  852. object.id = options.longs === String ? "0" : 0;
  853. }
  854. if (message.price != null && message.hasOwnProperty("price"))
  855. object.price = message.price;
  856. if (message.amount != null && message.hasOwnProperty("amount"))
  857. object.amount = message.amount;
  858. if (message.side != null && message.hasOwnProperty("side"))
  859. object.side = message.side;
  860. if (message.createddate != null && message.hasOwnProperty("createddate"))
  861. if (typeof message.createddate === "number")
  862. object.createddate = options.longs === String ? String(message.createddate) : message.createddate;
  863. else
  864. 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;
  865. if (message.id != null && message.hasOwnProperty("id"))
  866. if (typeof message.id === "number")
  867. object.id = options.longs === String ? String(message.id) : message.id;
  868. else
  869. 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;
  870. return object;
  871. };
  872. /**
  873. * Converts this OrderVoPb to JSON.
  874. * @function toJSON
  875. * @memberof type.googleapis.com.OrderVoPb
  876. * @instance
  877. * @returns {Object.<string,*>} JSON object
  878. */
  879. OrderVoPb.prototype.toJSON = function toJSON() {
  880. return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
  881. };
  882. /**
  883. * Gets the default type url for OrderVoPb
  884. * @function getTypeUrl
  885. * @memberof type.googleapis.com.OrderVoPb
  886. * @static
  887. * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
  888. * @returns {string} The default type url
  889. */
  890. OrderVoPb.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
  891. if (typeUrlPrefix === undefined) {
  892. typeUrlPrefix = "type.googleapis.com";
  893. }
  894. return typeUrlPrefix + "/type.googleapis.com.OrderVoPb";
  895. };
  896. return OrderVoPb;
  897. })();
  898. return com;
  899. })();
  900. return googleapis;
  901. })();
  902. return type;
  903. })();
  904. module.exports = $root;