Source: proto/spine/time/time_change_pb.js

  1. // source: spine/time/time_change.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 spine_time_time_pb = require('../../spine/time/time_pb.js');
  16. goog.object.extend(proto, spine_time_time_pb);
  17. goog.exportSymbol('proto.spine.time.LocalDateChange', null, global);
  18. goog.exportSymbol('proto.spine.time.LocalTimeChange', null, global);
  19. goog.exportSymbol('proto.spine.time.OffsetDateTimeChange', null, global);
  20. goog.exportSymbol('proto.spine.time.OffsetTimeChange', null, global);
  21. /**
  22. * Generated by JsPbCodeGenerator.
  23. * @param {Array=} opt_data Optional initial data array, typically from a
  24. * server response, or constructed directly in Javascript. The array is used
  25. * in place and becomes part of the constructed object. It is not cloned.
  26. * If no data is provided, the constructed object will be empty, but still
  27. * valid.
  28. * @extends {jspb.Message}
  29. * @constructor
  30. */
  31. proto.spine.time.LocalDateChange = function(opt_data) {
  32. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  33. };
  34. goog.inherits(proto.spine.time.LocalDateChange, jspb.Message);
  35. if (goog.DEBUG && !COMPILED) {
  36. /**
  37. * @public
  38. * @override
  39. */
  40. proto.spine.time.LocalDateChange.displayName = 'proto.spine.time.LocalDateChange';
  41. }
  42. /**
  43. * Generated by JsPbCodeGenerator.
  44. * @param {Array=} opt_data Optional initial data array, typically from a
  45. * server response, or constructed directly in Javascript. The array is used
  46. * in place and becomes part of the constructed object. It is not cloned.
  47. * If no data is provided, the constructed object will be empty, but still
  48. * valid.
  49. * @extends {jspb.Message}
  50. * @constructor
  51. */
  52. proto.spine.time.LocalTimeChange = function(opt_data) {
  53. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  54. };
  55. goog.inherits(proto.spine.time.LocalTimeChange, jspb.Message);
  56. if (goog.DEBUG && !COMPILED) {
  57. /**
  58. * @public
  59. * @override
  60. */
  61. proto.spine.time.LocalTimeChange.displayName = 'proto.spine.time.LocalTimeChange';
  62. }
  63. /**
  64. * Generated by JsPbCodeGenerator.
  65. * @param {Array=} opt_data Optional initial data array, typically from a
  66. * server response, or constructed directly in Javascript. The array is used
  67. * in place and becomes part of the constructed object. It is not cloned.
  68. * If no data is provided, the constructed object will be empty, but still
  69. * valid.
  70. * @extends {jspb.Message}
  71. * @constructor
  72. */
  73. proto.spine.time.OffsetTimeChange = function(opt_data) {
  74. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  75. };
  76. goog.inherits(proto.spine.time.OffsetTimeChange, jspb.Message);
  77. if (goog.DEBUG && !COMPILED) {
  78. /**
  79. * @public
  80. * @override
  81. */
  82. proto.spine.time.OffsetTimeChange.displayName = 'proto.spine.time.OffsetTimeChange';
  83. }
  84. /**
  85. * Generated by JsPbCodeGenerator.
  86. * @param {Array=} opt_data Optional initial data array, typically from a
  87. * server response, or constructed directly in Javascript. The array is used
  88. * in place and becomes part of the constructed object. It is not cloned.
  89. * If no data is provided, the constructed object will be empty, but still
  90. * valid.
  91. * @extends {jspb.Message}
  92. * @constructor
  93. */
  94. proto.spine.time.OffsetDateTimeChange = function(opt_data) {
  95. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  96. };
  97. goog.inherits(proto.spine.time.OffsetDateTimeChange, jspb.Message);
  98. if (goog.DEBUG && !COMPILED) {
  99. /**
  100. * @public
  101. * @override
  102. */
  103. proto.spine.time.OffsetDateTimeChange.displayName = 'proto.spine.time.OffsetDateTimeChange';
  104. }
  105. if (jspb.Message.GENERATE_TO_OBJECT) {
  106. /**
  107. * Creates an object representation of this proto.
  108. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  109. * Optional fields that are not set will be set to undefined.
  110. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  111. * For the list of reserved names please see:
  112. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  113. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  114. * JSPB instance for transitional soy proto support:
  115. * http://goto/soy-param-migration
  116. * @return {!Object}
  117. */
  118. proto.spine.time.LocalDateChange.prototype.toObject = function(opt_includeInstance) {
  119. return proto.spine.time.LocalDateChange.toObject(opt_includeInstance, this);
  120. };
  121. /**
  122. * Static version of the {@see toObject} method.
  123. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  124. * the JSPB instance for transitional soy proto support:
  125. * http://goto/soy-param-migration
  126. * @param {!proto.spine.time.LocalDateChange} msg The msg instance to transform.
  127. * @return {!Object}
  128. * @suppress {unusedLocalVariables} f is only used for nested messages
  129. */
  130. proto.spine.time.LocalDateChange.toObject = function(includeInstance, msg) {
  131. var f, obj = {
  132. previousValue: (f = msg.getPreviousValue()) && spine_time_time_pb.LocalDate.toObject(includeInstance, f),
  133. newValue: (f = msg.getNewValue()) && spine_time_time_pb.LocalDate.toObject(includeInstance, f)
  134. };
  135. if (includeInstance) {
  136. obj.$jspbMessageInstance = msg;
  137. }
  138. return obj;
  139. };
  140. }
  141. /**
  142. * Deserializes binary data (in protobuf wire format).
  143. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  144. * @return {!proto.spine.time.LocalDateChange}
  145. */
  146. proto.spine.time.LocalDateChange.deserializeBinary = function(bytes) {
  147. var reader = new jspb.BinaryReader(bytes);
  148. var msg = new proto.spine.time.LocalDateChange;
  149. return proto.spine.time.LocalDateChange.deserializeBinaryFromReader(msg, reader);
  150. };
  151. /**
  152. * Deserializes binary data (in protobuf wire format) from the
  153. * given reader into the given message object.
  154. * @param {!proto.spine.time.LocalDateChange} msg The message object to deserialize into.
  155. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  156. * @return {!proto.spine.time.LocalDateChange}
  157. */
  158. proto.spine.time.LocalDateChange.deserializeBinaryFromReader = function(msg, reader) {
  159. while (reader.nextField()) {
  160. if (reader.isEndGroup()) {
  161. break;
  162. }
  163. var field = reader.getFieldNumber();
  164. switch (field) {
  165. case 1:
  166. var value = new spine_time_time_pb.LocalDate;
  167. reader.readMessage(value,spine_time_time_pb.LocalDate.deserializeBinaryFromReader);
  168. msg.setPreviousValue(value);
  169. break;
  170. case 2:
  171. var value = new spine_time_time_pb.LocalDate;
  172. reader.readMessage(value,spine_time_time_pb.LocalDate.deserializeBinaryFromReader);
  173. msg.setNewValue(value);
  174. break;
  175. default:
  176. reader.skipField();
  177. break;
  178. }
  179. }
  180. return msg;
  181. };
  182. /**
  183. * Serializes the message to binary data (in protobuf wire format).
  184. * @return {!Uint8Array}
  185. */
  186. proto.spine.time.LocalDateChange.prototype.serializeBinary = function() {
  187. var writer = new jspb.BinaryWriter();
  188. proto.spine.time.LocalDateChange.serializeBinaryToWriter(this, writer);
  189. return writer.getResultBuffer();
  190. };
  191. /**
  192. * Serializes the given message to binary data (in protobuf wire
  193. * format), writing to the given BinaryWriter.
  194. * @param {!proto.spine.time.LocalDateChange} message
  195. * @param {!jspb.BinaryWriter} writer
  196. * @suppress {unusedLocalVariables} f is only used for nested messages
  197. */
  198. proto.spine.time.LocalDateChange.serializeBinaryToWriter = function(message, writer) {
  199. var f = undefined;
  200. f = message.getPreviousValue();
  201. if (f != null) {
  202. writer.writeMessage(
  203. 1,
  204. f,
  205. spine_time_time_pb.LocalDate.serializeBinaryToWriter
  206. );
  207. }
  208. f = message.getNewValue();
  209. if (f != null) {
  210. writer.writeMessage(
  211. 2,
  212. f,
  213. spine_time_time_pb.LocalDate.serializeBinaryToWriter
  214. );
  215. }
  216. };
  217. /**
  218. * optional LocalDate previous_value = 1;
  219. * @return {?proto.spine.time.LocalDate}
  220. */
  221. proto.spine.time.LocalDateChange.prototype.getPreviousValue = function() {
  222. return /** @type{?proto.spine.time.LocalDate} */ (
  223. jspb.Message.getWrapperField(this, spine_time_time_pb.LocalDate, 1));
  224. };
  225. /**
  226. * @param {?proto.spine.time.LocalDate|undefined} value
  227. * @return {!proto.spine.time.LocalDateChange} returns this
  228. */
  229. proto.spine.time.LocalDateChange.prototype.setPreviousValue = function(value) {
  230. return jspb.Message.setWrapperField(this, 1, value);
  231. };
  232. /**
  233. * Clears the message field making it undefined.
  234. * @return {!proto.spine.time.LocalDateChange} returns this
  235. */
  236. proto.spine.time.LocalDateChange.prototype.clearPreviousValue = function() {
  237. return this.setPreviousValue(undefined);
  238. };
  239. /**
  240. * Returns whether this field is set.
  241. * @return {boolean}
  242. */
  243. proto.spine.time.LocalDateChange.prototype.hasPreviousValue = function() {
  244. return jspb.Message.getField(this, 1) != null;
  245. };
  246. /**
  247. * optional LocalDate new_value = 2;
  248. * @return {?proto.spine.time.LocalDate}
  249. */
  250. proto.spine.time.LocalDateChange.prototype.getNewValue = function() {
  251. return /** @type{?proto.spine.time.LocalDate} */ (
  252. jspb.Message.getWrapperField(this, spine_time_time_pb.LocalDate, 2));
  253. };
  254. /**
  255. * @param {?proto.spine.time.LocalDate|undefined} value
  256. * @return {!proto.spine.time.LocalDateChange} returns this
  257. */
  258. proto.spine.time.LocalDateChange.prototype.setNewValue = function(value) {
  259. return jspb.Message.setWrapperField(this, 2, value);
  260. };
  261. /**
  262. * Clears the message field making it undefined.
  263. * @return {!proto.spine.time.LocalDateChange} returns this
  264. */
  265. proto.spine.time.LocalDateChange.prototype.clearNewValue = function() {
  266. return this.setNewValue(undefined);
  267. };
  268. /**
  269. * Returns whether this field is set.
  270. * @return {boolean}
  271. */
  272. proto.spine.time.LocalDateChange.prototype.hasNewValue = function() {
  273. return jspb.Message.getField(this, 2) != null;
  274. };
  275. if (jspb.Message.GENERATE_TO_OBJECT) {
  276. /**
  277. * Creates an object representation of this proto.
  278. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  279. * Optional fields that are not set will be set to undefined.
  280. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  281. * For the list of reserved names please see:
  282. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  283. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  284. * JSPB instance for transitional soy proto support:
  285. * http://goto/soy-param-migration
  286. * @return {!Object}
  287. */
  288. proto.spine.time.LocalTimeChange.prototype.toObject = function(opt_includeInstance) {
  289. return proto.spine.time.LocalTimeChange.toObject(opt_includeInstance, this);
  290. };
  291. /**
  292. * Static version of the {@see toObject} method.
  293. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  294. * the JSPB instance for transitional soy proto support:
  295. * http://goto/soy-param-migration
  296. * @param {!proto.spine.time.LocalTimeChange} msg The msg instance to transform.
  297. * @return {!Object}
  298. * @suppress {unusedLocalVariables} f is only used for nested messages
  299. */
  300. proto.spine.time.LocalTimeChange.toObject = function(includeInstance, msg) {
  301. var f, obj = {
  302. previousValue: (f = msg.getPreviousValue()) && spine_time_time_pb.LocalTime.toObject(includeInstance, f),
  303. newValue: (f = msg.getNewValue()) && spine_time_time_pb.LocalTime.toObject(includeInstance, f)
  304. };
  305. if (includeInstance) {
  306. obj.$jspbMessageInstance = msg;
  307. }
  308. return obj;
  309. };
  310. }
  311. /**
  312. * Deserializes binary data (in protobuf wire format).
  313. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  314. * @return {!proto.spine.time.LocalTimeChange}
  315. */
  316. proto.spine.time.LocalTimeChange.deserializeBinary = function(bytes) {
  317. var reader = new jspb.BinaryReader(bytes);
  318. var msg = new proto.spine.time.LocalTimeChange;
  319. return proto.spine.time.LocalTimeChange.deserializeBinaryFromReader(msg, reader);
  320. };
  321. /**
  322. * Deserializes binary data (in protobuf wire format) from the
  323. * given reader into the given message object.
  324. * @param {!proto.spine.time.LocalTimeChange} msg The message object to deserialize into.
  325. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  326. * @return {!proto.spine.time.LocalTimeChange}
  327. */
  328. proto.spine.time.LocalTimeChange.deserializeBinaryFromReader = function(msg, reader) {
  329. while (reader.nextField()) {
  330. if (reader.isEndGroup()) {
  331. break;
  332. }
  333. var field = reader.getFieldNumber();
  334. switch (field) {
  335. case 1:
  336. var value = new spine_time_time_pb.LocalTime;
  337. reader.readMessage(value,spine_time_time_pb.LocalTime.deserializeBinaryFromReader);
  338. msg.setPreviousValue(value);
  339. break;
  340. case 2:
  341. var value = new spine_time_time_pb.LocalTime;
  342. reader.readMessage(value,spine_time_time_pb.LocalTime.deserializeBinaryFromReader);
  343. msg.setNewValue(value);
  344. break;
  345. default:
  346. reader.skipField();
  347. break;
  348. }
  349. }
  350. return msg;
  351. };
  352. /**
  353. * Serializes the message to binary data (in protobuf wire format).
  354. * @return {!Uint8Array}
  355. */
  356. proto.spine.time.LocalTimeChange.prototype.serializeBinary = function() {
  357. var writer = new jspb.BinaryWriter();
  358. proto.spine.time.LocalTimeChange.serializeBinaryToWriter(this, writer);
  359. return writer.getResultBuffer();
  360. };
  361. /**
  362. * Serializes the given message to binary data (in protobuf wire
  363. * format), writing to the given BinaryWriter.
  364. * @param {!proto.spine.time.LocalTimeChange} message
  365. * @param {!jspb.BinaryWriter} writer
  366. * @suppress {unusedLocalVariables} f is only used for nested messages
  367. */
  368. proto.spine.time.LocalTimeChange.serializeBinaryToWriter = function(message, writer) {
  369. var f = undefined;
  370. f = message.getPreviousValue();
  371. if (f != null) {
  372. writer.writeMessage(
  373. 1,
  374. f,
  375. spine_time_time_pb.LocalTime.serializeBinaryToWriter
  376. );
  377. }
  378. f = message.getNewValue();
  379. if (f != null) {
  380. writer.writeMessage(
  381. 2,
  382. f,
  383. spine_time_time_pb.LocalTime.serializeBinaryToWriter
  384. );
  385. }
  386. };
  387. /**
  388. * optional LocalTime previous_value = 1;
  389. * @return {?proto.spine.time.LocalTime}
  390. */
  391. proto.spine.time.LocalTimeChange.prototype.getPreviousValue = function() {
  392. return /** @type{?proto.spine.time.LocalTime} */ (
  393. jspb.Message.getWrapperField(this, spine_time_time_pb.LocalTime, 1));
  394. };
  395. /**
  396. * @param {?proto.spine.time.LocalTime|undefined} value
  397. * @return {!proto.spine.time.LocalTimeChange} returns this
  398. */
  399. proto.spine.time.LocalTimeChange.prototype.setPreviousValue = function(value) {
  400. return jspb.Message.setWrapperField(this, 1, value);
  401. };
  402. /**
  403. * Clears the message field making it undefined.
  404. * @return {!proto.spine.time.LocalTimeChange} returns this
  405. */
  406. proto.spine.time.LocalTimeChange.prototype.clearPreviousValue = function() {
  407. return this.setPreviousValue(undefined);
  408. };
  409. /**
  410. * Returns whether this field is set.
  411. * @return {boolean}
  412. */
  413. proto.spine.time.LocalTimeChange.prototype.hasPreviousValue = function() {
  414. return jspb.Message.getField(this, 1) != null;
  415. };
  416. /**
  417. * optional LocalTime new_value = 2;
  418. * @return {?proto.spine.time.LocalTime}
  419. */
  420. proto.spine.time.LocalTimeChange.prototype.getNewValue = function() {
  421. return /** @type{?proto.spine.time.LocalTime} */ (
  422. jspb.Message.getWrapperField(this, spine_time_time_pb.LocalTime, 2));
  423. };
  424. /**
  425. * @param {?proto.spine.time.LocalTime|undefined} value
  426. * @return {!proto.spine.time.LocalTimeChange} returns this
  427. */
  428. proto.spine.time.LocalTimeChange.prototype.setNewValue = function(value) {
  429. return jspb.Message.setWrapperField(this, 2, value);
  430. };
  431. /**
  432. * Clears the message field making it undefined.
  433. * @return {!proto.spine.time.LocalTimeChange} returns this
  434. */
  435. proto.spine.time.LocalTimeChange.prototype.clearNewValue = function() {
  436. return this.setNewValue(undefined);
  437. };
  438. /**
  439. * Returns whether this field is set.
  440. * @return {boolean}
  441. */
  442. proto.spine.time.LocalTimeChange.prototype.hasNewValue = function() {
  443. return jspb.Message.getField(this, 2) != null;
  444. };
  445. if (jspb.Message.GENERATE_TO_OBJECT) {
  446. /**
  447. * Creates an object representation of this proto.
  448. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  449. * Optional fields that are not set will be set to undefined.
  450. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  451. * For the list of reserved names please see:
  452. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  453. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  454. * JSPB instance for transitional soy proto support:
  455. * http://goto/soy-param-migration
  456. * @return {!Object}
  457. */
  458. proto.spine.time.OffsetTimeChange.prototype.toObject = function(opt_includeInstance) {
  459. return proto.spine.time.OffsetTimeChange.toObject(opt_includeInstance, this);
  460. };
  461. /**
  462. * Static version of the {@see toObject} method.
  463. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  464. * the JSPB instance for transitional soy proto support:
  465. * http://goto/soy-param-migration
  466. * @param {!proto.spine.time.OffsetTimeChange} msg The msg instance to transform.
  467. * @return {!Object}
  468. * @suppress {unusedLocalVariables} f is only used for nested messages
  469. */
  470. proto.spine.time.OffsetTimeChange.toObject = function(includeInstance, msg) {
  471. var f, obj = {
  472. previousValue: (f = msg.getPreviousValue()) && spine_time_time_pb.OffsetTime.toObject(includeInstance, f),
  473. newValue: (f = msg.getNewValue()) && spine_time_time_pb.OffsetTime.toObject(includeInstance, f)
  474. };
  475. if (includeInstance) {
  476. obj.$jspbMessageInstance = msg;
  477. }
  478. return obj;
  479. };
  480. }
  481. /**
  482. * Deserializes binary data (in protobuf wire format).
  483. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  484. * @return {!proto.spine.time.OffsetTimeChange}
  485. */
  486. proto.spine.time.OffsetTimeChange.deserializeBinary = function(bytes) {
  487. var reader = new jspb.BinaryReader(bytes);
  488. var msg = new proto.spine.time.OffsetTimeChange;
  489. return proto.spine.time.OffsetTimeChange.deserializeBinaryFromReader(msg, reader);
  490. };
  491. /**
  492. * Deserializes binary data (in protobuf wire format) from the
  493. * given reader into the given message object.
  494. * @param {!proto.spine.time.OffsetTimeChange} msg The message object to deserialize into.
  495. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  496. * @return {!proto.spine.time.OffsetTimeChange}
  497. */
  498. proto.spine.time.OffsetTimeChange.deserializeBinaryFromReader = function(msg, reader) {
  499. while (reader.nextField()) {
  500. if (reader.isEndGroup()) {
  501. break;
  502. }
  503. var field = reader.getFieldNumber();
  504. switch (field) {
  505. case 1:
  506. var value = new spine_time_time_pb.OffsetTime;
  507. reader.readMessage(value,spine_time_time_pb.OffsetTime.deserializeBinaryFromReader);
  508. msg.setPreviousValue(value);
  509. break;
  510. case 2:
  511. var value = new spine_time_time_pb.OffsetTime;
  512. reader.readMessage(value,spine_time_time_pb.OffsetTime.deserializeBinaryFromReader);
  513. msg.setNewValue(value);
  514. break;
  515. default:
  516. reader.skipField();
  517. break;
  518. }
  519. }
  520. return msg;
  521. };
  522. /**
  523. * Serializes the message to binary data (in protobuf wire format).
  524. * @return {!Uint8Array}
  525. */
  526. proto.spine.time.OffsetTimeChange.prototype.serializeBinary = function() {
  527. var writer = new jspb.BinaryWriter();
  528. proto.spine.time.OffsetTimeChange.serializeBinaryToWriter(this, writer);
  529. return writer.getResultBuffer();
  530. };
  531. /**
  532. * Serializes the given message to binary data (in protobuf wire
  533. * format), writing to the given BinaryWriter.
  534. * @param {!proto.spine.time.OffsetTimeChange} message
  535. * @param {!jspb.BinaryWriter} writer
  536. * @suppress {unusedLocalVariables} f is only used for nested messages
  537. */
  538. proto.spine.time.OffsetTimeChange.serializeBinaryToWriter = function(message, writer) {
  539. var f = undefined;
  540. f = message.getPreviousValue();
  541. if (f != null) {
  542. writer.writeMessage(
  543. 1,
  544. f,
  545. spine_time_time_pb.OffsetTime.serializeBinaryToWriter
  546. );
  547. }
  548. f = message.getNewValue();
  549. if (f != null) {
  550. writer.writeMessage(
  551. 2,
  552. f,
  553. spine_time_time_pb.OffsetTime.serializeBinaryToWriter
  554. );
  555. }
  556. };
  557. /**
  558. * optional OffsetTime previous_value = 1;
  559. * @return {?proto.spine.time.OffsetTime}
  560. */
  561. proto.spine.time.OffsetTimeChange.prototype.getPreviousValue = function() {
  562. return /** @type{?proto.spine.time.OffsetTime} */ (
  563. jspb.Message.getWrapperField(this, spine_time_time_pb.OffsetTime, 1));
  564. };
  565. /**
  566. * @param {?proto.spine.time.OffsetTime|undefined} value
  567. * @return {!proto.spine.time.OffsetTimeChange} returns this
  568. */
  569. proto.spine.time.OffsetTimeChange.prototype.setPreviousValue = function(value) {
  570. return jspb.Message.setWrapperField(this, 1, value);
  571. };
  572. /**
  573. * Clears the message field making it undefined.
  574. * @return {!proto.spine.time.OffsetTimeChange} returns this
  575. */
  576. proto.spine.time.OffsetTimeChange.prototype.clearPreviousValue = function() {
  577. return this.setPreviousValue(undefined);
  578. };
  579. /**
  580. * Returns whether this field is set.
  581. * @return {boolean}
  582. */
  583. proto.spine.time.OffsetTimeChange.prototype.hasPreviousValue = function() {
  584. return jspb.Message.getField(this, 1) != null;
  585. };
  586. /**
  587. * optional OffsetTime new_value = 2;
  588. * @return {?proto.spine.time.OffsetTime}
  589. */
  590. proto.spine.time.OffsetTimeChange.prototype.getNewValue = function() {
  591. return /** @type{?proto.spine.time.OffsetTime} */ (
  592. jspb.Message.getWrapperField(this, spine_time_time_pb.OffsetTime, 2));
  593. };
  594. /**
  595. * @param {?proto.spine.time.OffsetTime|undefined} value
  596. * @return {!proto.spine.time.OffsetTimeChange} returns this
  597. */
  598. proto.spine.time.OffsetTimeChange.prototype.setNewValue = function(value) {
  599. return jspb.Message.setWrapperField(this, 2, value);
  600. };
  601. /**
  602. * Clears the message field making it undefined.
  603. * @return {!proto.spine.time.OffsetTimeChange} returns this
  604. */
  605. proto.spine.time.OffsetTimeChange.prototype.clearNewValue = function() {
  606. return this.setNewValue(undefined);
  607. };
  608. /**
  609. * Returns whether this field is set.
  610. * @return {boolean}
  611. */
  612. proto.spine.time.OffsetTimeChange.prototype.hasNewValue = function() {
  613. return jspb.Message.getField(this, 2) != null;
  614. };
  615. if (jspb.Message.GENERATE_TO_OBJECT) {
  616. /**
  617. * Creates an object representation of this proto.
  618. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  619. * Optional fields that are not set will be set to undefined.
  620. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  621. * For the list of reserved names please see:
  622. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  623. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  624. * JSPB instance for transitional soy proto support:
  625. * http://goto/soy-param-migration
  626. * @return {!Object}
  627. */
  628. proto.spine.time.OffsetDateTimeChange.prototype.toObject = function(opt_includeInstance) {
  629. return proto.spine.time.OffsetDateTimeChange.toObject(opt_includeInstance, this);
  630. };
  631. /**
  632. * Static version of the {@see toObject} method.
  633. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  634. * the JSPB instance for transitional soy proto support:
  635. * http://goto/soy-param-migration
  636. * @param {!proto.spine.time.OffsetDateTimeChange} msg The msg instance to transform.
  637. * @return {!Object}
  638. * @suppress {unusedLocalVariables} f is only used for nested messages
  639. */
  640. proto.spine.time.OffsetDateTimeChange.toObject = function(includeInstance, msg) {
  641. var f, obj = {
  642. previousValue: (f = msg.getPreviousValue()) && spine_time_time_pb.OffsetDateTime.toObject(includeInstance, f),
  643. newValue: (f = msg.getNewValue()) && spine_time_time_pb.OffsetDateTime.toObject(includeInstance, f)
  644. };
  645. if (includeInstance) {
  646. obj.$jspbMessageInstance = msg;
  647. }
  648. return obj;
  649. };
  650. }
  651. /**
  652. * Deserializes binary data (in protobuf wire format).
  653. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  654. * @return {!proto.spine.time.OffsetDateTimeChange}
  655. */
  656. proto.spine.time.OffsetDateTimeChange.deserializeBinary = function(bytes) {
  657. var reader = new jspb.BinaryReader(bytes);
  658. var msg = new proto.spine.time.OffsetDateTimeChange;
  659. return proto.spine.time.OffsetDateTimeChange.deserializeBinaryFromReader(msg, reader);
  660. };
  661. /**
  662. * Deserializes binary data (in protobuf wire format) from the
  663. * given reader into the given message object.
  664. * @param {!proto.spine.time.OffsetDateTimeChange} msg The message object to deserialize into.
  665. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  666. * @return {!proto.spine.time.OffsetDateTimeChange}
  667. */
  668. proto.spine.time.OffsetDateTimeChange.deserializeBinaryFromReader = function(msg, reader) {
  669. while (reader.nextField()) {
  670. if (reader.isEndGroup()) {
  671. break;
  672. }
  673. var field = reader.getFieldNumber();
  674. switch (field) {
  675. case 1:
  676. var value = new spine_time_time_pb.OffsetDateTime;
  677. reader.readMessage(value,spine_time_time_pb.OffsetDateTime.deserializeBinaryFromReader);
  678. msg.setPreviousValue(value);
  679. break;
  680. case 2:
  681. var value = new spine_time_time_pb.OffsetDateTime;
  682. reader.readMessage(value,spine_time_time_pb.OffsetDateTime.deserializeBinaryFromReader);
  683. msg.setNewValue(value);
  684. break;
  685. default:
  686. reader.skipField();
  687. break;
  688. }
  689. }
  690. return msg;
  691. };
  692. /**
  693. * Serializes the message to binary data (in protobuf wire format).
  694. * @return {!Uint8Array}
  695. */
  696. proto.spine.time.OffsetDateTimeChange.prototype.serializeBinary = function() {
  697. var writer = new jspb.BinaryWriter();
  698. proto.spine.time.OffsetDateTimeChange.serializeBinaryToWriter(this, writer);
  699. return writer.getResultBuffer();
  700. };
  701. /**
  702. * Serializes the given message to binary data (in protobuf wire
  703. * format), writing to the given BinaryWriter.
  704. * @param {!proto.spine.time.OffsetDateTimeChange} message
  705. * @param {!jspb.BinaryWriter} writer
  706. * @suppress {unusedLocalVariables} f is only used for nested messages
  707. */
  708. proto.spine.time.OffsetDateTimeChange.serializeBinaryToWriter = function(message, writer) {
  709. var f = undefined;
  710. f = message.getPreviousValue();
  711. if (f != null) {
  712. writer.writeMessage(
  713. 1,
  714. f,
  715. spine_time_time_pb.OffsetDateTime.serializeBinaryToWriter
  716. );
  717. }
  718. f = message.getNewValue();
  719. if (f != null) {
  720. writer.writeMessage(
  721. 2,
  722. f,
  723. spine_time_time_pb.OffsetDateTime.serializeBinaryToWriter
  724. );
  725. }
  726. };
  727. /**
  728. * optional OffsetDateTime previous_value = 1;
  729. * @return {?proto.spine.time.OffsetDateTime}
  730. */
  731. proto.spine.time.OffsetDateTimeChange.prototype.getPreviousValue = function() {
  732. return /** @type{?proto.spine.time.OffsetDateTime} */ (
  733. jspb.Message.getWrapperField(this, spine_time_time_pb.OffsetDateTime, 1));
  734. };
  735. /**
  736. * @param {?proto.spine.time.OffsetDateTime|undefined} value
  737. * @return {!proto.spine.time.OffsetDateTimeChange} returns this
  738. */
  739. proto.spine.time.OffsetDateTimeChange.prototype.setPreviousValue = function(value) {
  740. return jspb.Message.setWrapperField(this, 1, value);
  741. };
  742. /**
  743. * Clears the message field making it undefined.
  744. * @return {!proto.spine.time.OffsetDateTimeChange} returns this
  745. */
  746. proto.spine.time.OffsetDateTimeChange.prototype.clearPreviousValue = function() {
  747. return this.setPreviousValue(undefined);
  748. };
  749. /**
  750. * Returns whether this field is set.
  751. * @return {boolean}
  752. */
  753. proto.spine.time.OffsetDateTimeChange.prototype.hasPreviousValue = function() {
  754. return jspb.Message.getField(this, 1) != null;
  755. };
  756. /**
  757. * optional OffsetDateTime new_value = 2;
  758. * @return {?proto.spine.time.OffsetDateTime}
  759. */
  760. proto.spine.time.OffsetDateTimeChange.prototype.getNewValue = function() {
  761. return /** @type{?proto.spine.time.OffsetDateTime} */ (
  762. jspb.Message.getWrapperField(this, spine_time_time_pb.OffsetDateTime, 2));
  763. };
  764. /**
  765. * @param {?proto.spine.time.OffsetDateTime|undefined} value
  766. * @return {!proto.spine.time.OffsetDateTimeChange} returns this
  767. */
  768. proto.spine.time.OffsetDateTimeChange.prototype.setNewValue = function(value) {
  769. return jspb.Message.setWrapperField(this, 2, value);
  770. };
  771. /**
  772. * Clears the message field making it undefined.
  773. * @return {!proto.spine.time.OffsetDateTimeChange} returns this
  774. */
  775. proto.spine.time.OffsetDateTimeChange.prototype.clearNewValue = function() {
  776. return this.setNewValue(undefined);
  777. };
  778. /**
  779. * Returns whether this field is set.
  780. * @return {boolean}
  781. */
  782. proto.spine.time.OffsetDateTimeChange.prototype.hasNewValue = function() {
  783. return jspb.Message.getField(this, 2) != null;
  784. };
  785. goog.object.extend(exports, proto.spine.time);
  786. // Generated by Spine ProtoJs Plugin
  787. let ObjectParser = require('../../../client/parser/object-parser.js').default;
  788. let TypeParsers = require('../../../client/parser/type-parsers.js').default;
  789. proto.spine.time.LocalTimeChange.Parser = function() {
  790. ObjectParser.call(this);
  791. };
  792. proto.spine.time.LocalTimeChange.Parser.prototype = Object.create(ObjectParser.prototype);
  793. proto.spine.time.LocalTimeChange.Parser.prototype.constructor = proto.spine.time.LocalTimeChange.Parser;
  794. proto.spine.time.LocalTimeChange.Parser.prototype.fromObject = function(obj) {
  795. if (obj === null) {
  796. return null;
  797. }
  798. let msg = new proto.spine.time.LocalTimeChange();
  799. if (obj.previousValue !== undefined) {
  800. if (obj.previousValue === null) {
  801. msg.setPreviousValue(null);
  802. } else {
  803. let value = TypeParsers.parserFor('type.spine.io/spine.time.LocalTime').fromObject(obj.previousValue);
  804. msg.setPreviousValue(value);
  805. }
  806. }
  807. if (obj.newValue !== undefined) {
  808. if (obj.newValue === null) {
  809. msg.setNewValue(null);
  810. } else {
  811. let value = TypeParsers.parserFor('type.spine.io/spine.time.LocalTime').fromObject(obj.newValue);
  812. msg.setNewValue(value);
  813. }
  814. }
  815. return msg;
  816. };
  817. proto.spine.time.LocalDateChange.Parser = function() {
  818. ObjectParser.call(this);
  819. };
  820. proto.spine.time.LocalDateChange.Parser.prototype = Object.create(ObjectParser.prototype);
  821. proto.spine.time.LocalDateChange.Parser.prototype.constructor = proto.spine.time.LocalDateChange.Parser;
  822. proto.spine.time.LocalDateChange.Parser.prototype.fromObject = function(obj) {
  823. if (obj === null) {
  824. return null;
  825. }
  826. let msg = new proto.spine.time.LocalDateChange();
  827. if (obj.previousValue !== undefined) {
  828. if (obj.previousValue === null) {
  829. msg.setPreviousValue(null);
  830. } else {
  831. let value = TypeParsers.parserFor('type.spine.io/spine.time.LocalDate').fromObject(obj.previousValue);
  832. msg.setPreviousValue(value);
  833. }
  834. }
  835. if (obj.newValue !== undefined) {
  836. if (obj.newValue === null) {
  837. msg.setNewValue(null);
  838. } else {
  839. let value = TypeParsers.parserFor('type.spine.io/spine.time.LocalDate').fromObject(obj.newValue);
  840. msg.setNewValue(value);
  841. }
  842. }
  843. return msg;
  844. };
  845. proto.spine.time.OffsetTimeChange.Parser = function() {
  846. ObjectParser.call(this);
  847. };
  848. proto.spine.time.OffsetTimeChange.Parser.prototype = Object.create(ObjectParser.prototype);
  849. proto.spine.time.OffsetTimeChange.Parser.prototype.constructor = proto.spine.time.OffsetTimeChange.Parser;
  850. proto.spine.time.OffsetTimeChange.Parser.prototype.fromObject = function(obj) {
  851. if (obj === null) {
  852. return null;
  853. }
  854. let msg = new proto.spine.time.OffsetTimeChange();
  855. if (obj.previousValue !== undefined) {
  856. if (obj.previousValue === null) {
  857. msg.setPreviousValue(null);
  858. } else {
  859. let value = TypeParsers.parserFor('type.spine.io/spine.time.OffsetTime').fromObject(obj.previousValue);
  860. msg.setPreviousValue(value);
  861. }
  862. }
  863. if (obj.newValue !== undefined) {
  864. if (obj.newValue === null) {
  865. msg.setNewValue(null);
  866. } else {
  867. let value = TypeParsers.parserFor('type.spine.io/spine.time.OffsetTime').fromObject(obj.newValue);
  868. msg.setNewValue(value);
  869. }
  870. }
  871. return msg;
  872. };
  873. proto.spine.time.OffsetDateTimeChange.Parser = function() {
  874. ObjectParser.call(this);
  875. };
  876. proto.spine.time.OffsetDateTimeChange.Parser.prototype = Object.create(ObjectParser.prototype);
  877. proto.spine.time.OffsetDateTimeChange.Parser.prototype.constructor = proto.spine.time.OffsetDateTimeChange.Parser;
  878. proto.spine.time.OffsetDateTimeChange.Parser.prototype.fromObject = function(obj) {
  879. if (obj === null) {
  880. return null;
  881. }
  882. let msg = new proto.spine.time.OffsetDateTimeChange();
  883. if (obj.previousValue !== undefined) {
  884. if (obj.previousValue === null) {
  885. msg.setPreviousValue(null);
  886. } else {
  887. let value = TypeParsers.parserFor('type.spine.io/spine.time.OffsetDateTime').fromObject(obj.previousValue);
  888. msg.setPreviousValue(value);
  889. }
  890. }
  891. if (obj.newValue !== undefined) {
  892. if (obj.newValue === null) {
  893. msg.setNewValue(null);
  894. } else {
  895. let value = TypeParsers.parserFor('type.spine.io/spine.time.OffsetDateTime').fromObject(obj.newValue);
  896. msg.setNewValue(value);
  897. }
  898. }
  899. return msg;
  900. };
  901. // Generated by Spine ProtoJs Plugin
  902. proto.spine.time.LocalTimeChange.typeUrl = function() {
  903. return 'type.spine.io/spine.time.LocalTimeChange';
  904. };
  905. // Generated by Spine ProtoJs Plugin
  906. proto.spine.time.LocalDateChange.typeUrl = function() {
  907. return 'type.spine.io/spine.time.LocalDateChange';
  908. };
  909. // Generated by Spine ProtoJs Plugin
  910. proto.spine.time.OffsetTimeChange.typeUrl = function() {
  911. return 'type.spine.io/spine.time.OffsetTimeChange';
  912. };
  913. // Generated by Spine ProtoJs Plugin
  914. proto.spine.time.OffsetDateTimeChange.typeUrl = function() {
  915. return 'type.spine.io/spine.time.OffsetDateTimeChange';
  916. };