Source: proto/spine/time/time_pb.js

  1. // source: spine/time/time.proto
  2. /**
  3. * @fileoverview
  4. * @enhanceable
  5. * @suppress {messageConventions} JS Compiler reports an error if a variable or
  6. * field starts with 'MSG_' and isn't a translatable message.
  7. * @public
  8. */
  9. // GENERATED CODE -- DO NOT EDIT!
  10. var jspb = require('google-protobuf');
  11. var goog = jspb;
  12. var global = Function('return this')();
  13. var spine_options_pb = require('../../spine/options_pb.js');
  14. goog.object.extend(proto, spine_options_pb);
  15. var google_protobuf_timestamp_pb = require('../../google/protobuf/timestamp_pb.js');
  16. goog.object.extend(proto, google_protobuf_timestamp_pb);
  17. goog.exportSymbol('proto.spine.time.DayOfWeek', null, global);
  18. goog.exportSymbol('proto.spine.time.LocalDate', null, global);
  19. goog.exportSymbol('proto.spine.time.LocalDateTime', null, global);
  20. goog.exportSymbol('proto.spine.time.LocalTime', null, global);
  21. goog.exportSymbol('proto.spine.time.Month', null, global);
  22. goog.exportSymbol('proto.spine.time.OffsetDateTime', null, global);
  23. goog.exportSymbol('proto.spine.time.OffsetTime', null, global);
  24. goog.exportSymbol('proto.spine.time.YearMonth', null, global);
  25. goog.exportSymbol('proto.spine.time.ZoneId', null, global);
  26. goog.exportSymbol('proto.spine.time.ZoneOffset', null, global);
  27. goog.exportSymbol('proto.spine.time.ZonedDateTime', null, global);
  28. /**
  29. * Generated by JsPbCodeGenerator.
  30. * @param {Array=} opt_data Optional initial data array, typically from a
  31. * server response, or constructed directly in Javascript. The array is used
  32. * in place and becomes part of the constructed object. It is not cloned.
  33. * If no data is provided, the constructed object will be empty, but still
  34. * valid.
  35. * @extends {jspb.Message}
  36. * @constructor
  37. */
  38. proto.spine.time.YearMonth = function(opt_data) {
  39. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  40. };
  41. goog.inherits(proto.spine.time.YearMonth, jspb.Message);
  42. if (goog.DEBUG && !COMPILED) {
  43. /**
  44. * @public
  45. * @override
  46. */
  47. proto.spine.time.YearMonth.displayName = 'proto.spine.time.YearMonth';
  48. }
  49. /**
  50. * Generated by JsPbCodeGenerator.
  51. * @param {Array=} opt_data Optional initial data array, typically from a
  52. * server response, or constructed directly in Javascript. The array is used
  53. * in place and becomes part of the constructed object. It is not cloned.
  54. * If no data is provided, the constructed object will be empty, but still
  55. * valid.
  56. * @extends {jspb.Message}
  57. * @constructor
  58. */
  59. proto.spine.time.LocalDate = function(opt_data) {
  60. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  61. };
  62. goog.inherits(proto.spine.time.LocalDate, jspb.Message);
  63. if (goog.DEBUG && !COMPILED) {
  64. /**
  65. * @public
  66. * @override
  67. */
  68. proto.spine.time.LocalDate.displayName = 'proto.spine.time.LocalDate';
  69. }
  70. /**
  71. * Generated by JsPbCodeGenerator.
  72. * @param {Array=} opt_data Optional initial data array, typically from a
  73. * server response, or constructed directly in Javascript. The array is used
  74. * in place and becomes part of the constructed object. It is not cloned.
  75. * If no data is provided, the constructed object will be empty, but still
  76. * valid.
  77. * @extends {jspb.Message}
  78. * @constructor
  79. */
  80. proto.spine.time.LocalTime = function(opt_data) {
  81. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  82. };
  83. goog.inherits(proto.spine.time.LocalTime, jspb.Message);
  84. if (goog.DEBUG && !COMPILED) {
  85. /**
  86. * @public
  87. * @override
  88. */
  89. proto.spine.time.LocalTime.displayName = 'proto.spine.time.LocalTime';
  90. }
  91. /**
  92. * Generated by JsPbCodeGenerator.
  93. * @param {Array=} opt_data Optional initial data array, typically from a
  94. * server response, or constructed directly in Javascript. The array is used
  95. * in place and becomes part of the constructed object. It is not cloned.
  96. * If no data is provided, the constructed object will be empty, but still
  97. * valid.
  98. * @extends {jspb.Message}
  99. * @constructor
  100. */
  101. proto.spine.time.LocalDateTime = function(opt_data) {
  102. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  103. };
  104. goog.inherits(proto.spine.time.LocalDateTime, jspb.Message);
  105. if (goog.DEBUG && !COMPILED) {
  106. /**
  107. * @public
  108. * @override
  109. */
  110. proto.spine.time.LocalDateTime.displayName = 'proto.spine.time.LocalDateTime';
  111. }
  112. /**
  113. * Generated by JsPbCodeGenerator.
  114. * @param {Array=} opt_data Optional initial data array, typically from a
  115. * server response, or constructed directly in Javascript. The array is used
  116. * in place and becomes part of the constructed object. It is not cloned.
  117. * If no data is provided, the constructed object will be empty, but still
  118. * valid.
  119. * @extends {jspb.Message}
  120. * @constructor
  121. */
  122. proto.spine.time.ZoneOffset = function(opt_data) {
  123. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  124. };
  125. goog.inherits(proto.spine.time.ZoneOffset, jspb.Message);
  126. if (goog.DEBUG && !COMPILED) {
  127. /**
  128. * @public
  129. * @override
  130. */
  131. proto.spine.time.ZoneOffset.displayName = 'proto.spine.time.ZoneOffset';
  132. }
  133. /**
  134. * Generated by JsPbCodeGenerator.
  135. * @param {Array=} opt_data Optional initial data array, typically from a
  136. * server response, or constructed directly in Javascript. The array is used
  137. * in place and becomes part of the constructed object. It is not cloned.
  138. * If no data is provided, the constructed object will be empty, but still
  139. * valid.
  140. * @extends {jspb.Message}
  141. * @constructor
  142. */
  143. proto.spine.time.OffsetTime = function(opt_data) {
  144. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  145. };
  146. goog.inherits(proto.spine.time.OffsetTime, jspb.Message);
  147. if (goog.DEBUG && !COMPILED) {
  148. /**
  149. * @public
  150. * @override
  151. */
  152. proto.spine.time.OffsetTime.displayName = 'proto.spine.time.OffsetTime';
  153. }
  154. /**
  155. * Generated by JsPbCodeGenerator.
  156. * @param {Array=} opt_data Optional initial data array, typically from a
  157. * server response, or constructed directly in Javascript. The array is used
  158. * in place and becomes part of the constructed object. It is not cloned.
  159. * If no data is provided, the constructed object will be empty, but still
  160. * valid.
  161. * @extends {jspb.Message}
  162. * @constructor
  163. */
  164. proto.spine.time.OffsetDateTime = function(opt_data) {
  165. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  166. };
  167. goog.inherits(proto.spine.time.OffsetDateTime, jspb.Message);
  168. if (goog.DEBUG && !COMPILED) {
  169. /**
  170. * @public
  171. * @override
  172. */
  173. proto.spine.time.OffsetDateTime.displayName = 'proto.spine.time.OffsetDateTime';
  174. }
  175. /**
  176. * Generated by JsPbCodeGenerator.
  177. * @param {Array=} opt_data Optional initial data array, typically from a
  178. * server response, or constructed directly in Javascript. The array is used
  179. * in place and becomes part of the constructed object. It is not cloned.
  180. * If no data is provided, the constructed object will be empty, but still
  181. * valid.
  182. * @extends {jspb.Message}
  183. * @constructor
  184. */
  185. proto.spine.time.ZoneId = function(opt_data) {
  186. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  187. };
  188. goog.inherits(proto.spine.time.ZoneId, jspb.Message);
  189. if (goog.DEBUG && !COMPILED) {
  190. /**
  191. * @public
  192. * @override
  193. */
  194. proto.spine.time.ZoneId.displayName = 'proto.spine.time.ZoneId';
  195. }
  196. /**
  197. * Generated by JsPbCodeGenerator.
  198. * @param {Array=} opt_data Optional initial data array, typically from a
  199. * server response, or constructed directly in Javascript. The array is used
  200. * in place and becomes part of the constructed object. It is not cloned.
  201. * If no data is provided, the constructed object will be empty, but still
  202. * valid.
  203. * @extends {jspb.Message}
  204. * @constructor
  205. */
  206. proto.spine.time.ZonedDateTime = function(opt_data) {
  207. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  208. };
  209. goog.inherits(proto.spine.time.ZonedDateTime, jspb.Message);
  210. if (goog.DEBUG && !COMPILED) {
  211. /**
  212. * @public
  213. * @override
  214. */
  215. proto.spine.time.ZonedDateTime.displayName = 'proto.spine.time.ZonedDateTime';
  216. }
  217. if (jspb.Message.GENERATE_TO_OBJECT) {
  218. /**
  219. * Creates an object representation of this proto.
  220. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  221. * Optional fields that are not set will be set to undefined.
  222. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  223. * For the list of reserved names please see:
  224. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  225. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  226. * JSPB instance for transitional soy proto support:
  227. * http://goto/soy-param-migration
  228. * @return {!Object}
  229. */
  230. proto.spine.time.YearMonth.prototype.toObject = function(opt_includeInstance) {
  231. return proto.spine.time.YearMonth.toObject(opt_includeInstance, this);
  232. };
  233. /**
  234. * Static version of the {@see toObject} method.
  235. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  236. * the JSPB instance for transitional soy proto support:
  237. * http://goto/soy-param-migration
  238. * @param {!proto.spine.time.YearMonth} msg The msg instance to transform.
  239. * @return {!Object}
  240. * @suppress {unusedLocalVariables} f is only used for nested messages
  241. */
  242. proto.spine.time.YearMonth.toObject = function(includeInstance, msg) {
  243. var f, obj = {
  244. year: jspb.Message.getFieldWithDefault(msg, 1, 0),
  245. month: jspb.Message.getFieldWithDefault(msg, 2, 0)
  246. };
  247. if (includeInstance) {
  248. obj.$jspbMessageInstance = msg;
  249. }
  250. return obj;
  251. };
  252. }
  253. /**
  254. * Deserializes binary data (in protobuf wire format).
  255. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  256. * @return {!proto.spine.time.YearMonth}
  257. */
  258. proto.spine.time.YearMonth.deserializeBinary = function(bytes) {
  259. var reader = new jspb.BinaryReader(bytes);
  260. var msg = new proto.spine.time.YearMonth;
  261. return proto.spine.time.YearMonth.deserializeBinaryFromReader(msg, reader);
  262. };
  263. /**
  264. * Deserializes binary data (in protobuf wire format) from the
  265. * given reader into the given message object.
  266. * @param {!proto.spine.time.YearMonth} msg The message object to deserialize into.
  267. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  268. * @return {!proto.spine.time.YearMonth}
  269. */
  270. proto.spine.time.YearMonth.deserializeBinaryFromReader = function(msg, reader) {
  271. while (reader.nextField()) {
  272. if (reader.isEndGroup()) {
  273. break;
  274. }
  275. var field = reader.getFieldNumber();
  276. switch (field) {
  277. case 1:
  278. var value = /** @type {number} */ (reader.readInt32());
  279. msg.setYear(value);
  280. break;
  281. case 2:
  282. var value = /** @type {!proto.spine.time.Month} */ (reader.readEnum());
  283. msg.setMonth(value);
  284. break;
  285. default:
  286. reader.skipField();
  287. break;
  288. }
  289. }
  290. return msg;
  291. };
  292. /**
  293. * Serializes the message to binary data (in protobuf wire format).
  294. * @return {!Uint8Array}
  295. */
  296. proto.spine.time.YearMonth.prototype.serializeBinary = function() {
  297. var writer = new jspb.BinaryWriter();
  298. proto.spine.time.YearMonth.serializeBinaryToWriter(this, writer);
  299. return writer.getResultBuffer();
  300. };
  301. /**
  302. * Serializes the given message to binary data (in protobuf wire
  303. * format), writing to the given BinaryWriter.
  304. * @param {!proto.spine.time.YearMonth} message
  305. * @param {!jspb.BinaryWriter} writer
  306. * @suppress {unusedLocalVariables} f is only used for nested messages
  307. */
  308. proto.spine.time.YearMonth.serializeBinaryToWriter = function(message, writer) {
  309. var f = undefined;
  310. f = message.getYear();
  311. if (f !== 0) {
  312. writer.writeInt32(
  313. 1,
  314. f
  315. );
  316. }
  317. f = message.getMonth();
  318. if (f !== 0.0) {
  319. writer.writeEnum(
  320. 2,
  321. f
  322. );
  323. }
  324. };
  325. /**
  326. * optional int32 year = 1;
  327. * @return {number}
  328. */
  329. proto.spine.time.YearMonth.prototype.getYear = function() {
  330. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
  331. };
  332. /**
  333. * @param {number} value
  334. * @return {!proto.spine.time.YearMonth} returns this
  335. */
  336. proto.spine.time.YearMonth.prototype.setYear = function(value) {
  337. return jspb.Message.setProto3IntField(this, 1, value);
  338. };
  339. /**
  340. * optional Month month = 2;
  341. * @return {!proto.spine.time.Month}
  342. */
  343. proto.spine.time.YearMonth.prototype.getMonth = function() {
  344. return /** @type {!proto.spine.time.Month} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
  345. };
  346. /**
  347. * @param {!proto.spine.time.Month} value
  348. * @return {!proto.spine.time.YearMonth} returns this
  349. */
  350. proto.spine.time.YearMonth.prototype.setMonth = function(value) {
  351. return jspb.Message.setProto3EnumField(this, 2, value);
  352. };
  353. if (jspb.Message.GENERATE_TO_OBJECT) {
  354. /**
  355. * Creates an object representation of this proto.
  356. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  357. * Optional fields that are not set will be set to undefined.
  358. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  359. * For the list of reserved names please see:
  360. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  361. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  362. * JSPB instance for transitional soy proto support:
  363. * http://goto/soy-param-migration
  364. * @return {!Object}
  365. */
  366. proto.spine.time.LocalDate.prototype.toObject = function(opt_includeInstance) {
  367. return proto.spine.time.LocalDate.toObject(opt_includeInstance, this);
  368. };
  369. /**
  370. * Static version of the {@see toObject} method.
  371. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  372. * the JSPB instance for transitional soy proto support:
  373. * http://goto/soy-param-migration
  374. * @param {!proto.spine.time.LocalDate} msg The msg instance to transform.
  375. * @return {!Object}
  376. * @suppress {unusedLocalVariables} f is only used for nested messages
  377. */
  378. proto.spine.time.LocalDate.toObject = function(includeInstance, msg) {
  379. var f, obj = {
  380. year: jspb.Message.getFieldWithDefault(msg, 1, 0),
  381. month: jspb.Message.getFieldWithDefault(msg, 2, 0),
  382. day: jspb.Message.getFieldWithDefault(msg, 3, 0)
  383. };
  384. if (includeInstance) {
  385. obj.$jspbMessageInstance = msg;
  386. }
  387. return obj;
  388. };
  389. }
  390. /**
  391. * Deserializes binary data (in protobuf wire format).
  392. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  393. * @return {!proto.spine.time.LocalDate}
  394. */
  395. proto.spine.time.LocalDate.deserializeBinary = function(bytes) {
  396. var reader = new jspb.BinaryReader(bytes);
  397. var msg = new proto.spine.time.LocalDate;
  398. return proto.spine.time.LocalDate.deserializeBinaryFromReader(msg, reader);
  399. };
  400. /**
  401. * Deserializes binary data (in protobuf wire format) from the
  402. * given reader into the given message object.
  403. * @param {!proto.spine.time.LocalDate} msg The message object to deserialize into.
  404. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  405. * @return {!proto.spine.time.LocalDate}
  406. */
  407. proto.spine.time.LocalDate.deserializeBinaryFromReader = function(msg, reader) {
  408. while (reader.nextField()) {
  409. if (reader.isEndGroup()) {
  410. break;
  411. }
  412. var field = reader.getFieldNumber();
  413. switch (field) {
  414. case 1:
  415. var value = /** @type {number} */ (reader.readInt32());
  416. msg.setYear(value);
  417. break;
  418. case 2:
  419. var value = /** @type {!proto.spine.time.Month} */ (reader.readEnum());
  420. msg.setMonth(value);
  421. break;
  422. case 3:
  423. var value = /** @type {number} */ (reader.readInt32());
  424. msg.setDay(value);
  425. break;
  426. default:
  427. reader.skipField();
  428. break;
  429. }
  430. }
  431. return msg;
  432. };
  433. /**
  434. * Serializes the message to binary data (in protobuf wire format).
  435. * @return {!Uint8Array}
  436. */
  437. proto.spine.time.LocalDate.prototype.serializeBinary = function() {
  438. var writer = new jspb.BinaryWriter();
  439. proto.spine.time.LocalDate.serializeBinaryToWriter(this, writer);
  440. return writer.getResultBuffer();
  441. };
  442. /**
  443. * Serializes the given message to binary data (in protobuf wire
  444. * format), writing to the given BinaryWriter.
  445. * @param {!proto.spine.time.LocalDate} message
  446. * @param {!jspb.BinaryWriter} writer
  447. * @suppress {unusedLocalVariables} f is only used for nested messages
  448. */
  449. proto.spine.time.LocalDate.serializeBinaryToWriter = function(message, writer) {
  450. var f = undefined;
  451. f = message.getYear();
  452. if (f !== 0) {
  453. writer.writeInt32(
  454. 1,
  455. f
  456. );
  457. }
  458. f = message.getMonth();
  459. if (f !== 0.0) {
  460. writer.writeEnum(
  461. 2,
  462. f
  463. );
  464. }
  465. f = message.getDay();
  466. if (f !== 0) {
  467. writer.writeInt32(
  468. 3,
  469. f
  470. );
  471. }
  472. };
  473. /**
  474. * optional int32 year = 1;
  475. * @return {number}
  476. */
  477. proto.spine.time.LocalDate.prototype.getYear = function() {
  478. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
  479. };
  480. /**
  481. * @param {number} value
  482. * @return {!proto.spine.time.LocalDate} returns this
  483. */
  484. proto.spine.time.LocalDate.prototype.setYear = function(value) {
  485. return jspb.Message.setProto3IntField(this, 1, value);
  486. };
  487. /**
  488. * optional Month month = 2;
  489. * @return {!proto.spine.time.Month}
  490. */
  491. proto.spine.time.LocalDate.prototype.getMonth = function() {
  492. return /** @type {!proto.spine.time.Month} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
  493. };
  494. /**
  495. * @param {!proto.spine.time.Month} value
  496. * @return {!proto.spine.time.LocalDate} returns this
  497. */
  498. proto.spine.time.LocalDate.prototype.setMonth = function(value) {
  499. return jspb.Message.setProto3EnumField(this, 2, value);
  500. };
  501. /**
  502. * optional int32 day = 3;
  503. * @return {number}
  504. */
  505. proto.spine.time.LocalDate.prototype.getDay = function() {
  506. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
  507. };
  508. /**
  509. * @param {number} value
  510. * @return {!proto.spine.time.LocalDate} returns this
  511. */
  512. proto.spine.time.LocalDate.prototype.setDay = function(value) {
  513. return jspb.Message.setProto3IntField(this, 3, value);
  514. };
  515. if (jspb.Message.GENERATE_TO_OBJECT) {
  516. /**
  517. * Creates an object representation of this proto.
  518. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  519. * Optional fields that are not set will be set to undefined.
  520. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  521. * For the list of reserved names please see:
  522. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  523. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  524. * JSPB instance for transitional soy proto support:
  525. * http://goto/soy-param-migration
  526. * @return {!Object}
  527. */
  528. proto.spine.time.LocalTime.prototype.toObject = function(opt_includeInstance) {
  529. return proto.spine.time.LocalTime.toObject(opt_includeInstance, this);
  530. };
  531. /**
  532. * Static version of the {@see toObject} method.
  533. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  534. * the JSPB instance for transitional soy proto support:
  535. * http://goto/soy-param-migration
  536. * @param {!proto.spine.time.LocalTime} msg The msg instance to transform.
  537. * @return {!Object}
  538. * @suppress {unusedLocalVariables} f is only used for nested messages
  539. */
  540. proto.spine.time.LocalTime.toObject = function(includeInstance, msg) {
  541. var f, obj = {
  542. hour: jspb.Message.getFieldWithDefault(msg, 1, 0),
  543. minute: jspb.Message.getFieldWithDefault(msg, 2, 0),
  544. second: jspb.Message.getFieldWithDefault(msg, 3, 0),
  545. nano: jspb.Message.getFieldWithDefault(msg, 4, 0)
  546. };
  547. if (includeInstance) {
  548. obj.$jspbMessageInstance = msg;
  549. }
  550. return obj;
  551. };
  552. }
  553. /**
  554. * Deserializes binary data (in protobuf wire format).
  555. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  556. * @return {!proto.spine.time.LocalTime}
  557. */
  558. proto.spine.time.LocalTime.deserializeBinary = function(bytes) {
  559. var reader = new jspb.BinaryReader(bytes);
  560. var msg = new proto.spine.time.LocalTime;
  561. return proto.spine.time.LocalTime.deserializeBinaryFromReader(msg, reader);
  562. };
  563. /**
  564. * Deserializes binary data (in protobuf wire format) from the
  565. * given reader into the given message object.
  566. * @param {!proto.spine.time.LocalTime} msg The message object to deserialize into.
  567. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  568. * @return {!proto.spine.time.LocalTime}
  569. */
  570. proto.spine.time.LocalTime.deserializeBinaryFromReader = function(msg, reader) {
  571. while (reader.nextField()) {
  572. if (reader.isEndGroup()) {
  573. break;
  574. }
  575. var field = reader.getFieldNumber();
  576. switch (field) {
  577. case 1:
  578. var value = /** @type {number} */ (reader.readInt32());
  579. msg.setHour(value);
  580. break;
  581. case 2:
  582. var value = /** @type {number} */ (reader.readInt32());
  583. msg.setMinute(value);
  584. break;
  585. case 3:
  586. var value = /** @type {number} */ (reader.readInt32());
  587. msg.setSecond(value);
  588. break;
  589. case 4:
  590. var value = /** @type {number} */ (reader.readInt32());
  591. msg.setNano(value);
  592. break;
  593. default:
  594. reader.skipField();
  595. break;
  596. }
  597. }
  598. return msg;
  599. };
  600. /**
  601. * Serializes the message to binary data (in protobuf wire format).
  602. * @return {!Uint8Array}
  603. */
  604. proto.spine.time.LocalTime.prototype.serializeBinary = function() {
  605. var writer = new jspb.BinaryWriter();
  606. proto.spine.time.LocalTime.serializeBinaryToWriter(this, writer);
  607. return writer.getResultBuffer();
  608. };
  609. /**
  610. * Serializes the given message to binary data (in protobuf wire
  611. * format), writing to the given BinaryWriter.
  612. * @param {!proto.spine.time.LocalTime} message
  613. * @param {!jspb.BinaryWriter} writer
  614. * @suppress {unusedLocalVariables} f is only used for nested messages
  615. */
  616. proto.spine.time.LocalTime.serializeBinaryToWriter = function(message, writer) {
  617. var f = undefined;
  618. f = message.getHour();
  619. if (f !== 0) {
  620. writer.writeInt32(
  621. 1,
  622. f
  623. );
  624. }
  625. f = message.getMinute();
  626. if (f !== 0) {
  627. writer.writeInt32(
  628. 2,
  629. f
  630. );
  631. }
  632. f = message.getSecond();
  633. if (f !== 0) {
  634. writer.writeInt32(
  635. 3,
  636. f
  637. );
  638. }
  639. f = message.getNano();
  640. if (f !== 0) {
  641. writer.writeInt32(
  642. 4,
  643. f
  644. );
  645. }
  646. };
  647. /**
  648. * optional int32 hour = 1;
  649. * @return {number}
  650. */
  651. proto.spine.time.LocalTime.prototype.getHour = function() {
  652. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
  653. };
  654. /**
  655. * @param {number} value
  656. * @return {!proto.spine.time.LocalTime} returns this
  657. */
  658. proto.spine.time.LocalTime.prototype.setHour = function(value) {
  659. return jspb.Message.setProto3IntField(this, 1, value);
  660. };
  661. /**
  662. * optional int32 minute = 2;
  663. * @return {number}
  664. */
  665. proto.spine.time.LocalTime.prototype.getMinute = function() {
  666. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
  667. };
  668. /**
  669. * @param {number} value
  670. * @return {!proto.spine.time.LocalTime} returns this
  671. */
  672. proto.spine.time.LocalTime.prototype.setMinute = function(value) {
  673. return jspb.Message.setProto3IntField(this, 2, value);
  674. };
  675. /**
  676. * optional int32 second = 3;
  677. * @return {number}
  678. */
  679. proto.spine.time.LocalTime.prototype.getSecond = function() {
  680. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
  681. };
  682. /**
  683. * @param {number} value
  684. * @return {!proto.spine.time.LocalTime} returns this
  685. */
  686. proto.spine.time.LocalTime.prototype.setSecond = function(value) {
  687. return jspb.Message.setProto3IntField(this, 3, value);
  688. };
  689. /**
  690. * optional int32 nano = 4;
  691. * @return {number}
  692. */
  693. proto.spine.time.LocalTime.prototype.getNano = function() {
  694. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
  695. };
  696. /**
  697. * @param {number} value
  698. * @return {!proto.spine.time.LocalTime} returns this
  699. */
  700. proto.spine.time.LocalTime.prototype.setNano = function(value) {
  701. return jspb.Message.setProto3IntField(this, 4, value);
  702. };
  703. if (jspb.Message.GENERATE_TO_OBJECT) {
  704. /**
  705. * Creates an object representation of this proto.
  706. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  707. * Optional fields that are not set will be set to undefined.
  708. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  709. * For the list of reserved names please see:
  710. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  711. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  712. * JSPB instance for transitional soy proto support:
  713. * http://goto/soy-param-migration
  714. * @return {!Object}
  715. */
  716. proto.spine.time.LocalDateTime.prototype.toObject = function(opt_includeInstance) {
  717. return proto.spine.time.LocalDateTime.toObject(opt_includeInstance, this);
  718. };
  719. /**
  720. * Static version of the {@see toObject} method.
  721. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  722. * the JSPB instance for transitional soy proto support:
  723. * http://goto/soy-param-migration
  724. * @param {!proto.spine.time.LocalDateTime} msg The msg instance to transform.
  725. * @return {!Object}
  726. * @suppress {unusedLocalVariables} f is only used for nested messages
  727. */
  728. proto.spine.time.LocalDateTime.toObject = function(includeInstance, msg) {
  729. var f, obj = {
  730. date: (f = msg.getDate()) && proto.spine.time.LocalDate.toObject(includeInstance, f),
  731. time: (f = msg.getTime()) && proto.spine.time.LocalTime.toObject(includeInstance, f)
  732. };
  733. if (includeInstance) {
  734. obj.$jspbMessageInstance = msg;
  735. }
  736. return obj;
  737. };
  738. }
  739. /**
  740. * Deserializes binary data (in protobuf wire format).
  741. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  742. * @return {!proto.spine.time.LocalDateTime}
  743. */
  744. proto.spine.time.LocalDateTime.deserializeBinary = function(bytes) {
  745. var reader = new jspb.BinaryReader(bytes);
  746. var msg = new proto.spine.time.LocalDateTime;
  747. return proto.spine.time.LocalDateTime.deserializeBinaryFromReader(msg, reader);
  748. };
  749. /**
  750. * Deserializes binary data (in protobuf wire format) from the
  751. * given reader into the given message object.
  752. * @param {!proto.spine.time.LocalDateTime} msg The message object to deserialize into.
  753. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  754. * @return {!proto.spine.time.LocalDateTime}
  755. */
  756. proto.spine.time.LocalDateTime.deserializeBinaryFromReader = function(msg, reader) {
  757. while (reader.nextField()) {
  758. if (reader.isEndGroup()) {
  759. break;
  760. }
  761. var field = reader.getFieldNumber();
  762. switch (field) {
  763. case 1:
  764. var value = new proto.spine.time.LocalDate;
  765. reader.readMessage(value,proto.spine.time.LocalDate.deserializeBinaryFromReader);
  766. msg.setDate(value);
  767. break;
  768. case 2:
  769. var value = new proto.spine.time.LocalTime;
  770. reader.readMessage(value,proto.spine.time.LocalTime.deserializeBinaryFromReader);
  771. msg.setTime(value);
  772. break;
  773. default:
  774. reader.skipField();
  775. break;
  776. }
  777. }
  778. return msg;
  779. };
  780. /**
  781. * Serializes the message to binary data (in protobuf wire format).
  782. * @return {!Uint8Array}
  783. */
  784. proto.spine.time.LocalDateTime.prototype.serializeBinary = function() {
  785. var writer = new jspb.BinaryWriter();
  786. proto.spine.time.LocalDateTime.serializeBinaryToWriter(this, writer);
  787. return writer.getResultBuffer();
  788. };
  789. /**
  790. * Serializes the given message to binary data (in protobuf wire
  791. * format), writing to the given BinaryWriter.
  792. * @param {!proto.spine.time.LocalDateTime} message
  793. * @param {!jspb.BinaryWriter} writer
  794. * @suppress {unusedLocalVariables} f is only used for nested messages
  795. */
  796. proto.spine.time.LocalDateTime.serializeBinaryToWriter = function(message, writer) {
  797. var f = undefined;
  798. f = message.getDate();
  799. if (f != null) {
  800. writer.writeMessage(
  801. 1,
  802. f,
  803. proto.spine.time.LocalDate.serializeBinaryToWriter
  804. );
  805. }
  806. f = message.getTime();
  807. if (f != null) {
  808. writer.writeMessage(
  809. 2,
  810. f,
  811. proto.spine.time.LocalTime.serializeBinaryToWriter
  812. );
  813. }
  814. };
  815. /**
  816. * optional LocalDate date = 1;
  817. * @return {?proto.spine.time.LocalDate}
  818. */
  819. proto.spine.time.LocalDateTime.prototype.getDate = function() {
  820. return /** @type{?proto.spine.time.LocalDate} */ (
  821. jspb.Message.getWrapperField(this, proto.spine.time.LocalDate, 1));
  822. };
  823. /**
  824. * @param {?proto.spine.time.LocalDate|undefined} value
  825. * @return {!proto.spine.time.LocalDateTime} returns this
  826. */
  827. proto.spine.time.LocalDateTime.prototype.setDate = function(value) {
  828. return jspb.Message.setWrapperField(this, 1, value);
  829. };
  830. /**
  831. * Clears the message field making it undefined.
  832. * @return {!proto.spine.time.LocalDateTime} returns this
  833. */
  834. proto.spine.time.LocalDateTime.prototype.clearDate = function() {
  835. return this.setDate(undefined);
  836. };
  837. /**
  838. * Returns whether this field is set.
  839. * @return {boolean}
  840. */
  841. proto.spine.time.LocalDateTime.prototype.hasDate = function() {
  842. return jspb.Message.getField(this, 1) != null;
  843. };
  844. /**
  845. * optional LocalTime time = 2;
  846. * @return {?proto.spine.time.LocalTime}
  847. */
  848. proto.spine.time.LocalDateTime.prototype.getTime = function() {
  849. return /** @type{?proto.spine.time.LocalTime} */ (
  850. jspb.Message.getWrapperField(this, proto.spine.time.LocalTime, 2));
  851. };
  852. /**
  853. * @param {?proto.spine.time.LocalTime|undefined} value
  854. * @return {!proto.spine.time.LocalDateTime} returns this
  855. */
  856. proto.spine.time.LocalDateTime.prototype.setTime = function(value) {
  857. return jspb.Message.setWrapperField(this, 2, value);
  858. };
  859. /**
  860. * Clears the message field making it undefined.
  861. * @return {!proto.spine.time.LocalDateTime} returns this
  862. */
  863. proto.spine.time.LocalDateTime.prototype.clearTime = function() {
  864. return this.setTime(undefined);
  865. };
  866. /**
  867. * Returns whether this field is set.
  868. * @return {boolean}
  869. */
  870. proto.spine.time.LocalDateTime.prototype.hasTime = function() {
  871. return jspb.Message.getField(this, 2) != null;
  872. };
  873. if (jspb.Message.GENERATE_TO_OBJECT) {
  874. /**
  875. * Creates an object representation of this proto.
  876. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  877. * Optional fields that are not set will be set to undefined.
  878. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  879. * For the list of reserved names please see:
  880. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  881. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  882. * JSPB instance for transitional soy proto support:
  883. * http://goto/soy-param-migration
  884. * @return {!Object}
  885. */
  886. proto.spine.time.ZoneOffset.prototype.toObject = function(opt_includeInstance) {
  887. return proto.spine.time.ZoneOffset.toObject(opt_includeInstance, this);
  888. };
  889. /**
  890. * Static version of the {@see toObject} method.
  891. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  892. * the JSPB instance for transitional soy proto support:
  893. * http://goto/soy-param-migration
  894. * @param {!proto.spine.time.ZoneOffset} msg The msg instance to transform.
  895. * @return {!Object}
  896. * @suppress {unusedLocalVariables} f is only used for nested messages
  897. */
  898. proto.spine.time.ZoneOffset.toObject = function(includeInstance, msg) {
  899. var f, obj = {
  900. amountSeconds: jspb.Message.getFieldWithDefault(msg, 1, 0)
  901. };
  902. if (includeInstance) {
  903. obj.$jspbMessageInstance = msg;
  904. }
  905. return obj;
  906. };
  907. }
  908. /**
  909. * Deserializes binary data (in protobuf wire format).
  910. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  911. * @return {!proto.spine.time.ZoneOffset}
  912. */
  913. proto.spine.time.ZoneOffset.deserializeBinary = function(bytes) {
  914. var reader = new jspb.BinaryReader(bytes);
  915. var msg = new proto.spine.time.ZoneOffset;
  916. return proto.spine.time.ZoneOffset.deserializeBinaryFromReader(msg, reader);
  917. };
  918. /**
  919. * Deserializes binary data (in protobuf wire format) from the
  920. * given reader into the given message object.
  921. * @param {!proto.spine.time.ZoneOffset} msg The message object to deserialize into.
  922. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  923. * @return {!proto.spine.time.ZoneOffset}
  924. */
  925. proto.spine.time.ZoneOffset.deserializeBinaryFromReader = function(msg, reader) {
  926. while (reader.nextField()) {
  927. if (reader.isEndGroup()) {
  928. break;
  929. }
  930. var field = reader.getFieldNumber();
  931. switch (field) {
  932. case 1:
  933. var value = /** @type {number} */ (reader.readInt32());
  934. msg.setAmountSeconds(value);
  935. break;
  936. default:
  937. reader.skipField();
  938. break;
  939. }
  940. }
  941. return msg;
  942. };
  943. /**
  944. * Serializes the message to binary data (in protobuf wire format).
  945. * @return {!Uint8Array}
  946. */
  947. proto.spine.time.ZoneOffset.prototype.serializeBinary = function() {
  948. var writer = new jspb.BinaryWriter();
  949. proto.spine.time.ZoneOffset.serializeBinaryToWriter(this, writer);
  950. return writer.getResultBuffer();
  951. };
  952. /**
  953. * Serializes the given message to binary data (in protobuf wire
  954. * format), writing to the given BinaryWriter.
  955. * @param {!proto.spine.time.ZoneOffset} message
  956. * @param {!jspb.BinaryWriter} writer
  957. * @suppress {unusedLocalVariables} f is only used for nested messages
  958. */
  959. proto.spine.time.ZoneOffset.serializeBinaryToWriter = function(message, writer) {
  960. var f = undefined;
  961. f = message.getAmountSeconds();
  962. if (f !== 0) {
  963. writer.writeInt32(
  964. 1,
  965. f
  966. );
  967. }
  968. };
  969. /**
  970. * optional int32 amount_seconds = 1;
  971. * @return {number}
  972. */
  973. proto.spine.time.ZoneOffset.prototype.getAmountSeconds = function() {
  974. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
  975. };
  976. /**
  977. * @param {number} value
  978. * @return {!proto.spine.time.ZoneOffset} returns this
  979. */
  980. proto.spine.time.ZoneOffset.prototype.setAmountSeconds = function(value) {
  981. return jspb.Message.setProto3IntField(this, 1, value);
  982. };
  983. if (jspb.Message.GENERATE_TO_OBJECT) {
  984. /**
  985. * Creates an object representation of this proto.
  986. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  987. * Optional fields that are not set will be set to undefined.
  988. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  989. * For the list of reserved names please see:
  990. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  991. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  992. * JSPB instance for transitional soy proto support:
  993. * http://goto/soy-param-migration
  994. * @return {!Object}
  995. */
  996. proto.spine.time.OffsetTime.prototype.toObject = function(opt_includeInstance) {
  997. return proto.spine.time.OffsetTime.toObject(opt_includeInstance, this);
  998. };
  999. /**
  1000. * Static version of the {@see toObject} method.
  1001. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  1002. * the JSPB instance for transitional soy proto support:
  1003. * http://goto/soy-param-migration
  1004. * @param {!proto.spine.time.OffsetTime} msg The msg instance to transform.
  1005. * @return {!Object}
  1006. * @suppress {unusedLocalVariables} f is only used for nested messages
  1007. */
  1008. proto.spine.time.OffsetTime.toObject = function(includeInstance, msg) {
  1009. var f, obj = {
  1010. time: (f = msg.getTime()) && proto.spine.time.LocalTime.toObject(includeInstance, f),
  1011. offset: (f = msg.getOffset()) && proto.spine.time.ZoneOffset.toObject(includeInstance, f)
  1012. };
  1013. if (includeInstance) {
  1014. obj.$jspbMessageInstance = msg;
  1015. }
  1016. return obj;
  1017. };
  1018. }
  1019. /**
  1020. * Deserializes binary data (in protobuf wire format).
  1021. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  1022. * @return {!proto.spine.time.OffsetTime}
  1023. */
  1024. proto.spine.time.OffsetTime.deserializeBinary = function(bytes) {
  1025. var reader = new jspb.BinaryReader(bytes);
  1026. var msg = new proto.spine.time.OffsetTime;
  1027. return proto.spine.time.OffsetTime.deserializeBinaryFromReader(msg, reader);
  1028. };
  1029. /**
  1030. * Deserializes binary data (in protobuf wire format) from the
  1031. * given reader into the given message object.
  1032. * @param {!proto.spine.time.OffsetTime} msg The message object to deserialize into.
  1033. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  1034. * @return {!proto.spine.time.OffsetTime}
  1035. */
  1036. proto.spine.time.OffsetTime.deserializeBinaryFromReader = function(msg, reader) {
  1037. while (reader.nextField()) {
  1038. if (reader.isEndGroup()) {
  1039. break;
  1040. }
  1041. var field = reader.getFieldNumber();
  1042. switch (field) {
  1043. case 1:
  1044. var value = new proto.spine.time.LocalTime;
  1045. reader.readMessage(value,proto.spine.time.LocalTime.deserializeBinaryFromReader);
  1046. msg.setTime(value);
  1047. break;
  1048. case 2:
  1049. var value = new proto.spine.time.ZoneOffset;
  1050. reader.readMessage(value,proto.spine.time.ZoneOffset.deserializeBinaryFromReader);
  1051. msg.setOffset(value);
  1052. break;
  1053. default:
  1054. reader.skipField();
  1055. break;
  1056. }
  1057. }
  1058. return msg;
  1059. };
  1060. /**
  1061. * Serializes the message to binary data (in protobuf wire format).
  1062. * @return {!Uint8Array}
  1063. */
  1064. proto.spine.time.OffsetTime.prototype.serializeBinary = function() {
  1065. var writer = new jspb.BinaryWriter();
  1066. proto.spine.time.OffsetTime.serializeBinaryToWriter(this, writer);
  1067. return writer.getResultBuffer();
  1068. };
  1069. /**
  1070. * Serializes the given message to binary data (in protobuf wire
  1071. * format), writing to the given BinaryWriter.
  1072. * @param {!proto.spine.time.OffsetTime} message
  1073. * @param {!jspb.BinaryWriter} writer
  1074. * @suppress {unusedLocalVariables} f is only used for nested messages
  1075. */
  1076. proto.spine.time.OffsetTime.serializeBinaryToWriter = function(message, writer) {
  1077. var f = undefined;
  1078. f = message.getTime();
  1079. if (f != null) {
  1080. writer.writeMessage(
  1081. 1,
  1082. f,
  1083. proto.spine.time.LocalTime.serializeBinaryToWriter
  1084. );
  1085. }
  1086. f = message.getOffset();
  1087. if (f != null) {
  1088. writer.writeMessage(
  1089. 2,
  1090. f,
  1091. proto.spine.time.ZoneOffset.serializeBinaryToWriter
  1092. );
  1093. }
  1094. };
  1095. /**
  1096. * optional LocalTime time = 1;
  1097. * @return {?proto.spine.time.LocalTime}
  1098. */
  1099. proto.spine.time.OffsetTime.prototype.getTime = function() {
  1100. return /** @type{?proto.spine.time.LocalTime} */ (
  1101. jspb.Message.getWrapperField(this, proto.spine.time.LocalTime, 1));
  1102. };
  1103. /**
  1104. * @param {?proto.spine.time.LocalTime|undefined} value
  1105. * @return {!proto.spine.time.OffsetTime} returns this
  1106. */
  1107. proto.spine.time.OffsetTime.prototype.setTime = function(value) {
  1108. return jspb.Message.setWrapperField(this, 1, value);
  1109. };
  1110. /**
  1111. * Clears the message field making it undefined.
  1112. * @return {!proto.spine.time.OffsetTime} returns this
  1113. */
  1114. proto.spine.time.OffsetTime.prototype.clearTime = function() {
  1115. return this.setTime(undefined);
  1116. };
  1117. /**
  1118. * Returns whether this field is set.
  1119. * @return {boolean}
  1120. */
  1121. proto.spine.time.OffsetTime.prototype.hasTime = function() {
  1122. return jspb.Message.getField(this, 1) != null;
  1123. };
  1124. /**
  1125. * optional ZoneOffset offset = 2;
  1126. * @return {?proto.spine.time.ZoneOffset}
  1127. */
  1128. proto.spine.time.OffsetTime.prototype.getOffset = function() {
  1129. return /** @type{?proto.spine.time.ZoneOffset} */ (
  1130. jspb.Message.getWrapperField(this, proto.spine.time.ZoneOffset, 2));
  1131. };
  1132. /**
  1133. * @param {?proto.spine.time.ZoneOffset|undefined} value
  1134. * @return {!proto.spine.time.OffsetTime} returns this
  1135. */
  1136. proto.spine.time.OffsetTime.prototype.setOffset = function(value) {
  1137. return jspb.Message.setWrapperField(this, 2, value);
  1138. };
  1139. /**
  1140. * Clears the message field making it undefined.
  1141. * @return {!proto.spine.time.OffsetTime} returns this
  1142. */
  1143. proto.spine.time.OffsetTime.prototype.clearOffset = function() {
  1144. return this.setOffset(undefined);
  1145. };
  1146. /**
  1147. * Returns whether this field is set.
  1148. * @return {boolean}
  1149. */
  1150. proto.spine.time.OffsetTime.prototype.hasOffset = function() {
  1151. return jspb.Message.getField(this, 2) != null;
  1152. };
  1153. if (jspb.Message.GENERATE_TO_OBJECT) {
  1154. /**
  1155. * Creates an object representation of this proto.
  1156. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  1157. * Optional fields that are not set will be set to undefined.
  1158. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  1159. * For the list of reserved names please see:
  1160. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  1161. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  1162. * JSPB instance for transitional soy proto support:
  1163. * http://goto/soy-param-migration
  1164. * @return {!Object}
  1165. */
  1166. proto.spine.time.OffsetDateTime.prototype.toObject = function(opt_includeInstance) {
  1167. return proto.spine.time.OffsetDateTime.toObject(opt_includeInstance, this);
  1168. };
  1169. /**
  1170. * Static version of the {@see toObject} method.
  1171. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  1172. * the JSPB instance for transitional soy proto support:
  1173. * http://goto/soy-param-migration
  1174. * @param {!proto.spine.time.OffsetDateTime} msg The msg instance to transform.
  1175. * @return {!Object}
  1176. * @suppress {unusedLocalVariables} f is only used for nested messages
  1177. */
  1178. proto.spine.time.OffsetDateTime.toObject = function(includeInstance, msg) {
  1179. var f, obj = {
  1180. dateTime: (f = msg.getDateTime()) && proto.spine.time.LocalDateTime.toObject(includeInstance, f),
  1181. offset: (f = msg.getOffset()) && proto.spine.time.ZoneOffset.toObject(includeInstance, f)
  1182. };
  1183. if (includeInstance) {
  1184. obj.$jspbMessageInstance = msg;
  1185. }
  1186. return obj;
  1187. };
  1188. }
  1189. /**
  1190. * Deserializes binary data (in protobuf wire format).
  1191. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  1192. * @return {!proto.spine.time.OffsetDateTime}
  1193. */
  1194. proto.spine.time.OffsetDateTime.deserializeBinary = function(bytes) {
  1195. var reader = new jspb.BinaryReader(bytes);
  1196. var msg = new proto.spine.time.OffsetDateTime;
  1197. return proto.spine.time.OffsetDateTime.deserializeBinaryFromReader(msg, reader);
  1198. };
  1199. /**
  1200. * Deserializes binary data (in protobuf wire format) from the
  1201. * given reader into the given message object.
  1202. * @param {!proto.spine.time.OffsetDateTime} msg The message object to deserialize into.
  1203. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  1204. * @return {!proto.spine.time.OffsetDateTime}
  1205. */
  1206. proto.spine.time.OffsetDateTime.deserializeBinaryFromReader = function(msg, reader) {
  1207. while (reader.nextField()) {
  1208. if (reader.isEndGroup()) {
  1209. break;
  1210. }
  1211. var field = reader.getFieldNumber();
  1212. switch (field) {
  1213. case 1:
  1214. var value = new proto.spine.time.LocalDateTime;
  1215. reader.readMessage(value,proto.spine.time.LocalDateTime.deserializeBinaryFromReader);
  1216. msg.setDateTime(value);
  1217. break;
  1218. case 2:
  1219. var value = new proto.spine.time.ZoneOffset;
  1220. reader.readMessage(value,proto.spine.time.ZoneOffset.deserializeBinaryFromReader);
  1221. msg.setOffset(value);
  1222. break;
  1223. default:
  1224. reader.skipField();
  1225. break;
  1226. }
  1227. }
  1228. return msg;
  1229. };
  1230. /**
  1231. * Serializes the message to binary data (in protobuf wire format).
  1232. * @return {!Uint8Array}
  1233. */
  1234. proto.spine.time.OffsetDateTime.prototype.serializeBinary = function() {
  1235. var writer = new jspb.BinaryWriter();
  1236. proto.spine.time.OffsetDateTime.serializeBinaryToWriter(this, writer);
  1237. return writer.getResultBuffer();
  1238. };
  1239. /**
  1240. * Serializes the given message to binary data (in protobuf wire
  1241. * format), writing to the given BinaryWriter.
  1242. * @param {!proto.spine.time.OffsetDateTime} message
  1243. * @param {!jspb.BinaryWriter} writer
  1244. * @suppress {unusedLocalVariables} f is only used for nested messages
  1245. */
  1246. proto.spine.time.OffsetDateTime.serializeBinaryToWriter = function(message, writer) {
  1247. var f = undefined;
  1248. f = message.getDateTime();
  1249. if (f != null) {
  1250. writer.writeMessage(
  1251. 1,
  1252. f,
  1253. proto.spine.time.LocalDateTime.serializeBinaryToWriter
  1254. );
  1255. }
  1256. f = message.getOffset();
  1257. if (f != null) {
  1258. writer.writeMessage(
  1259. 2,
  1260. f,
  1261. proto.spine.time.ZoneOffset.serializeBinaryToWriter
  1262. );
  1263. }
  1264. };
  1265. /**
  1266. * optional LocalDateTime date_time = 1;
  1267. * @return {?proto.spine.time.LocalDateTime}
  1268. */
  1269. proto.spine.time.OffsetDateTime.prototype.getDateTime = function() {
  1270. return /** @type{?proto.spine.time.LocalDateTime} */ (
  1271. jspb.Message.getWrapperField(this, proto.spine.time.LocalDateTime, 1));
  1272. };
  1273. /**
  1274. * @param {?proto.spine.time.LocalDateTime|undefined} value
  1275. * @return {!proto.spine.time.OffsetDateTime} returns this
  1276. */
  1277. proto.spine.time.OffsetDateTime.prototype.setDateTime = function(value) {
  1278. return jspb.Message.setWrapperField(this, 1, value);
  1279. };
  1280. /**
  1281. * Clears the message field making it undefined.
  1282. * @return {!proto.spine.time.OffsetDateTime} returns this
  1283. */
  1284. proto.spine.time.OffsetDateTime.prototype.clearDateTime = function() {
  1285. return this.setDateTime(undefined);
  1286. };
  1287. /**
  1288. * Returns whether this field is set.
  1289. * @return {boolean}
  1290. */
  1291. proto.spine.time.OffsetDateTime.prototype.hasDateTime = function() {
  1292. return jspb.Message.getField(this, 1) != null;
  1293. };
  1294. /**
  1295. * optional ZoneOffset offset = 2;
  1296. * @return {?proto.spine.time.ZoneOffset}
  1297. */
  1298. proto.spine.time.OffsetDateTime.prototype.getOffset = function() {
  1299. return /** @type{?proto.spine.time.ZoneOffset} */ (
  1300. jspb.Message.getWrapperField(this, proto.spine.time.ZoneOffset, 2));
  1301. };
  1302. /**
  1303. * @param {?proto.spine.time.ZoneOffset|undefined} value
  1304. * @return {!proto.spine.time.OffsetDateTime} returns this
  1305. */
  1306. proto.spine.time.OffsetDateTime.prototype.setOffset = function(value) {
  1307. return jspb.Message.setWrapperField(this, 2, value);
  1308. };
  1309. /**
  1310. * Clears the message field making it undefined.
  1311. * @return {!proto.spine.time.OffsetDateTime} returns this
  1312. */
  1313. proto.spine.time.OffsetDateTime.prototype.clearOffset = function() {
  1314. return this.setOffset(undefined);
  1315. };
  1316. /**
  1317. * Returns whether this field is set.
  1318. * @return {boolean}
  1319. */
  1320. proto.spine.time.OffsetDateTime.prototype.hasOffset = function() {
  1321. return jspb.Message.getField(this, 2) != null;
  1322. };
  1323. if (jspb.Message.GENERATE_TO_OBJECT) {
  1324. /**
  1325. * Creates an object representation of this proto.
  1326. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  1327. * Optional fields that are not set will be set to undefined.
  1328. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  1329. * For the list of reserved names please see:
  1330. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  1331. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  1332. * JSPB instance for transitional soy proto support:
  1333. * http://goto/soy-param-migration
  1334. * @return {!Object}
  1335. */
  1336. proto.spine.time.ZoneId.prototype.toObject = function(opt_includeInstance) {
  1337. return proto.spine.time.ZoneId.toObject(opt_includeInstance, this);
  1338. };
  1339. /**
  1340. * Static version of the {@see toObject} method.
  1341. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  1342. * the JSPB instance for transitional soy proto support:
  1343. * http://goto/soy-param-migration
  1344. * @param {!proto.spine.time.ZoneId} msg The msg instance to transform.
  1345. * @return {!Object}
  1346. * @suppress {unusedLocalVariables} f is only used for nested messages
  1347. */
  1348. proto.spine.time.ZoneId.toObject = function(includeInstance, msg) {
  1349. var f, obj = {
  1350. value: jspb.Message.getFieldWithDefault(msg, 1, "")
  1351. };
  1352. if (includeInstance) {
  1353. obj.$jspbMessageInstance = msg;
  1354. }
  1355. return obj;
  1356. };
  1357. }
  1358. /**
  1359. * Deserializes binary data (in protobuf wire format).
  1360. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  1361. * @return {!proto.spine.time.ZoneId}
  1362. */
  1363. proto.spine.time.ZoneId.deserializeBinary = function(bytes) {
  1364. var reader = new jspb.BinaryReader(bytes);
  1365. var msg = new proto.spine.time.ZoneId;
  1366. return proto.spine.time.ZoneId.deserializeBinaryFromReader(msg, reader);
  1367. };
  1368. /**
  1369. * Deserializes binary data (in protobuf wire format) from the
  1370. * given reader into the given message object.
  1371. * @param {!proto.spine.time.ZoneId} msg The message object to deserialize into.
  1372. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  1373. * @return {!proto.spine.time.ZoneId}
  1374. */
  1375. proto.spine.time.ZoneId.deserializeBinaryFromReader = function(msg, reader) {
  1376. while (reader.nextField()) {
  1377. if (reader.isEndGroup()) {
  1378. break;
  1379. }
  1380. var field = reader.getFieldNumber();
  1381. switch (field) {
  1382. case 1:
  1383. var value = /** @type {string} */ (reader.readString());
  1384. msg.setValue(value);
  1385. break;
  1386. default:
  1387. reader.skipField();
  1388. break;
  1389. }
  1390. }
  1391. return msg;
  1392. };
  1393. /**
  1394. * Serializes the message to binary data (in protobuf wire format).
  1395. * @return {!Uint8Array}
  1396. */
  1397. proto.spine.time.ZoneId.prototype.serializeBinary = function() {
  1398. var writer = new jspb.BinaryWriter();
  1399. proto.spine.time.ZoneId.serializeBinaryToWriter(this, writer);
  1400. return writer.getResultBuffer();
  1401. };
  1402. /**
  1403. * Serializes the given message to binary data (in protobuf wire
  1404. * format), writing to the given BinaryWriter.
  1405. * @param {!proto.spine.time.ZoneId} message
  1406. * @param {!jspb.BinaryWriter} writer
  1407. * @suppress {unusedLocalVariables} f is only used for nested messages
  1408. */
  1409. proto.spine.time.ZoneId.serializeBinaryToWriter = function(message, writer) {
  1410. var f = undefined;
  1411. f = message.getValue();
  1412. if (f.length > 0) {
  1413. writer.writeString(
  1414. 1,
  1415. f
  1416. );
  1417. }
  1418. };
  1419. /**
  1420. * optional string value = 1;
  1421. * @return {string}
  1422. */
  1423. proto.spine.time.ZoneId.prototype.getValue = function() {
  1424. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
  1425. };
  1426. /**
  1427. * @param {string} value
  1428. * @return {!proto.spine.time.ZoneId} returns this
  1429. */
  1430. proto.spine.time.ZoneId.prototype.setValue = function(value) {
  1431. return jspb.Message.setProto3StringField(this, 1, value);
  1432. };
  1433. if (jspb.Message.GENERATE_TO_OBJECT) {
  1434. /**
  1435. * Creates an object representation of this proto.
  1436. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  1437. * Optional fields that are not set will be set to undefined.
  1438. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  1439. * For the list of reserved names please see:
  1440. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  1441. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  1442. * JSPB instance for transitional soy proto support:
  1443. * http://goto/soy-param-migration
  1444. * @return {!Object}
  1445. */
  1446. proto.spine.time.ZonedDateTime.prototype.toObject = function(opt_includeInstance) {
  1447. return proto.spine.time.ZonedDateTime.toObject(opt_includeInstance, this);
  1448. };
  1449. /**
  1450. * Static version of the {@see toObject} method.
  1451. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  1452. * the JSPB instance for transitional soy proto support:
  1453. * http://goto/soy-param-migration
  1454. * @param {!proto.spine.time.ZonedDateTime} msg The msg instance to transform.
  1455. * @return {!Object}
  1456. * @suppress {unusedLocalVariables} f is only used for nested messages
  1457. */
  1458. proto.spine.time.ZonedDateTime.toObject = function(includeInstance, msg) {
  1459. var f, obj = {
  1460. dateTime: (f = msg.getDateTime()) && proto.spine.time.LocalDateTime.toObject(includeInstance, f),
  1461. zone: (f = msg.getZone()) && proto.spine.time.ZoneId.toObject(includeInstance, f)
  1462. };
  1463. if (includeInstance) {
  1464. obj.$jspbMessageInstance = msg;
  1465. }
  1466. return obj;
  1467. };
  1468. }
  1469. /**
  1470. * Deserializes binary data (in protobuf wire format).
  1471. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  1472. * @return {!proto.spine.time.ZonedDateTime}
  1473. */
  1474. proto.spine.time.ZonedDateTime.deserializeBinary = function(bytes) {
  1475. var reader = new jspb.BinaryReader(bytes);
  1476. var msg = new proto.spine.time.ZonedDateTime;
  1477. return proto.spine.time.ZonedDateTime.deserializeBinaryFromReader(msg, reader);
  1478. };
  1479. /**
  1480. * Deserializes binary data (in protobuf wire format) from the
  1481. * given reader into the given message object.
  1482. * @param {!proto.spine.time.ZonedDateTime} msg The message object to deserialize into.
  1483. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  1484. * @return {!proto.spine.time.ZonedDateTime}
  1485. */
  1486. proto.spine.time.ZonedDateTime.deserializeBinaryFromReader = function(msg, reader) {
  1487. while (reader.nextField()) {
  1488. if (reader.isEndGroup()) {
  1489. break;
  1490. }
  1491. var field = reader.getFieldNumber();
  1492. switch (field) {
  1493. case 1:
  1494. var value = new proto.spine.time.LocalDateTime;
  1495. reader.readMessage(value,proto.spine.time.LocalDateTime.deserializeBinaryFromReader);
  1496. msg.setDateTime(value);
  1497. break;
  1498. case 2:
  1499. var value = new proto.spine.time.ZoneId;
  1500. reader.readMessage(value,proto.spine.time.ZoneId.deserializeBinaryFromReader);
  1501. msg.setZone(value);
  1502. break;
  1503. default:
  1504. reader.skipField();
  1505. break;
  1506. }
  1507. }
  1508. return msg;
  1509. };
  1510. /**
  1511. * Serializes the message to binary data (in protobuf wire format).
  1512. * @return {!Uint8Array}
  1513. */
  1514. proto.spine.time.ZonedDateTime.prototype.serializeBinary = function() {
  1515. var writer = new jspb.BinaryWriter();
  1516. proto.spine.time.ZonedDateTime.serializeBinaryToWriter(this, writer);
  1517. return writer.getResultBuffer();
  1518. };
  1519. /**
  1520. * Serializes the given message to binary data (in protobuf wire
  1521. * format), writing to the given BinaryWriter.
  1522. * @param {!proto.spine.time.ZonedDateTime} message
  1523. * @param {!jspb.BinaryWriter} writer
  1524. * @suppress {unusedLocalVariables} f is only used for nested messages
  1525. */
  1526. proto.spine.time.ZonedDateTime.serializeBinaryToWriter = function(message, writer) {
  1527. var f = undefined;
  1528. f = message.getDateTime();
  1529. if (f != null) {
  1530. writer.writeMessage(
  1531. 1,
  1532. f,
  1533. proto.spine.time.LocalDateTime.serializeBinaryToWriter
  1534. );
  1535. }
  1536. f = message.getZone();
  1537. if (f != null) {
  1538. writer.writeMessage(
  1539. 2,
  1540. f,
  1541. proto.spine.time.ZoneId.serializeBinaryToWriter
  1542. );
  1543. }
  1544. };
  1545. /**
  1546. * optional LocalDateTime date_time = 1;
  1547. * @return {?proto.spine.time.LocalDateTime}
  1548. */
  1549. proto.spine.time.ZonedDateTime.prototype.getDateTime = function() {
  1550. return /** @type{?proto.spine.time.LocalDateTime} */ (
  1551. jspb.Message.getWrapperField(this, proto.spine.time.LocalDateTime, 1));
  1552. };
  1553. /**
  1554. * @param {?proto.spine.time.LocalDateTime|undefined} value
  1555. * @return {!proto.spine.time.ZonedDateTime} returns this
  1556. */
  1557. proto.spine.time.ZonedDateTime.prototype.setDateTime = function(value) {
  1558. return jspb.Message.setWrapperField(this, 1, value);
  1559. };
  1560. /**
  1561. * Clears the message field making it undefined.
  1562. * @return {!proto.spine.time.ZonedDateTime} returns this
  1563. */
  1564. proto.spine.time.ZonedDateTime.prototype.clearDateTime = function() {
  1565. return this.setDateTime(undefined);
  1566. };
  1567. /**
  1568. * Returns whether this field is set.
  1569. * @return {boolean}
  1570. */
  1571. proto.spine.time.ZonedDateTime.prototype.hasDateTime = function() {
  1572. return jspb.Message.getField(this, 1) != null;
  1573. };
  1574. /**
  1575. * optional ZoneId zone = 2;
  1576. * @return {?proto.spine.time.ZoneId}
  1577. */
  1578. proto.spine.time.ZonedDateTime.prototype.getZone = function() {
  1579. return /** @type{?proto.spine.time.ZoneId} */ (
  1580. jspb.Message.getWrapperField(this, proto.spine.time.ZoneId, 2));
  1581. };
  1582. /**
  1583. * @param {?proto.spine.time.ZoneId|undefined} value
  1584. * @return {!proto.spine.time.ZonedDateTime} returns this
  1585. */
  1586. proto.spine.time.ZonedDateTime.prototype.setZone = function(value) {
  1587. return jspb.Message.setWrapperField(this, 2, value);
  1588. };
  1589. /**
  1590. * Clears the message field making it undefined.
  1591. * @return {!proto.spine.time.ZonedDateTime} returns this
  1592. */
  1593. proto.spine.time.ZonedDateTime.prototype.clearZone = function() {
  1594. return this.setZone(undefined);
  1595. };
  1596. /**
  1597. * Returns whether this field is set.
  1598. * @return {boolean}
  1599. */
  1600. proto.spine.time.ZonedDateTime.prototype.hasZone = function() {
  1601. return jspb.Message.getField(this, 2) != null;
  1602. };
  1603. /**
  1604. * @enum {number}
  1605. */
  1606. proto.spine.time.Month = {
  1607. MONTH_UNDEFINED: 0,
  1608. JANUARY: 1,
  1609. FEBRUARY: 2,
  1610. MARCH: 3,
  1611. APRIL: 4,
  1612. MAY: 5,
  1613. JUNE: 6,
  1614. JULY: 7,
  1615. AUGUST: 8,
  1616. SEPTEMBER: 9,
  1617. OCTOBER: 10,
  1618. NOVEMBER: 11,
  1619. DECEMBER: 12
  1620. };
  1621. /**
  1622. * @enum {number}
  1623. */
  1624. proto.spine.time.DayOfWeek = {
  1625. DOW_UNDEFINED: 0,
  1626. MONDAY: 1,
  1627. TUESDAY: 2,
  1628. WEDNESDAY: 3,
  1629. THURSDAY: 4,
  1630. FRIDAY: 5,
  1631. SATURDAY: 6,
  1632. SUNDAY: 7
  1633. };
  1634. goog.object.extend(exports, proto.spine.time);
  1635. // Generated by Spine ProtoJs Plugin
  1636. let ObjectParser = require('../../../client/parser/object-parser.js').default;
  1637. let TypeParsers = require('../../../client/parser/type-parsers.js').default;
  1638. proto.spine.time.YearMonth.Parser = function() {
  1639. ObjectParser.call(this);
  1640. };
  1641. proto.spine.time.YearMonth.Parser.prototype = Object.create(ObjectParser.prototype);
  1642. proto.spine.time.YearMonth.Parser.prototype.constructor = proto.spine.time.YearMonth.Parser;
  1643. proto.spine.time.YearMonth.Parser.prototype.fromObject = function(obj) {
  1644. if (obj === null) {
  1645. return null;
  1646. }
  1647. let msg = new proto.spine.time.YearMonth();
  1648. if (obj.year !== undefined) {
  1649. if (obj.year !== null) {
  1650. let value = obj.year;
  1651. msg.setYear(value);
  1652. }
  1653. }
  1654. if (obj.month !== undefined) {
  1655. if (obj.month !== null) {
  1656. let value = proto.spine.time.Month[obj.month];
  1657. msg.setMonth(value);
  1658. }
  1659. }
  1660. return msg;
  1661. };
  1662. proto.spine.time.LocalTime.Parser = function() {
  1663. ObjectParser.call(this);
  1664. };
  1665. proto.spine.time.LocalTime.Parser.prototype = Object.create(ObjectParser.prototype);
  1666. proto.spine.time.LocalTime.Parser.prototype.constructor = proto.spine.time.LocalTime.Parser;
  1667. proto.spine.time.LocalTime.Parser.prototype.fromObject = function(obj) {
  1668. if (obj === null) {
  1669. return null;
  1670. }
  1671. let msg = new proto.spine.time.LocalTime();
  1672. if (obj.hour !== undefined) {
  1673. if (obj.hour !== null) {
  1674. let value = obj.hour;
  1675. msg.setHour(value);
  1676. }
  1677. }
  1678. if (obj.minute !== undefined) {
  1679. if (obj.minute !== null) {
  1680. let value = obj.minute;
  1681. msg.setMinute(value);
  1682. }
  1683. }
  1684. if (obj.second !== undefined) {
  1685. if (obj.second !== null) {
  1686. let value = obj.second;
  1687. msg.setSecond(value);
  1688. }
  1689. }
  1690. if (obj.nano !== undefined) {
  1691. if (obj.nano !== null) {
  1692. let value = obj.nano;
  1693. msg.setNano(value);
  1694. }
  1695. }
  1696. return msg;
  1697. };
  1698. proto.spine.time.OffsetTime.Parser = function() {
  1699. ObjectParser.call(this);
  1700. };
  1701. proto.spine.time.OffsetTime.Parser.prototype = Object.create(ObjectParser.prototype);
  1702. proto.spine.time.OffsetTime.Parser.prototype.constructor = proto.spine.time.OffsetTime.Parser;
  1703. proto.spine.time.OffsetTime.Parser.prototype.fromObject = function(obj) {
  1704. if (obj === null) {
  1705. return null;
  1706. }
  1707. let msg = new proto.spine.time.OffsetTime();
  1708. if (obj.time !== undefined) {
  1709. if (obj.time === null) {
  1710. msg.setTime(null);
  1711. } else {
  1712. let value = TypeParsers.parserFor('type.spine.io/spine.time.LocalTime').fromObject(obj.time);
  1713. msg.setTime(value);
  1714. }
  1715. }
  1716. if (obj.offset !== undefined) {
  1717. if (obj.offset === null) {
  1718. msg.setOffset(null);
  1719. } else {
  1720. let value = TypeParsers.parserFor('type.spine.io/spine.time.ZoneOffset').fromObject(obj.offset);
  1721. msg.setOffset(value);
  1722. }
  1723. }
  1724. return msg;
  1725. };
  1726. proto.spine.time.ZoneOffset.Parser = function() {
  1727. ObjectParser.call(this);
  1728. };
  1729. proto.spine.time.ZoneOffset.Parser.prototype = Object.create(ObjectParser.prototype);
  1730. proto.spine.time.ZoneOffset.Parser.prototype.constructor = proto.spine.time.ZoneOffset.Parser;
  1731. proto.spine.time.ZoneOffset.Parser.prototype.fromObject = function(obj) {
  1732. if (obj === null) {
  1733. return null;
  1734. }
  1735. let msg = new proto.spine.time.ZoneOffset();
  1736. if (obj.amountSeconds !== undefined) {
  1737. if (obj.amountSeconds !== null) {
  1738. let value = obj.amountSeconds;
  1739. msg.setAmountSeconds(value);
  1740. }
  1741. }
  1742. return msg;
  1743. };
  1744. proto.spine.time.ZoneId.Parser = function() {
  1745. ObjectParser.call(this);
  1746. };
  1747. proto.spine.time.ZoneId.Parser.prototype = Object.create(ObjectParser.prototype);
  1748. proto.spine.time.ZoneId.Parser.prototype.constructor = proto.spine.time.ZoneId.Parser;
  1749. proto.spine.time.ZoneId.Parser.prototype.fromObject = function(obj) {
  1750. if (obj === null) {
  1751. return null;
  1752. }
  1753. let msg = new proto.spine.time.ZoneId();
  1754. if (obj.value !== undefined) {
  1755. if (obj.value !== null) {
  1756. let value = obj.value;
  1757. msg.setValue(value);
  1758. }
  1759. }
  1760. return msg;
  1761. };
  1762. proto.spine.time.LocalDateTime.Parser = function() {
  1763. ObjectParser.call(this);
  1764. };
  1765. proto.spine.time.LocalDateTime.Parser.prototype = Object.create(ObjectParser.prototype);
  1766. proto.spine.time.LocalDateTime.Parser.prototype.constructor = proto.spine.time.LocalDateTime.Parser;
  1767. proto.spine.time.LocalDateTime.Parser.prototype.fromObject = function(obj) {
  1768. if (obj === null) {
  1769. return null;
  1770. }
  1771. let msg = new proto.spine.time.LocalDateTime();
  1772. if (obj.date !== undefined) {
  1773. if (obj.date === null) {
  1774. msg.setDate(null);
  1775. } else {
  1776. let value = TypeParsers.parserFor('type.spine.io/spine.time.LocalDate').fromObject(obj.date);
  1777. msg.setDate(value);
  1778. }
  1779. }
  1780. if (obj.time !== undefined) {
  1781. if (obj.time === null) {
  1782. msg.setTime(null);
  1783. } else {
  1784. let value = TypeParsers.parserFor('type.spine.io/spine.time.LocalTime').fromObject(obj.time);
  1785. msg.setTime(value);
  1786. }
  1787. }
  1788. return msg;
  1789. };
  1790. proto.spine.time.OffsetDateTime.Parser = function() {
  1791. ObjectParser.call(this);
  1792. };
  1793. proto.spine.time.OffsetDateTime.Parser.prototype = Object.create(ObjectParser.prototype);
  1794. proto.spine.time.OffsetDateTime.Parser.prototype.constructor = proto.spine.time.OffsetDateTime.Parser;
  1795. proto.spine.time.OffsetDateTime.Parser.prototype.fromObject = function(obj) {
  1796. if (obj === null) {
  1797. return null;
  1798. }
  1799. let msg = new proto.spine.time.OffsetDateTime();
  1800. if (obj.dateTime !== undefined) {
  1801. if (obj.dateTime === null) {
  1802. msg.setDateTime(null);
  1803. } else {
  1804. let value = TypeParsers.parserFor('type.spine.io/spine.time.LocalDateTime').fromObject(obj.dateTime);
  1805. msg.setDateTime(value);
  1806. }
  1807. }
  1808. if (obj.offset !== undefined) {
  1809. if (obj.offset === null) {
  1810. msg.setOffset(null);
  1811. } else {
  1812. let value = TypeParsers.parserFor('type.spine.io/spine.time.ZoneOffset').fromObject(obj.offset);
  1813. msg.setOffset(value);
  1814. }
  1815. }
  1816. return msg;
  1817. };
  1818. proto.spine.time.LocalDate.Parser = function() {
  1819. ObjectParser.call(this);
  1820. };
  1821. proto.spine.time.LocalDate.Parser.prototype = Object.create(ObjectParser.prototype);
  1822. proto.spine.time.LocalDate.Parser.prototype.constructor = proto.spine.time.LocalDate.Parser;
  1823. proto.spine.time.LocalDate.Parser.prototype.fromObject = function(obj) {
  1824. if (obj === null) {
  1825. return null;
  1826. }
  1827. let msg = new proto.spine.time.LocalDate();
  1828. if (obj.year !== undefined) {
  1829. if (obj.year !== null) {
  1830. let value = obj.year;
  1831. msg.setYear(value);
  1832. }
  1833. }
  1834. if (obj.month !== undefined) {
  1835. if (obj.month !== null) {
  1836. let value = proto.spine.time.Month[obj.month];
  1837. msg.setMonth(value);
  1838. }
  1839. }
  1840. if (obj.day !== undefined) {
  1841. if (obj.day !== null) {
  1842. let value = obj.day;
  1843. msg.setDay(value);
  1844. }
  1845. }
  1846. return msg;
  1847. };
  1848. proto.spine.time.ZonedDateTime.Parser = function() {
  1849. ObjectParser.call(this);
  1850. };
  1851. proto.spine.time.ZonedDateTime.Parser.prototype = Object.create(ObjectParser.prototype);
  1852. proto.spine.time.ZonedDateTime.Parser.prototype.constructor = proto.spine.time.ZonedDateTime.Parser;
  1853. proto.spine.time.ZonedDateTime.Parser.prototype.fromObject = function(obj) {
  1854. if (obj === null) {
  1855. return null;
  1856. }
  1857. let msg = new proto.spine.time.ZonedDateTime();
  1858. if (obj.dateTime !== undefined) {
  1859. if (obj.dateTime === null) {
  1860. msg.setDateTime(null);
  1861. } else {
  1862. let value = TypeParsers.parserFor('type.spine.io/spine.time.LocalDateTime').fromObject(obj.dateTime);
  1863. msg.setDateTime(value);
  1864. }
  1865. }
  1866. if (obj.zone !== undefined) {
  1867. if (obj.zone === null) {
  1868. msg.setZone(null);
  1869. } else {
  1870. let value = TypeParsers.parserFor('type.spine.io/spine.time.ZoneId').fromObject(obj.zone);
  1871. msg.setZone(value);
  1872. }
  1873. }
  1874. return msg;
  1875. };
  1876. // Generated by Spine ProtoJs Plugin
  1877. proto.spine.time.YearMonth.typeUrl = function() {
  1878. return 'type.spine.io/spine.time.YearMonth';
  1879. };
  1880. // Generated by Spine ProtoJs Plugin
  1881. proto.spine.time.LocalTime.typeUrl = function() {
  1882. return 'type.spine.io/spine.time.LocalTime';
  1883. };
  1884. // Generated by Spine ProtoJs Plugin
  1885. proto.spine.time.OffsetTime.typeUrl = function() {
  1886. return 'type.spine.io/spine.time.OffsetTime';
  1887. };
  1888. // Generated by Spine ProtoJs Plugin
  1889. proto.spine.time.ZoneOffset.typeUrl = function() {
  1890. return 'type.spine.io/spine.time.ZoneOffset';
  1891. };
  1892. // Generated by Spine ProtoJs Plugin
  1893. proto.spine.time.ZoneId.typeUrl = function() {
  1894. return 'type.spine.io/spine.time.ZoneId';
  1895. };
  1896. // Generated by Spine ProtoJs Plugin
  1897. proto.spine.time.LocalDateTime.typeUrl = function() {
  1898. return 'type.spine.io/spine.time.LocalDateTime';
  1899. };
  1900. // Generated by Spine ProtoJs Plugin
  1901. proto.spine.time.OffsetDateTime.typeUrl = function() {
  1902. return 'type.spine.io/spine.time.OffsetDateTime';
  1903. };
  1904. // Generated by Spine ProtoJs Plugin
  1905. proto.spine.time.LocalDate.typeUrl = function() {
  1906. return 'type.spine.io/spine.time.LocalDate';
  1907. };
  1908. // Generated by Spine ProtoJs Plugin
  1909. proto.spine.time.ZonedDateTime.typeUrl = function() {
  1910. return 'type.spine.io/spine.time.ZonedDateTime';
  1911. };
  1912. // Generated by Spine ProtoJs Plugin
  1913. proto.spine.time.DayOfWeek.typeUrl = function() {
  1914. return 'type.spine.io/spine.time.DayOfWeek';
  1915. };
  1916. // Generated by Spine ProtoJs Plugin
  1917. proto.spine.time.Month.typeUrl = function() {
  1918. return 'type.spine.io/spine.time.Month';
  1919. };