type.googleapis.com.FundRatesPbMsg.js 63 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259
  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.IContractInfo|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.IContractInfo|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.ContractInfo.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.ContractInfo.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.ContractInfo.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.ContractInfo.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.ContractInfo.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.ContractInfo = (function() {
  594. /**
  595. * Properties of a ContractInfo.
  596. * @memberof type.googleapis.com
  597. * @interface IContractInfo
  598. * @property {string|null} [contractcode] ContractInfo contractcode
  599. * @property {string|null} [markprice] ContractInfo markprice
  600. * @property {string|null} [indexprice] ContractInfo indexprice
  601. * @property {string|null} [feeRate] ContractInfo feeRate
  602. * @property {string|null} [estimateFeeRate] ContractInfo estimateFeeRate
  603. * @property {number|Long|null} [nextLiquidationInterval] ContractInfo nextLiquidationInterval
  604. * @property {string|null} [totalPosition] ContractInfo totalPosition
  605. * @property {string|null} [indexCny] ContractInfo indexCny
  606. * @property {string|null} [markCny] ContractInfo markCny
  607. * @property {number|null} [env] ContractInfo env
  608. * @property {string|null} [base] ContractInfo base
  609. * @property {string|null} [indexBase] ContractInfo indexBase
  610. * @property {string|null} [quote] ContractInfo quote
  611. * @property {string|null} [baseDisplayName] ContractInfo baseDisplayName
  612. * @property {string|null} [indexBaseDisplayName] ContractInfo indexBaseDisplayName
  613. * @property {string|null} [quoteDisplayName] ContractInfo quoteDisplayName
  614. * @property {string|null} [preDeliveryPrice] ContractInfo preDeliveryPrice
  615. * @property {number|null} [online] ContractInfo online
  616. */
  617. /**
  618. * Constructs a new ContractInfo.
  619. * @memberof type.googleapis.com
  620. * @classdesc Represents a ContractInfo.
  621. * @implements IContractInfo
  622. * @constructor
  623. * @param {type.googleapis.com.IContractInfo=} [properties] Properties to set
  624. */
  625. function ContractInfo(properties) {
  626. if (properties)
  627. for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
  628. if (properties[keys[i]] != null)
  629. this[keys[i]] = properties[keys[i]];
  630. }
  631. /**
  632. * ContractInfo contractcode.
  633. * @member {string} contractcode
  634. * @memberof type.googleapis.com.ContractInfo
  635. * @instance
  636. */
  637. ContractInfo.prototype.contractcode = "";
  638. /**
  639. * ContractInfo markprice.
  640. * @member {string} markprice
  641. * @memberof type.googleapis.com.ContractInfo
  642. * @instance
  643. */
  644. ContractInfo.prototype.markprice = "";
  645. /**
  646. * ContractInfo indexprice.
  647. * @member {string} indexprice
  648. * @memberof type.googleapis.com.ContractInfo
  649. * @instance
  650. */
  651. ContractInfo.prototype.indexprice = "";
  652. /**
  653. * ContractInfo feeRate.
  654. * @member {string} feeRate
  655. * @memberof type.googleapis.com.ContractInfo
  656. * @instance
  657. */
  658. ContractInfo.prototype.feeRate = "";
  659. /**
  660. * ContractInfo estimateFeeRate.
  661. * @member {string} estimateFeeRate
  662. * @memberof type.googleapis.com.ContractInfo
  663. * @instance
  664. */
  665. ContractInfo.prototype.estimateFeeRate = "";
  666. /**
  667. * ContractInfo nextLiquidationInterval.
  668. * @member {number|Long} nextLiquidationInterval
  669. * @memberof type.googleapis.com.ContractInfo
  670. * @instance
  671. */
  672. ContractInfo.prototype.nextLiquidationInterval = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
  673. /**
  674. * ContractInfo totalPosition.
  675. * @member {string} totalPosition
  676. * @memberof type.googleapis.com.ContractInfo
  677. * @instance
  678. */
  679. ContractInfo.prototype.totalPosition = "";
  680. /**
  681. * ContractInfo indexCny.
  682. * @member {string} indexCny
  683. * @memberof type.googleapis.com.ContractInfo
  684. * @instance
  685. */
  686. ContractInfo.prototype.indexCny = "";
  687. /**
  688. * ContractInfo markCny.
  689. * @member {string} markCny
  690. * @memberof type.googleapis.com.ContractInfo
  691. * @instance
  692. */
  693. ContractInfo.prototype.markCny = "";
  694. /**
  695. * ContractInfo env.
  696. * @member {number} env
  697. * @memberof type.googleapis.com.ContractInfo
  698. * @instance
  699. */
  700. ContractInfo.prototype.env = 0;
  701. /**
  702. * ContractInfo base.
  703. * @member {string} base
  704. * @memberof type.googleapis.com.ContractInfo
  705. * @instance
  706. */
  707. ContractInfo.prototype.base = "";
  708. /**
  709. * ContractInfo indexBase.
  710. * @member {string} indexBase
  711. * @memberof type.googleapis.com.ContractInfo
  712. * @instance
  713. */
  714. ContractInfo.prototype.indexBase = "";
  715. /**
  716. * ContractInfo quote.
  717. * @member {string} quote
  718. * @memberof type.googleapis.com.ContractInfo
  719. * @instance
  720. */
  721. ContractInfo.prototype.quote = "";
  722. /**
  723. * ContractInfo baseDisplayName.
  724. * @member {string} baseDisplayName
  725. * @memberof type.googleapis.com.ContractInfo
  726. * @instance
  727. */
  728. ContractInfo.prototype.baseDisplayName = "";
  729. /**
  730. * ContractInfo indexBaseDisplayName.
  731. * @member {string} indexBaseDisplayName
  732. * @memberof type.googleapis.com.ContractInfo
  733. * @instance
  734. */
  735. ContractInfo.prototype.indexBaseDisplayName = "";
  736. /**
  737. * ContractInfo quoteDisplayName.
  738. * @member {string} quoteDisplayName
  739. * @memberof type.googleapis.com.ContractInfo
  740. * @instance
  741. */
  742. ContractInfo.prototype.quoteDisplayName = "";
  743. /**
  744. * ContractInfo preDeliveryPrice.
  745. * @member {string} preDeliveryPrice
  746. * @memberof type.googleapis.com.ContractInfo
  747. * @instance
  748. */
  749. ContractInfo.prototype.preDeliveryPrice = "";
  750. /**
  751. * ContractInfo online.
  752. * @member {number} online
  753. * @memberof type.googleapis.com.ContractInfo
  754. * @instance
  755. */
  756. ContractInfo.prototype.online = 0;
  757. /**
  758. * Creates a new ContractInfo instance using the specified properties.
  759. * @function create
  760. * @memberof type.googleapis.com.ContractInfo
  761. * @static
  762. * @param {type.googleapis.com.IContractInfo=} [properties] Properties to set
  763. * @returns {type.googleapis.com.ContractInfo} ContractInfo instance
  764. */
  765. ContractInfo.create = function create(properties) {
  766. return new ContractInfo(properties);
  767. };
  768. /**
  769. * Encodes the specified ContractInfo message. Does not implicitly {@link type.googleapis.com.ContractInfo.verify|verify} messages.
  770. * @function encode
  771. * @memberof type.googleapis.com.ContractInfo
  772. * @static
  773. * @param {type.googleapis.com.IContractInfo} message ContractInfo message or plain object to encode
  774. * @param {$protobuf.Writer} [writer] Writer to encode to
  775. * @returns {$protobuf.Writer} Writer
  776. */
  777. ContractInfo.encode = function encode(message, writer) {
  778. if (!writer)
  779. writer = $Writer.create();
  780. if (message.contractcode != null && Object.hasOwnProperty.call(message, "contractcode"))
  781. writer.uint32(/* id 1, wireType 2 =*/10).string(message.contractcode);
  782. if (message.markprice != null && Object.hasOwnProperty.call(message, "markprice"))
  783. writer.uint32(/* id 2, wireType 2 =*/18).string(message.markprice);
  784. if (message.indexprice != null && Object.hasOwnProperty.call(message, "indexprice"))
  785. writer.uint32(/* id 3, wireType 2 =*/26).string(message.indexprice);
  786. if (message.feeRate != null && Object.hasOwnProperty.call(message, "feeRate"))
  787. writer.uint32(/* id 4, wireType 2 =*/34).string(message.feeRate);
  788. if (message.estimateFeeRate != null && Object.hasOwnProperty.call(message, "estimateFeeRate"))
  789. writer.uint32(/* id 5, wireType 2 =*/42).string(message.estimateFeeRate);
  790. if (message.nextLiquidationInterval != null && Object.hasOwnProperty.call(message, "nextLiquidationInterval"))
  791. writer.uint32(/* id 6, wireType 0 =*/48).int64(message.nextLiquidationInterval);
  792. if (message.totalPosition != null && Object.hasOwnProperty.call(message, "totalPosition"))
  793. writer.uint32(/* id 7, wireType 2 =*/58).string(message.totalPosition);
  794. if (message.indexCny != null && Object.hasOwnProperty.call(message, "indexCny"))
  795. writer.uint32(/* id 8, wireType 2 =*/66).string(message.indexCny);
  796. if (message.markCny != null && Object.hasOwnProperty.call(message, "markCny"))
  797. writer.uint32(/* id 9, wireType 2 =*/74).string(message.markCny);
  798. if (message.env != null && Object.hasOwnProperty.call(message, "env"))
  799. writer.uint32(/* id 10, wireType 0 =*/80).int32(message.env);
  800. if (message.base != null && Object.hasOwnProperty.call(message, "base"))
  801. writer.uint32(/* id 11, wireType 2 =*/90).string(message.base);
  802. if (message.indexBase != null && Object.hasOwnProperty.call(message, "indexBase"))
  803. writer.uint32(/* id 12, wireType 2 =*/98).string(message.indexBase);
  804. if (message.quote != null && Object.hasOwnProperty.call(message, "quote"))
  805. writer.uint32(/* id 13, wireType 2 =*/106).string(message.quote);
  806. if (message.baseDisplayName != null && Object.hasOwnProperty.call(message, "baseDisplayName"))
  807. writer.uint32(/* id 14, wireType 2 =*/114).string(message.baseDisplayName);
  808. if (message.indexBaseDisplayName != null && Object.hasOwnProperty.call(message, "indexBaseDisplayName"))
  809. writer.uint32(/* id 15, wireType 2 =*/122).string(message.indexBaseDisplayName);
  810. if (message.quoteDisplayName != null && Object.hasOwnProperty.call(message, "quoteDisplayName"))
  811. writer.uint32(/* id 16, wireType 2 =*/130).string(message.quoteDisplayName);
  812. if (message.preDeliveryPrice != null && Object.hasOwnProperty.call(message, "preDeliveryPrice"))
  813. writer.uint32(/* id 17, wireType 2 =*/138).string(message.preDeliveryPrice);
  814. if (message.online != null && Object.hasOwnProperty.call(message, "online"))
  815. writer.uint32(/* id 18, wireType 0 =*/144).int32(message.online);
  816. return writer;
  817. };
  818. /**
  819. * Encodes the specified ContractInfo message, length delimited. Does not implicitly {@link type.googleapis.com.ContractInfo.verify|verify} messages.
  820. * @function encodeDelimited
  821. * @memberof type.googleapis.com.ContractInfo
  822. * @static
  823. * @param {type.googleapis.com.IContractInfo} message ContractInfo message or plain object to encode
  824. * @param {$protobuf.Writer} [writer] Writer to encode to
  825. * @returns {$protobuf.Writer} Writer
  826. */
  827. ContractInfo.encodeDelimited = function encodeDelimited(message, writer) {
  828. return this.encode(message, writer).ldelim();
  829. };
  830. /**
  831. * Decodes a ContractInfo message from the specified reader or buffer.
  832. * @function decode
  833. * @memberof type.googleapis.com.ContractInfo
  834. * @static
  835. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  836. * @param {number} [length] Message length if known beforehand
  837. * @returns {type.googleapis.com.ContractInfo} ContractInfo
  838. * @throws {Error} If the payload is not a reader or valid buffer
  839. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  840. */
  841. ContractInfo.decode = function decode(reader, length) {
  842. if (!(reader instanceof $Reader))
  843. reader = $Reader.create(reader);
  844. var end = length === undefined ? reader.len : reader.pos + length, message = new $root.type.googleapis.com.ContractInfo();
  845. while (reader.pos < end) {
  846. var tag = reader.uint32();
  847. switch (tag >>> 3) {
  848. case 1: {
  849. message.contractcode = reader.string();
  850. break;
  851. }
  852. case 2: {
  853. message.markprice = reader.string();
  854. break;
  855. }
  856. case 3: {
  857. message.indexprice = reader.string();
  858. break;
  859. }
  860. case 4: {
  861. message.feeRate = reader.string();
  862. break;
  863. }
  864. case 5: {
  865. message.estimateFeeRate = reader.string();
  866. break;
  867. }
  868. case 6: {
  869. message.nextLiquidationInterval = reader.int64();
  870. break;
  871. }
  872. case 7: {
  873. message.totalPosition = reader.string();
  874. break;
  875. }
  876. case 8: {
  877. message.indexCny = reader.string();
  878. break;
  879. }
  880. case 9: {
  881. message.markCny = reader.string();
  882. break;
  883. }
  884. case 10: {
  885. message.env = reader.int32();
  886. break;
  887. }
  888. case 11: {
  889. message.base = reader.string();
  890. break;
  891. }
  892. case 12: {
  893. message.indexBase = reader.string();
  894. break;
  895. }
  896. case 13: {
  897. message.quote = reader.string();
  898. break;
  899. }
  900. case 14: {
  901. message.baseDisplayName = reader.string();
  902. break;
  903. }
  904. case 15: {
  905. message.indexBaseDisplayName = reader.string();
  906. break;
  907. }
  908. case 16: {
  909. message.quoteDisplayName = reader.string();
  910. break;
  911. }
  912. case 17: {
  913. message.preDeliveryPrice = reader.string();
  914. break;
  915. }
  916. case 18: {
  917. message.online = reader.int32();
  918. break;
  919. }
  920. default:
  921. reader.skipType(tag & 7);
  922. break;
  923. }
  924. }
  925. return message;
  926. };
  927. /**
  928. * Decodes a ContractInfo message from the specified reader or buffer, length delimited.
  929. * @function decodeDelimited
  930. * @memberof type.googleapis.com.ContractInfo
  931. * @static
  932. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  933. * @returns {type.googleapis.com.ContractInfo} ContractInfo
  934. * @throws {Error} If the payload is not a reader or valid buffer
  935. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  936. */
  937. ContractInfo.decodeDelimited = function decodeDelimited(reader) {
  938. if (!(reader instanceof $Reader))
  939. reader = new $Reader(reader);
  940. return this.decode(reader, reader.uint32());
  941. };
  942. /**
  943. * Verifies a ContractInfo message.
  944. * @function verify
  945. * @memberof type.googleapis.com.ContractInfo
  946. * @static
  947. * @param {Object.<string,*>} message Plain object to verify
  948. * @returns {string|null} `null` if valid, otherwise the reason why it is not
  949. */
  950. ContractInfo.verify = function verify(message) {
  951. if (typeof message !== "object" || message === null)
  952. return "object expected";
  953. if (message.contractcode != null && message.hasOwnProperty("contractcode"))
  954. if (!$util.isString(message.contractcode))
  955. return "contractcode: string expected";
  956. if (message.markprice != null && message.hasOwnProperty("markprice"))
  957. if (!$util.isString(message.markprice))
  958. return "markprice: string expected";
  959. if (message.indexprice != null && message.hasOwnProperty("indexprice"))
  960. if (!$util.isString(message.indexprice))
  961. return "indexprice: string expected";
  962. if (message.feeRate != null && message.hasOwnProperty("feeRate"))
  963. if (!$util.isString(message.feeRate))
  964. return "feeRate: string expected";
  965. if (message.estimateFeeRate != null && message.hasOwnProperty("estimateFeeRate"))
  966. if (!$util.isString(message.estimateFeeRate))
  967. return "estimateFeeRate: string expected";
  968. if (message.nextLiquidationInterval != null && message.hasOwnProperty("nextLiquidationInterval"))
  969. if (!$util.isInteger(message.nextLiquidationInterval) && !(message.nextLiquidationInterval && $util.isInteger(message.nextLiquidationInterval.low) && $util.isInteger(message.nextLiquidationInterval.high)))
  970. return "nextLiquidationInterval: integer|Long expected";
  971. if (message.totalPosition != null && message.hasOwnProperty("totalPosition"))
  972. if (!$util.isString(message.totalPosition))
  973. return "totalPosition: string expected";
  974. if (message.indexCny != null && message.hasOwnProperty("indexCny"))
  975. if (!$util.isString(message.indexCny))
  976. return "indexCny: string expected";
  977. if (message.markCny != null && message.hasOwnProperty("markCny"))
  978. if (!$util.isString(message.markCny))
  979. return "markCny: string expected";
  980. if (message.env != null && message.hasOwnProperty("env"))
  981. if (!$util.isInteger(message.env))
  982. return "env: integer expected";
  983. if (message.base != null && message.hasOwnProperty("base"))
  984. if (!$util.isString(message.base))
  985. return "base: string expected";
  986. if (message.indexBase != null && message.hasOwnProperty("indexBase"))
  987. if (!$util.isString(message.indexBase))
  988. return "indexBase: string expected";
  989. if (message.quote != null && message.hasOwnProperty("quote"))
  990. if (!$util.isString(message.quote))
  991. return "quote: string expected";
  992. if (message.baseDisplayName != null && message.hasOwnProperty("baseDisplayName"))
  993. if (!$util.isString(message.baseDisplayName))
  994. return "baseDisplayName: string expected";
  995. if (message.indexBaseDisplayName != null && message.hasOwnProperty("indexBaseDisplayName"))
  996. if (!$util.isString(message.indexBaseDisplayName))
  997. return "indexBaseDisplayName: string expected";
  998. if (message.quoteDisplayName != null && message.hasOwnProperty("quoteDisplayName"))
  999. if (!$util.isString(message.quoteDisplayName))
  1000. return "quoteDisplayName: string expected";
  1001. if (message.preDeliveryPrice != null && message.hasOwnProperty("preDeliveryPrice"))
  1002. if (!$util.isString(message.preDeliveryPrice))
  1003. return "preDeliveryPrice: string expected";
  1004. if (message.online != null && message.hasOwnProperty("online"))
  1005. if (!$util.isInteger(message.online))
  1006. return "online: integer expected";
  1007. return null;
  1008. };
  1009. /**
  1010. * Creates a ContractInfo message from a plain object. Also converts values to their respective internal types.
  1011. * @function fromObject
  1012. * @memberof type.googleapis.com.ContractInfo
  1013. * @static
  1014. * @param {Object.<string,*>} object Plain object
  1015. * @returns {type.googleapis.com.ContractInfo} ContractInfo
  1016. */
  1017. ContractInfo.fromObject = function fromObject(object) {
  1018. if (object instanceof $root.type.googleapis.com.ContractInfo)
  1019. return object;
  1020. var message = new $root.type.googleapis.com.ContractInfo();
  1021. if (object.contractcode != null)
  1022. message.contractcode = String(object.contractcode);
  1023. if (object.markprice != null)
  1024. message.markprice = String(object.markprice);
  1025. if (object.indexprice != null)
  1026. message.indexprice = String(object.indexprice);
  1027. if (object.feeRate != null)
  1028. message.feeRate = String(object.feeRate);
  1029. if (object.estimateFeeRate != null)
  1030. message.estimateFeeRate = String(object.estimateFeeRate);
  1031. if (object.nextLiquidationInterval != null)
  1032. if ($util.Long)
  1033. (message.nextLiquidationInterval = $util.Long.fromValue(object.nextLiquidationInterval)).unsigned = false;
  1034. else if (typeof object.nextLiquidationInterval === "string")
  1035. message.nextLiquidationInterval = parseInt(object.nextLiquidationInterval, 10);
  1036. else if (typeof object.nextLiquidationInterval === "number")
  1037. message.nextLiquidationInterval = object.nextLiquidationInterval;
  1038. else if (typeof object.nextLiquidationInterval === "object")
  1039. message.nextLiquidationInterval = new $util.LongBits(object.nextLiquidationInterval.low >>> 0, object.nextLiquidationInterval.high >>> 0).toNumber();
  1040. if (object.totalPosition != null)
  1041. message.totalPosition = String(object.totalPosition);
  1042. if (object.indexCny != null)
  1043. message.indexCny = String(object.indexCny);
  1044. if (object.markCny != null)
  1045. message.markCny = String(object.markCny);
  1046. if (object.env != null)
  1047. message.env = object.env | 0;
  1048. if (object.base != null)
  1049. message.base = String(object.base);
  1050. if (object.indexBase != null)
  1051. message.indexBase = String(object.indexBase);
  1052. if (object.quote != null)
  1053. message.quote = String(object.quote);
  1054. if (object.baseDisplayName != null)
  1055. message.baseDisplayName = String(object.baseDisplayName);
  1056. if (object.indexBaseDisplayName != null)
  1057. message.indexBaseDisplayName = String(object.indexBaseDisplayName);
  1058. if (object.quoteDisplayName != null)
  1059. message.quoteDisplayName = String(object.quoteDisplayName);
  1060. if (object.preDeliveryPrice != null)
  1061. message.preDeliveryPrice = String(object.preDeliveryPrice);
  1062. if (object.online != null)
  1063. message.online = object.online | 0;
  1064. return message;
  1065. };
  1066. /**
  1067. * Creates a plain object from a ContractInfo message. Also converts values to other types if specified.
  1068. * @function toObject
  1069. * @memberof type.googleapis.com.ContractInfo
  1070. * @static
  1071. * @param {type.googleapis.com.ContractInfo} message ContractInfo
  1072. * @param {$protobuf.IConversionOptions} [options] Conversion options
  1073. * @returns {Object.<string,*>} Plain object
  1074. */
  1075. ContractInfo.toObject = function toObject(message, options) {
  1076. if (!options)
  1077. options = {};
  1078. var object = {};
  1079. if (options.defaults) {
  1080. object.contractcode = "";
  1081. object.markprice = "";
  1082. object.indexprice = "";
  1083. object.feeRate = "";
  1084. object.estimateFeeRate = "";
  1085. if ($util.Long) {
  1086. var long = new $util.Long(0, 0, false);
  1087. object.nextLiquidationInterval = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
  1088. } else
  1089. object.nextLiquidationInterval = options.longs === String ? "0" : 0;
  1090. object.totalPosition = "";
  1091. object.indexCny = "";
  1092. object.markCny = "";
  1093. object.env = 0;
  1094. object.base = "";
  1095. object.indexBase = "";
  1096. object.quote = "";
  1097. object.baseDisplayName = "";
  1098. object.indexBaseDisplayName = "";
  1099. object.quoteDisplayName = "";
  1100. object.preDeliveryPrice = "";
  1101. object.online = 0;
  1102. }
  1103. if (message.contractcode != null && message.hasOwnProperty("contractcode"))
  1104. object.contractcode = message.contractcode;
  1105. if (message.markprice != null && message.hasOwnProperty("markprice"))
  1106. object.markprice = message.markprice;
  1107. if (message.indexprice != null && message.hasOwnProperty("indexprice"))
  1108. object.indexprice = message.indexprice;
  1109. if (message.feeRate != null && message.hasOwnProperty("feeRate"))
  1110. object.feeRate = message.feeRate;
  1111. if (message.estimateFeeRate != null && message.hasOwnProperty("estimateFeeRate"))
  1112. object.estimateFeeRate = message.estimateFeeRate;
  1113. if (message.nextLiquidationInterval != null && message.hasOwnProperty("nextLiquidationInterval"))
  1114. if (typeof message.nextLiquidationInterval === "number")
  1115. object.nextLiquidationInterval = options.longs === String ? String(message.nextLiquidationInterval) : message.nextLiquidationInterval;
  1116. else
  1117. object.nextLiquidationInterval = options.longs === String ? $util.Long.prototype.toString.call(message.nextLiquidationInterval) : options.longs === Number ? new $util.LongBits(message.nextLiquidationInterval.low >>> 0, message.nextLiquidationInterval.high >>> 0).toNumber() : message.nextLiquidationInterval;
  1118. if (message.totalPosition != null && message.hasOwnProperty("totalPosition"))
  1119. object.totalPosition = message.totalPosition;
  1120. if (message.indexCny != null && message.hasOwnProperty("indexCny"))
  1121. object.indexCny = message.indexCny;
  1122. if (message.markCny != null && message.hasOwnProperty("markCny"))
  1123. object.markCny = message.markCny;
  1124. if (message.env != null && message.hasOwnProperty("env"))
  1125. object.env = message.env;
  1126. if (message.base != null && message.hasOwnProperty("base"))
  1127. object.base = message.base;
  1128. if (message.indexBase != null && message.hasOwnProperty("indexBase"))
  1129. object.indexBase = message.indexBase;
  1130. if (message.quote != null && message.hasOwnProperty("quote"))
  1131. object.quote = message.quote;
  1132. if (message.baseDisplayName != null && message.hasOwnProperty("baseDisplayName"))
  1133. object.baseDisplayName = message.baseDisplayName;
  1134. if (message.indexBaseDisplayName != null && message.hasOwnProperty("indexBaseDisplayName"))
  1135. object.indexBaseDisplayName = message.indexBaseDisplayName;
  1136. if (message.quoteDisplayName != null && message.hasOwnProperty("quoteDisplayName"))
  1137. object.quoteDisplayName = message.quoteDisplayName;
  1138. if (message.preDeliveryPrice != null && message.hasOwnProperty("preDeliveryPrice"))
  1139. object.preDeliveryPrice = message.preDeliveryPrice;
  1140. if (message.online != null && message.hasOwnProperty("online"))
  1141. object.online = message.online;
  1142. return object;
  1143. };
  1144. /**
  1145. * Converts this ContractInfo to JSON.
  1146. * @function toJSON
  1147. * @memberof type.googleapis.com.ContractInfo
  1148. * @instance
  1149. * @returns {Object.<string,*>} JSON object
  1150. */
  1151. ContractInfo.prototype.toJSON = function toJSON() {
  1152. return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
  1153. };
  1154. /**
  1155. * Gets the default type url for ContractInfo
  1156. * @function getTypeUrl
  1157. * @memberof type.googleapis.com.ContractInfo
  1158. * @static
  1159. * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
  1160. * @returns {string} The default type url
  1161. */
  1162. ContractInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
  1163. if (typeUrlPrefix === undefined) {
  1164. typeUrlPrefix = "type.googleapis.com";
  1165. }
  1166. return typeUrlPrefix + "/type.googleapis.com.ContractInfo";
  1167. };
  1168. return ContractInfo;
  1169. })();
  1170. return com;
  1171. })();
  1172. return googleapis;
  1173. })();
  1174. return type;
  1175. })();
  1176. module.exports = $root;