Source: proto/spine/core/command_pb.js

  1. // source: spine/core/command.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. var google_protobuf_duration_pb = require('../../google/protobuf/duration_pb.js');
  18. goog.object.extend(proto, google_protobuf_duration_pb);
  19. var google_protobuf_any_pb = require('../../google/protobuf/any_pb.js');
  20. goog.object.extend(proto, google_protobuf_any_pb);
  21. var spine_core_actor_context_pb = require('../../spine/core/actor_context_pb.js');
  22. goog.object.extend(proto, spine_core_actor_context_pb);
  23. var spine_core_diagnostics_pb = require('../../spine/core/diagnostics_pb.js');
  24. goog.object.extend(proto, spine_core_diagnostics_pb);
  25. goog.exportSymbol('proto.spine.core.Command', null, global);
  26. goog.exportSymbol('proto.spine.core.Command.SystemProperties', null, global);
  27. goog.exportSymbol('proto.spine.core.CommandContext', null, global);
  28. goog.exportSymbol('proto.spine.core.CommandContext.Schedule', null, global);
  29. goog.exportSymbol('proto.spine.core.CommandId', null, global);
  30. goog.exportSymbol('proto.spine.core.CommandValidationError', null, global);
  31. /**
  32. * Generated by JsPbCodeGenerator.
  33. * @param {Array=} opt_data Optional initial data array, typically from a
  34. * server response, or constructed directly in Javascript. The array is used
  35. * in place and becomes part of the constructed object. It is not cloned.
  36. * If no data is provided, the constructed object will be empty, but still
  37. * valid.
  38. * @extends {jspb.Message}
  39. * @constructor
  40. */
  41. proto.spine.core.CommandId = function(opt_data) {
  42. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  43. };
  44. goog.inherits(proto.spine.core.CommandId, jspb.Message);
  45. if (goog.DEBUG && !COMPILED) {
  46. /**
  47. * @public
  48. * @override
  49. */
  50. proto.spine.core.CommandId.displayName = 'proto.spine.core.CommandId';
  51. }
  52. /**
  53. * Generated by JsPbCodeGenerator.
  54. * @param {Array=} opt_data Optional initial data array, typically from a
  55. * server response, or constructed directly in Javascript. The array is used
  56. * in place and becomes part of the constructed object. It is not cloned.
  57. * If no data is provided, the constructed object will be empty, but still
  58. * valid.
  59. * @extends {jspb.Message}
  60. * @constructor
  61. */
  62. proto.spine.core.Command = function(opt_data) {
  63. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  64. };
  65. goog.inherits(proto.spine.core.Command, jspb.Message);
  66. if (goog.DEBUG && !COMPILED) {
  67. /**
  68. * @public
  69. * @override
  70. */
  71. proto.spine.core.Command.displayName = 'proto.spine.core.Command';
  72. }
  73. /**
  74. * Generated by JsPbCodeGenerator.
  75. * @param {Array=} opt_data Optional initial data array, typically from a
  76. * server response, or constructed directly in Javascript. The array is used
  77. * in place and becomes part of the constructed object. It is not cloned.
  78. * If no data is provided, the constructed object will be empty, but still
  79. * valid.
  80. * @extends {jspb.Message}
  81. * @constructor
  82. */
  83. proto.spine.core.Command.SystemProperties = function(opt_data) {
  84. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  85. };
  86. goog.inherits(proto.spine.core.Command.SystemProperties, jspb.Message);
  87. if (goog.DEBUG && !COMPILED) {
  88. /**
  89. * @public
  90. * @override
  91. */
  92. proto.spine.core.Command.SystemProperties.displayName = 'proto.spine.core.Command.SystemProperties';
  93. }
  94. /**
  95. * Generated by JsPbCodeGenerator.
  96. * @param {Array=} opt_data Optional initial data array, typically from a
  97. * server response, or constructed directly in Javascript. The array is used
  98. * in place and becomes part of the constructed object. It is not cloned.
  99. * If no data is provided, the constructed object will be empty, but still
  100. * valid.
  101. * @extends {jspb.Message}
  102. * @constructor
  103. */
  104. proto.spine.core.CommandContext = function(opt_data) {
  105. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  106. };
  107. goog.inherits(proto.spine.core.CommandContext, jspb.Message);
  108. if (goog.DEBUG && !COMPILED) {
  109. /**
  110. * @public
  111. * @override
  112. */
  113. proto.spine.core.CommandContext.displayName = 'proto.spine.core.CommandContext';
  114. }
  115. /**
  116. * Generated by JsPbCodeGenerator.
  117. * @param {Array=} opt_data Optional initial data array, typically from a
  118. * server response, or constructed directly in Javascript. The array is used
  119. * in place and becomes part of the constructed object. It is not cloned.
  120. * If no data is provided, the constructed object will be empty, but still
  121. * valid.
  122. * @extends {jspb.Message}
  123. * @constructor
  124. */
  125. proto.spine.core.CommandContext.Schedule = function(opt_data) {
  126. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  127. };
  128. goog.inherits(proto.spine.core.CommandContext.Schedule, jspb.Message);
  129. if (goog.DEBUG && !COMPILED) {
  130. /**
  131. * @public
  132. * @override
  133. */
  134. proto.spine.core.CommandContext.Schedule.displayName = 'proto.spine.core.CommandContext.Schedule';
  135. }
  136. if (jspb.Message.GENERATE_TO_OBJECT) {
  137. /**
  138. * Creates an object representation of this proto.
  139. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  140. * Optional fields that are not set will be set to undefined.
  141. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  142. * For the list of reserved names please see:
  143. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  144. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  145. * JSPB instance for transitional soy proto support:
  146. * http://goto/soy-param-migration
  147. * @return {!Object}
  148. */
  149. proto.spine.core.CommandId.prototype.toObject = function(opt_includeInstance) {
  150. return proto.spine.core.CommandId.toObject(opt_includeInstance, this);
  151. };
  152. /**
  153. * Static version of the {@see toObject} method.
  154. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  155. * the JSPB instance for transitional soy proto support:
  156. * http://goto/soy-param-migration
  157. * @param {!proto.spine.core.CommandId} msg The msg instance to transform.
  158. * @return {!Object}
  159. * @suppress {unusedLocalVariables} f is only used for nested messages
  160. */
  161. proto.spine.core.CommandId.toObject = function(includeInstance, msg) {
  162. var f, obj = {
  163. uuid: jspb.Message.getFieldWithDefault(msg, 1, "")
  164. };
  165. if (includeInstance) {
  166. obj.$jspbMessageInstance = msg;
  167. }
  168. return obj;
  169. };
  170. }
  171. /**
  172. * Deserializes binary data (in protobuf wire format).
  173. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  174. * @return {!proto.spine.core.CommandId}
  175. */
  176. proto.spine.core.CommandId.deserializeBinary = function(bytes) {
  177. var reader = new jspb.BinaryReader(bytes);
  178. var msg = new proto.spine.core.CommandId;
  179. return proto.spine.core.CommandId.deserializeBinaryFromReader(msg, reader);
  180. };
  181. /**
  182. * Deserializes binary data (in protobuf wire format) from the
  183. * given reader into the given message object.
  184. * @param {!proto.spine.core.CommandId} msg The message object to deserialize into.
  185. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  186. * @return {!proto.spine.core.CommandId}
  187. */
  188. proto.spine.core.CommandId.deserializeBinaryFromReader = function(msg, reader) {
  189. while (reader.nextField()) {
  190. if (reader.isEndGroup()) {
  191. break;
  192. }
  193. var field = reader.getFieldNumber();
  194. switch (field) {
  195. case 1:
  196. var value = /** @type {string} */ (reader.readString());
  197. msg.setUuid(value);
  198. break;
  199. default:
  200. reader.skipField();
  201. break;
  202. }
  203. }
  204. return msg;
  205. };
  206. /**
  207. * Serializes the message to binary data (in protobuf wire format).
  208. * @return {!Uint8Array}
  209. */
  210. proto.spine.core.CommandId.prototype.serializeBinary = function() {
  211. var writer = new jspb.BinaryWriter();
  212. proto.spine.core.CommandId.serializeBinaryToWriter(this, writer);
  213. return writer.getResultBuffer();
  214. };
  215. /**
  216. * Serializes the given message to binary data (in protobuf wire
  217. * format), writing to the given BinaryWriter.
  218. * @param {!proto.spine.core.CommandId} message
  219. * @param {!jspb.BinaryWriter} writer
  220. * @suppress {unusedLocalVariables} f is only used for nested messages
  221. */
  222. proto.spine.core.CommandId.serializeBinaryToWriter = function(message, writer) {
  223. var f = undefined;
  224. f = message.getUuid();
  225. if (f.length > 0) {
  226. writer.writeString(
  227. 1,
  228. f
  229. );
  230. }
  231. };
  232. /**
  233. * optional string uuid = 1;
  234. * @return {string}
  235. */
  236. proto.spine.core.CommandId.prototype.getUuid = function() {
  237. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
  238. };
  239. /**
  240. * @param {string} value
  241. * @return {!proto.spine.core.CommandId} returns this
  242. */
  243. proto.spine.core.CommandId.prototype.setUuid = function(value) {
  244. return jspb.Message.setProto3StringField(this, 1, value);
  245. };
  246. if (jspb.Message.GENERATE_TO_OBJECT) {
  247. /**
  248. * Creates an object representation of this proto.
  249. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  250. * Optional fields that are not set will be set to undefined.
  251. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  252. * For the list of reserved names please see:
  253. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  254. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  255. * JSPB instance for transitional soy proto support:
  256. * http://goto/soy-param-migration
  257. * @return {!Object}
  258. */
  259. proto.spine.core.Command.prototype.toObject = function(opt_includeInstance) {
  260. return proto.spine.core.Command.toObject(opt_includeInstance, this);
  261. };
  262. /**
  263. * Static version of the {@see toObject} method.
  264. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  265. * the JSPB instance for transitional soy proto support:
  266. * http://goto/soy-param-migration
  267. * @param {!proto.spine.core.Command} msg The msg instance to transform.
  268. * @return {!Object}
  269. * @suppress {unusedLocalVariables} f is only used for nested messages
  270. */
  271. proto.spine.core.Command.toObject = function(includeInstance, msg) {
  272. var f, obj = {
  273. id: (f = msg.getId()) && proto.spine.core.CommandId.toObject(includeInstance, f),
  274. message: (f = msg.getMessage()) && google_protobuf_any_pb.Any.toObject(includeInstance, f),
  275. context: (f = msg.getContext()) && proto.spine.core.CommandContext.toObject(includeInstance, f),
  276. systemProperties: (f = msg.getSystemProperties()) && proto.spine.core.Command.SystemProperties.toObject(includeInstance, f)
  277. };
  278. if (includeInstance) {
  279. obj.$jspbMessageInstance = msg;
  280. }
  281. return obj;
  282. };
  283. }
  284. /**
  285. * Deserializes binary data (in protobuf wire format).
  286. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  287. * @return {!proto.spine.core.Command}
  288. */
  289. proto.spine.core.Command.deserializeBinary = function(bytes) {
  290. var reader = new jspb.BinaryReader(bytes);
  291. var msg = new proto.spine.core.Command;
  292. return proto.spine.core.Command.deserializeBinaryFromReader(msg, reader);
  293. };
  294. /**
  295. * Deserializes binary data (in protobuf wire format) from the
  296. * given reader into the given message object.
  297. * @param {!proto.spine.core.Command} msg The message object to deserialize into.
  298. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  299. * @return {!proto.spine.core.Command}
  300. */
  301. proto.spine.core.Command.deserializeBinaryFromReader = function(msg, reader) {
  302. while (reader.nextField()) {
  303. if (reader.isEndGroup()) {
  304. break;
  305. }
  306. var field = reader.getFieldNumber();
  307. switch (field) {
  308. case 1:
  309. var value = new proto.spine.core.CommandId;
  310. reader.readMessage(value,proto.spine.core.CommandId.deserializeBinaryFromReader);
  311. msg.setId(value);
  312. break;
  313. case 2:
  314. var value = new google_protobuf_any_pb.Any;
  315. reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader);
  316. msg.setMessage(value);
  317. break;
  318. case 3:
  319. var value = new proto.spine.core.CommandContext;
  320. reader.readMessage(value,proto.spine.core.CommandContext.deserializeBinaryFromReader);
  321. msg.setContext(value);
  322. break;
  323. case 4:
  324. var value = new proto.spine.core.Command.SystemProperties;
  325. reader.readMessage(value,proto.spine.core.Command.SystemProperties.deserializeBinaryFromReader);
  326. msg.setSystemProperties(value);
  327. break;
  328. default:
  329. reader.skipField();
  330. break;
  331. }
  332. }
  333. return msg;
  334. };
  335. /**
  336. * Serializes the message to binary data (in protobuf wire format).
  337. * @return {!Uint8Array}
  338. */
  339. proto.spine.core.Command.prototype.serializeBinary = function() {
  340. var writer = new jspb.BinaryWriter();
  341. proto.spine.core.Command.serializeBinaryToWriter(this, writer);
  342. return writer.getResultBuffer();
  343. };
  344. /**
  345. * Serializes the given message to binary data (in protobuf wire
  346. * format), writing to the given BinaryWriter.
  347. * @param {!proto.spine.core.Command} message
  348. * @param {!jspb.BinaryWriter} writer
  349. * @suppress {unusedLocalVariables} f is only used for nested messages
  350. */
  351. proto.spine.core.Command.serializeBinaryToWriter = function(message, writer) {
  352. var f = undefined;
  353. f = message.getId();
  354. if (f != null) {
  355. writer.writeMessage(
  356. 1,
  357. f,
  358. proto.spine.core.CommandId.serializeBinaryToWriter
  359. );
  360. }
  361. f = message.getMessage();
  362. if (f != null) {
  363. writer.writeMessage(
  364. 2,
  365. f,
  366. google_protobuf_any_pb.Any.serializeBinaryToWriter
  367. );
  368. }
  369. f = message.getContext();
  370. if (f != null) {
  371. writer.writeMessage(
  372. 3,
  373. f,
  374. proto.spine.core.CommandContext.serializeBinaryToWriter
  375. );
  376. }
  377. f = message.getSystemProperties();
  378. if (f != null) {
  379. writer.writeMessage(
  380. 4,
  381. f,
  382. proto.spine.core.Command.SystemProperties.serializeBinaryToWriter
  383. );
  384. }
  385. };
  386. if (jspb.Message.GENERATE_TO_OBJECT) {
  387. /**
  388. * Creates an object representation of this proto.
  389. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  390. * Optional fields that are not set will be set to undefined.
  391. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  392. * For the list of reserved names please see:
  393. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  394. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  395. * JSPB instance for transitional soy proto support:
  396. * http://goto/soy-param-migration
  397. * @return {!Object}
  398. */
  399. proto.spine.core.Command.SystemProperties.prototype.toObject = function(opt_includeInstance) {
  400. return proto.spine.core.Command.SystemProperties.toObject(opt_includeInstance, this);
  401. };
  402. /**
  403. * Static version of the {@see toObject} method.
  404. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  405. * the JSPB instance for transitional soy proto support:
  406. * http://goto/soy-param-migration
  407. * @param {!proto.spine.core.Command.SystemProperties} msg The msg instance to transform.
  408. * @return {!Object}
  409. * @suppress {unusedLocalVariables} f is only used for nested messages
  410. */
  411. proto.spine.core.Command.SystemProperties.toObject = function(includeInstance, msg) {
  412. var f, obj = {
  413. schedulingTime: (f = msg.getSchedulingTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
  414. };
  415. if (includeInstance) {
  416. obj.$jspbMessageInstance = msg;
  417. }
  418. return obj;
  419. };
  420. }
  421. /**
  422. * Deserializes binary data (in protobuf wire format).
  423. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  424. * @return {!proto.spine.core.Command.SystemProperties}
  425. */
  426. proto.spine.core.Command.SystemProperties.deserializeBinary = function(bytes) {
  427. var reader = new jspb.BinaryReader(bytes);
  428. var msg = new proto.spine.core.Command.SystemProperties;
  429. return proto.spine.core.Command.SystemProperties.deserializeBinaryFromReader(msg, reader);
  430. };
  431. /**
  432. * Deserializes binary data (in protobuf wire format) from the
  433. * given reader into the given message object.
  434. * @param {!proto.spine.core.Command.SystemProperties} msg The message object to deserialize into.
  435. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  436. * @return {!proto.spine.core.Command.SystemProperties}
  437. */
  438. proto.spine.core.Command.SystemProperties.deserializeBinaryFromReader = function(msg, reader) {
  439. while (reader.nextField()) {
  440. if (reader.isEndGroup()) {
  441. break;
  442. }
  443. var field = reader.getFieldNumber();
  444. switch (field) {
  445. case 11:
  446. var value = new google_protobuf_timestamp_pb.Timestamp;
  447. reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
  448. msg.setSchedulingTime(value);
  449. break;
  450. default:
  451. reader.skipField();
  452. break;
  453. }
  454. }
  455. return msg;
  456. };
  457. /**
  458. * Serializes the message to binary data (in protobuf wire format).
  459. * @return {!Uint8Array}
  460. */
  461. proto.spine.core.Command.SystemProperties.prototype.serializeBinary = function() {
  462. var writer = new jspb.BinaryWriter();
  463. proto.spine.core.Command.SystemProperties.serializeBinaryToWriter(this, writer);
  464. return writer.getResultBuffer();
  465. };
  466. /**
  467. * Serializes the given message to binary data (in protobuf wire
  468. * format), writing to the given BinaryWriter.
  469. * @param {!proto.spine.core.Command.SystemProperties} message
  470. * @param {!jspb.BinaryWriter} writer
  471. * @suppress {unusedLocalVariables} f is only used for nested messages
  472. */
  473. proto.spine.core.Command.SystemProperties.serializeBinaryToWriter = function(message, writer) {
  474. var f = undefined;
  475. f = message.getSchedulingTime();
  476. if (f != null) {
  477. writer.writeMessage(
  478. 11,
  479. f,
  480. google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
  481. );
  482. }
  483. };
  484. /**
  485. * optional google.protobuf.Timestamp scheduling_time = 11;
  486. * @return {?proto.google.protobuf.Timestamp}
  487. */
  488. proto.spine.core.Command.SystemProperties.prototype.getSchedulingTime = function() {
  489. return /** @type{?proto.google.protobuf.Timestamp} */ (
  490. jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 11));
  491. };
  492. /**
  493. * @param {?proto.google.protobuf.Timestamp|undefined} value
  494. * @return {!proto.spine.core.Command.SystemProperties} returns this
  495. */
  496. proto.spine.core.Command.SystemProperties.prototype.setSchedulingTime = function(value) {
  497. return jspb.Message.setWrapperField(this, 11, value);
  498. };
  499. /**
  500. * Clears the message field making it undefined.
  501. * @return {!proto.spine.core.Command.SystemProperties} returns this
  502. */
  503. proto.spine.core.Command.SystemProperties.prototype.clearSchedulingTime = function() {
  504. return this.setSchedulingTime(undefined);
  505. };
  506. /**
  507. * Returns whether this field is set.
  508. * @return {boolean}
  509. */
  510. proto.spine.core.Command.SystemProperties.prototype.hasSchedulingTime = function() {
  511. return jspb.Message.getField(this, 11) != null;
  512. };
  513. /**
  514. * optional CommandId id = 1;
  515. * @return {?proto.spine.core.CommandId}
  516. */
  517. proto.spine.core.Command.prototype.getId = function() {
  518. return /** @type{?proto.spine.core.CommandId} */ (
  519. jspb.Message.getWrapperField(this, proto.spine.core.CommandId, 1));
  520. };
  521. /**
  522. * @param {?proto.spine.core.CommandId|undefined} value
  523. * @return {!proto.spine.core.Command} returns this
  524. */
  525. proto.spine.core.Command.prototype.setId = function(value) {
  526. return jspb.Message.setWrapperField(this, 1, value);
  527. };
  528. /**
  529. * Clears the message field making it undefined.
  530. * @return {!proto.spine.core.Command} returns this
  531. */
  532. proto.spine.core.Command.prototype.clearId = function() {
  533. return this.setId(undefined);
  534. };
  535. /**
  536. * Returns whether this field is set.
  537. * @return {boolean}
  538. */
  539. proto.spine.core.Command.prototype.hasId = function() {
  540. return jspb.Message.getField(this, 1) != null;
  541. };
  542. /**
  543. * optional google.protobuf.Any message = 2;
  544. * @return {?proto.google.protobuf.Any}
  545. */
  546. proto.spine.core.Command.prototype.getMessage = function() {
  547. return /** @type{?proto.google.protobuf.Any} */ (
  548. jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 2));
  549. };
  550. /**
  551. * @param {?proto.google.protobuf.Any|undefined} value
  552. * @return {!proto.spine.core.Command} returns this
  553. */
  554. proto.spine.core.Command.prototype.setMessage = function(value) {
  555. return jspb.Message.setWrapperField(this, 2, value);
  556. };
  557. /**
  558. * Clears the message field making it undefined.
  559. * @return {!proto.spine.core.Command} returns this
  560. */
  561. proto.spine.core.Command.prototype.clearMessage = function() {
  562. return this.setMessage(undefined);
  563. };
  564. /**
  565. * Returns whether this field is set.
  566. * @return {boolean}
  567. */
  568. proto.spine.core.Command.prototype.hasMessage = function() {
  569. return jspb.Message.getField(this, 2) != null;
  570. };
  571. /**
  572. * optional CommandContext context = 3;
  573. * @return {?proto.spine.core.CommandContext}
  574. */
  575. proto.spine.core.Command.prototype.getContext = function() {
  576. return /** @type{?proto.spine.core.CommandContext} */ (
  577. jspb.Message.getWrapperField(this, proto.spine.core.CommandContext, 3));
  578. };
  579. /**
  580. * @param {?proto.spine.core.CommandContext|undefined} value
  581. * @return {!proto.spine.core.Command} returns this
  582. */
  583. proto.spine.core.Command.prototype.setContext = function(value) {
  584. return jspb.Message.setWrapperField(this, 3, value);
  585. };
  586. /**
  587. * Clears the message field making it undefined.
  588. * @return {!proto.spine.core.Command} returns this
  589. */
  590. proto.spine.core.Command.prototype.clearContext = function() {
  591. return this.setContext(undefined);
  592. };
  593. /**
  594. * Returns whether this field is set.
  595. * @return {boolean}
  596. */
  597. proto.spine.core.Command.prototype.hasContext = function() {
  598. return jspb.Message.getField(this, 3) != null;
  599. };
  600. /**
  601. * optional SystemProperties system_properties = 4;
  602. * @return {?proto.spine.core.Command.SystemProperties}
  603. */
  604. proto.spine.core.Command.prototype.getSystemProperties = function() {
  605. return /** @type{?proto.spine.core.Command.SystemProperties} */ (
  606. jspb.Message.getWrapperField(this, proto.spine.core.Command.SystemProperties, 4));
  607. };
  608. /**
  609. * @param {?proto.spine.core.Command.SystemProperties|undefined} value
  610. * @return {!proto.spine.core.Command} returns this
  611. */
  612. proto.spine.core.Command.prototype.setSystemProperties = function(value) {
  613. return jspb.Message.setWrapperField(this, 4, value);
  614. };
  615. /**
  616. * Clears the message field making it undefined.
  617. * @return {!proto.spine.core.Command} returns this
  618. */
  619. proto.spine.core.Command.prototype.clearSystemProperties = function() {
  620. return this.setSystemProperties(undefined);
  621. };
  622. /**
  623. * Returns whether this field is set.
  624. * @return {boolean}
  625. */
  626. proto.spine.core.Command.prototype.hasSystemProperties = function() {
  627. return jspb.Message.getField(this, 4) != null;
  628. };
  629. if (jspb.Message.GENERATE_TO_OBJECT) {
  630. /**
  631. * Creates an object representation of this proto.
  632. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  633. * Optional fields that are not set will be set to undefined.
  634. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  635. * For the list of reserved names please see:
  636. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  637. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  638. * JSPB instance for transitional soy proto support:
  639. * http://goto/soy-param-migration
  640. * @return {!Object}
  641. */
  642. proto.spine.core.CommandContext.prototype.toObject = function(opt_includeInstance) {
  643. return proto.spine.core.CommandContext.toObject(opt_includeInstance, this);
  644. };
  645. /**
  646. * Static version of the {@see toObject} method.
  647. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  648. * the JSPB instance for transitional soy proto support:
  649. * http://goto/soy-param-migration
  650. * @param {!proto.spine.core.CommandContext} msg The msg instance to transform.
  651. * @return {!Object}
  652. * @suppress {unusedLocalVariables} f is only used for nested messages
  653. */
  654. proto.spine.core.CommandContext.toObject = function(includeInstance, msg) {
  655. var f, obj = {
  656. actorContext: (f = msg.getActorContext()) && spine_core_actor_context_pb.ActorContext.toObject(includeInstance, f),
  657. targetVersion: jspb.Message.getFieldWithDefault(msg, 2, 0),
  658. attributesMap: (f = msg.getAttributesMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [],
  659. schedule: (f = msg.getSchedule()) && proto.spine.core.CommandContext.Schedule.toObject(includeInstance, f),
  660. origin: (f = msg.getOrigin()) && spine_core_diagnostics_pb.Origin.toObject(includeInstance, f)
  661. };
  662. if (includeInstance) {
  663. obj.$jspbMessageInstance = msg;
  664. }
  665. return obj;
  666. };
  667. }
  668. /**
  669. * Deserializes binary data (in protobuf wire format).
  670. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  671. * @return {!proto.spine.core.CommandContext}
  672. */
  673. proto.spine.core.CommandContext.deserializeBinary = function(bytes) {
  674. var reader = new jspb.BinaryReader(bytes);
  675. var msg = new proto.spine.core.CommandContext;
  676. return proto.spine.core.CommandContext.deserializeBinaryFromReader(msg, reader);
  677. };
  678. /**
  679. * Deserializes binary data (in protobuf wire format) from the
  680. * given reader into the given message object.
  681. * @param {!proto.spine.core.CommandContext} msg The message object to deserialize into.
  682. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  683. * @return {!proto.spine.core.CommandContext}
  684. */
  685. proto.spine.core.CommandContext.deserializeBinaryFromReader = function(msg, reader) {
  686. while (reader.nextField()) {
  687. if (reader.isEndGroup()) {
  688. break;
  689. }
  690. var field = reader.getFieldNumber();
  691. switch (field) {
  692. case 1:
  693. var value = new spine_core_actor_context_pb.ActorContext;
  694. reader.readMessage(value,spine_core_actor_context_pb.ActorContext.deserializeBinaryFromReader);
  695. msg.setActorContext(value);
  696. break;
  697. case 2:
  698. var value = /** @type {number} */ (reader.readInt32());
  699. msg.setTargetVersion(value);
  700. break;
  701. case 3:
  702. var value = msg.getAttributesMap();
  703. reader.readMessage(value, function(message, reader) {
  704. jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Any.deserializeBinaryFromReader, "", new proto.google.protobuf.Any());
  705. });
  706. break;
  707. case 4:
  708. var value = new proto.spine.core.CommandContext.Schedule;
  709. reader.readMessage(value,proto.spine.core.CommandContext.Schedule.deserializeBinaryFromReader);
  710. msg.setSchedule(value);
  711. break;
  712. case 5:
  713. var value = new spine_core_diagnostics_pb.Origin;
  714. reader.readMessage(value,spine_core_diagnostics_pb.Origin.deserializeBinaryFromReader);
  715. msg.setOrigin(value);
  716. break;
  717. default:
  718. reader.skipField();
  719. break;
  720. }
  721. }
  722. return msg;
  723. };
  724. /**
  725. * Serializes the message to binary data (in protobuf wire format).
  726. * @return {!Uint8Array}
  727. */
  728. proto.spine.core.CommandContext.prototype.serializeBinary = function() {
  729. var writer = new jspb.BinaryWriter();
  730. proto.spine.core.CommandContext.serializeBinaryToWriter(this, writer);
  731. return writer.getResultBuffer();
  732. };
  733. /**
  734. * Serializes the given message to binary data (in protobuf wire
  735. * format), writing to the given BinaryWriter.
  736. * @param {!proto.spine.core.CommandContext} message
  737. * @param {!jspb.BinaryWriter} writer
  738. * @suppress {unusedLocalVariables} f is only used for nested messages
  739. */
  740. proto.spine.core.CommandContext.serializeBinaryToWriter = function(message, writer) {
  741. var f = undefined;
  742. f = message.getActorContext();
  743. if (f != null) {
  744. writer.writeMessage(
  745. 1,
  746. f,
  747. spine_core_actor_context_pb.ActorContext.serializeBinaryToWriter
  748. );
  749. }
  750. f = message.getTargetVersion();
  751. if (f !== 0) {
  752. writer.writeInt32(
  753. 2,
  754. f
  755. );
  756. }
  757. f = message.getAttributesMap(true);
  758. if (f && f.getLength() > 0) {
  759. f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Any.serializeBinaryToWriter);
  760. }
  761. f = message.getSchedule();
  762. if (f != null) {
  763. writer.writeMessage(
  764. 4,
  765. f,
  766. proto.spine.core.CommandContext.Schedule.serializeBinaryToWriter
  767. );
  768. }
  769. f = message.getOrigin();
  770. if (f != null) {
  771. writer.writeMessage(
  772. 5,
  773. f,
  774. spine_core_diagnostics_pb.Origin.serializeBinaryToWriter
  775. );
  776. }
  777. };
  778. if (jspb.Message.GENERATE_TO_OBJECT) {
  779. /**
  780. * Creates an object representation of this proto.
  781. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  782. * Optional fields that are not set will be set to undefined.
  783. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  784. * For the list of reserved names please see:
  785. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  786. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  787. * JSPB instance for transitional soy proto support:
  788. * http://goto/soy-param-migration
  789. * @return {!Object}
  790. */
  791. proto.spine.core.CommandContext.Schedule.prototype.toObject = function(opt_includeInstance) {
  792. return proto.spine.core.CommandContext.Schedule.toObject(opt_includeInstance, this);
  793. };
  794. /**
  795. * Static version of the {@see toObject} method.
  796. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  797. * the JSPB instance for transitional soy proto support:
  798. * http://goto/soy-param-migration
  799. * @param {!proto.spine.core.CommandContext.Schedule} msg The msg instance to transform.
  800. * @return {!Object}
  801. * @suppress {unusedLocalVariables} f is only used for nested messages
  802. */
  803. proto.spine.core.CommandContext.Schedule.toObject = function(includeInstance, msg) {
  804. var f, obj = {
  805. delay: (f = msg.getDelay()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f)
  806. };
  807. if (includeInstance) {
  808. obj.$jspbMessageInstance = msg;
  809. }
  810. return obj;
  811. };
  812. }
  813. /**
  814. * Deserializes binary data (in protobuf wire format).
  815. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  816. * @return {!proto.spine.core.CommandContext.Schedule}
  817. */
  818. proto.spine.core.CommandContext.Schedule.deserializeBinary = function(bytes) {
  819. var reader = new jspb.BinaryReader(bytes);
  820. var msg = new proto.spine.core.CommandContext.Schedule;
  821. return proto.spine.core.CommandContext.Schedule.deserializeBinaryFromReader(msg, reader);
  822. };
  823. /**
  824. * Deserializes binary data (in protobuf wire format) from the
  825. * given reader into the given message object.
  826. * @param {!proto.spine.core.CommandContext.Schedule} msg The message object to deserialize into.
  827. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  828. * @return {!proto.spine.core.CommandContext.Schedule}
  829. */
  830. proto.spine.core.CommandContext.Schedule.deserializeBinaryFromReader = function(msg, reader) {
  831. while (reader.nextField()) {
  832. if (reader.isEndGroup()) {
  833. break;
  834. }
  835. var field = reader.getFieldNumber();
  836. switch (field) {
  837. case 1:
  838. var value = new google_protobuf_duration_pb.Duration;
  839. reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader);
  840. msg.setDelay(value);
  841. break;
  842. default:
  843. reader.skipField();
  844. break;
  845. }
  846. }
  847. return msg;
  848. };
  849. /**
  850. * Serializes the message to binary data (in protobuf wire format).
  851. * @return {!Uint8Array}
  852. */
  853. proto.spine.core.CommandContext.Schedule.prototype.serializeBinary = function() {
  854. var writer = new jspb.BinaryWriter();
  855. proto.spine.core.CommandContext.Schedule.serializeBinaryToWriter(this, writer);
  856. return writer.getResultBuffer();
  857. };
  858. /**
  859. * Serializes the given message to binary data (in protobuf wire
  860. * format), writing to the given BinaryWriter.
  861. * @param {!proto.spine.core.CommandContext.Schedule} message
  862. * @param {!jspb.BinaryWriter} writer
  863. * @suppress {unusedLocalVariables} f is only used for nested messages
  864. */
  865. proto.spine.core.CommandContext.Schedule.serializeBinaryToWriter = function(message, writer) {
  866. var f = undefined;
  867. f = message.getDelay();
  868. if (f != null) {
  869. writer.writeMessage(
  870. 1,
  871. f,
  872. google_protobuf_duration_pb.Duration.serializeBinaryToWriter
  873. );
  874. }
  875. };
  876. /**
  877. * optional google.protobuf.Duration delay = 1;
  878. * @return {?proto.google.protobuf.Duration}
  879. */
  880. proto.spine.core.CommandContext.Schedule.prototype.getDelay = function() {
  881. return /** @type{?proto.google.protobuf.Duration} */ (
  882. jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 1));
  883. };
  884. /**
  885. * @param {?proto.google.protobuf.Duration|undefined} value
  886. * @return {!proto.spine.core.CommandContext.Schedule} returns this
  887. */
  888. proto.spine.core.CommandContext.Schedule.prototype.setDelay = function(value) {
  889. return jspb.Message.setWrapperField(this, 1, value);
  890. };
  891. /**
  892. * Clears the message field making it undefined.
  893. * @return {!proto.spine.core.CommandContext.Schedule} returns this
  894. */
  895. proto.spine.core.CommandContext.Schedule.prototype.clearDelay = function() {
  896. return this.setDelay(undefined);
  897. };
  898. /**
  899. * Returns whether this field is set.
  900. * @return {boolean}
  901. */
  902. proto.spine.core.CommandContext.Schedule.prototype.hasDelay = function() {
  903. return jspb.Message.getField(this, 1) != null;
  904. };
  905. /**
  906. * optional ActorContext actor_context = 1;
  907. * @return {?proto.spine.core.ActorContext}
  908. */
  909. proto.spine.core.CommandContext.prototype.getActorContext = function() {
  910. return /** @type{?proto.spine.core.ActorContext} */ (
  911. jspb.Message.getWrapperField(this, spine_core_actor_context_pb.ActorContext, 1));
  912. };
  913. /**
  914. * @param {?proto.spine.core.ActorContext|undefined} value
  915. * @return {!proto.spine.core.CommandContext} returns this
  916. */
  917. proto.spine.core.CommandContext.prototype.setActorContext = function(value) {
  918. return jspb.Message.setWrapperField(this, 1, value);
  919. };
  920. /**
  921. * Clears the message field making it undefined.
  922. * @return {!proto.spine.core.CommandContext} returns this
  923. */
  924. proto.spine.core.CommandContext.prototype.clearActorContext = function() {
  925. return this.setActorContext(undefined);
  926. };
  927. /**
  928. * Returns whether this field is set.
  929. * @return {boolean}
  930. */
  931. proto.spine.core.CommandContext.prototype.hasActorContext = function() {
  932. return jspb.Message.getField(this, 1) != null;
  933. };
  934. /**
  935. * optional int32 target_version = 2;
  936. * @return {number}
  937. */
  938. proto.spine.core.CommandContext.prototype.getTargetVersion = function() {
  939. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
  940. };
  941. /**
  942. * @param {number} value
  943. * @return {!proto.spine.core.CommandContext} returns this
  944. */
  945. proto.spine.core.CommandContext.prototype.setTargetVersion = function(value) {
  946. return jspb.Message.setProto3IntField(this, 2, value);
  947. };
  948. /**
  949. * map<string, google.protobuf.Any> attributes = 3;
  950. * @param {boolean=} opt_noLazyCreate Do not create the map if
  951. * empty, instead returning `undefined`
  952. * @return {!jspb.Map<string,!proto.google.protobuf.Any>}
  953. */
  954. proto.spine.core.CommandContext.prototype.getAttributesMap = function(opt_noLazyCreate) {
  955. return /** @type {!jspb.Map<string,!proto.google.protobuf.Any>} */ (
  956. jspb.Message.getMapField(this, 3, opt_noLazyCreate,
  957. proto.google.protobuf.Any));
  958. };
  959. /**
  960. * Clears values from the map. The map will be non-null.
  961. * @return {!proto.spine.core.CommandContext} returns this
  962. */
  963. proto.spine.core.CommandContext.prototype.clearAttributesMap = function() {
  964. this.getAttributesMap().clear();
  965. return this;};
  966. /**
  967. * optional Schedule schedule = 4;
  968. * @return {?proto.spine.core.CommandContext.Schedule}
  969. */
  970. proto.spine.core.CommandContext.prototype.getSchedule = function() {
  971. return /** @type{?proto.spine.core.CommandContext.Schedule} */ (
  972. jspb.Message.getWrapperField(this, proto.spine.core.CommandContext.Schedule, 4));
  973. };
  974. /**
  975. * @param {?proto.spine.core.CommandContext.Schedule|undefined} value
  976. * @return {!proto.spine.core.CommandContext} returns this
  977. */
  978. proto.spine.core.CommandContext.prototype.setSchedule = function(value) {
  979. return jspb.Message.setWrapperField(this, 4, value);
  980. };
  981. /**
  982. * Clears the message field making it undefined.
  983. * @return {!proto.spine.core.CommandContext} returns this
  984. */
  985. proto.spine.core.CommandContext.prototype.clearSchedule = function() {
  986. return this.setSchedule(undefined);
  987. };
  988. /**
  989. * Returns whether this field is set.
  990. * @return {boolean}
  991. */
  992. proto.spine.core.CommandContext.prototype.hasSchedule = function() {
  993. return jspb.Message.getField(this, 4) != null;
  994. };
  995. /**
  996. * optional Origin origin = 5;
  997. * @return {?proto.spine.core.Origin}
  998. */
  999. proto.spine.core.CommandContext.prototype.getOrigin = function() {
  1000. return /** @type{?proto.spine.core.Origin} */ (
  1001. jspb.Message.getWrapperField(this, spine_core_diagnostics_pb.Origin, 5));
  1002. };
  1003. /**
  1004. * @param {?proto.spine.core.Origin|undefined} value
  1005. * @return {!proto.spine.core.CommandContext} returns this
  1006. */
  1007. proto.spine.core.CommandContext.prototype.setOrigin = function(value) {
  1008. return jspb.Message.setWrapperField(this, 5, value);
  1009. };
  1010. /**
  1011. * Clears the message field making it undefined.
  1012. * @return {!proto.spine.core.CommandContext} returns this
  1013. */
  1014. proto.spine.core.CommandContext.prototype.clearOrigin = function() {
  1015. return this.setOrigin(undefined);
  1016. };
  1017. /**
  1018. * Returns whether this field is set.
  1019. * @return {boolean}
  1020. */
  1021. proto.spine.core.CommandContext.prototype.hasOrigin = function() {
  1022. return jspb.Message.getField(this, 5) != null;
  1023. };
  1024. /**
  1025. * @enum {number}
  1026. */
  1027. proto.spine.core.CommandValidationError = {
  1028. UNKNOWN: 0,
  1029. UNSUPPORTED_COMMAND: 1,
  1030. INVALID_COMMAND: 2,
  1031. TENANT_UNKNOWN: 3,
  1032. TENANT_INAPPLICABLE: 4,
  1033. EXPIRED: 5,
  1034. DUPLICATE_COMMAND: 6
  1035. };
  1036. goog.object.extend(exports, proto.spine.core);
  1037. // Generated by Spine ProtoJs Plugin
  1038. let ObjectParser = require('../../../client/parser/object-parser.js').default;
  1039. let TypeParsers = require('../../../client/parser/type-parsers.js').default;
  1040. proto.spine.core.Command.Parser = function() {
  1041. ObjectParser.call(this);
  1042. };
  1043. proto.spine.core.Command.Parser.prototype = Object.create(ObjectParser.prototype);
  1044. proto.spine.core.Command.Parser.prototype.constructor = proto.spine.core.Command.Parser;
  1045. proto.spine.core.Command.Parser.prototype.fromObject = function(obj) {
  1046. if (obj === null) {
  1047. return null;
  1048. }
  1049. let msg = new proto.spine.core.Command();
  1050. if (obj.id !== undefined) {
  1051. if (obj.id === null) {
  1052. msg.setId(null);
  1053. } else {
  1054. let value = TypeParsers.parserFor('type.spine.io/spine.core.CommandId').fromObject(obj.id);
  1055. msg.setId(value);
  1056. }
  1057. }
  1058. if (obj.message !== undefined) {
  1059. if (obj.message === null) {
  1060. msg.setMessage(null);
  1061. } else {
  1062. let value = TypeParsers.parserFor('type.googleapis.com/google.protobuf.Any').fromObject(obj.message);
  1063. msg.setMessage(value);
  1064. }
  1065. }
  1066. if (obj.context !== undefined) {
  1067. if (obj.context === null) {
  1068. msg.setContext(null);
  1069. } else {
  1070. let value = TypeParsers.parserFor('type.spine.io/spine.core.CommandContext').fromObject(obj.context);
  1071. msg.setContext(value);
  1072. }
  1073. }
  1074. if (obj.systemProperties !== undefined) {
  1075. if (obj.systemProperties === null) {
  1076. msg.setSystemProperties(null);
  1077. } else {
  1078. let value = TypeParsers.parserFor('type.spine.io/spine.core.Command.SystemProperties').fromObject(obj.systemProperties);
  1079. msg.setSystemProperties(value);
  1080. }
  1081. }
  1082. return msg;
  1083. };
  1084. proto.spine.core.CommandContext.Schedule.Parser = function() {
  1085. ObjectParser.call(this);
  1086. };
  1087. proto.spine.core.CommandContext.Schedule.Parser.prototype = Object.create(ObjectParser.prototype);
  1088. proto.spine.core.CommandContext.Schedule.Parser.prototype.constructor = proto.spine.core.CommandContext.Schedule.Parser;
  1089. proto.spine.core.CommandContext.Schedule.Parser.prototype.fromObject = function(obj) {
  1090. if (obj === null) {
  1091. return null;
  1092. }
  1093. let msg = new proto.spine.core.CommandContext.Schedule();
  1094. if (obj.delay !== undefined) {
  1095. if (obj.delay === null) {
  1096. msg.setDelay(null);
  1097. } else {
  1098. let value = TypeParsers.parserFor('type.googleapis.com/google.protobuf.Duration').fromObject(obj.delay);
  1099. msg.setDelay(value);
  1100. }
  1101. }
  1102. return msg;
  1103. };
  1104. proto.spine.core.CommandId.Parser = function() {
  1105. ObjectParser.call(this);
  1106. };
  1107. proto.spine.core.CommandId.Parser.prototype = Object.create(ObjectParser.prototype);
  1108. proto.spine.core.CommandId.Parser.prototype.constructor = proto.spine.core.CommandId.Parser;
  1109. proto.spine.core.CommandId.Parser.prototype.fromObject = function(obj) {
  1110. if (obj === null) {
  1111. return null;
  1112. }
  1113. let msg = new proto.spine.core.CommandId();
  1114. if (obj.uuid !== undefined) {
  1115. if (obj.uuid !== null) {
  1116. let value = obj.uuid;
  1117. msg.setUuid(value);
  1118. }
  1119. }
  1120. return msg;
  1121. };
  1122. proto.spine.core.CommandContext.Parser = function() {
  1123. ObjectParser.call(this);
  1124. };
  1125. proto.spine.core.CommandContext.Parser.prototype = Object.create(ObjectParser.prototype);
  1126. proto.spine.core.CommandContext.Parser.prototype.constructor = proto.spine.core.CommandContext.Parser;
  1127. proto.spine.core.CommandContext.Parser.prototype.fromObject = function(obj) {
  1128. if (obj === null) {
  1129. return null;
  1130. }
  1131. let msg = new proto.spine.core.CommandContext();
  1132. if (obj.actorContext !== undefined) {
  1133. if (obj.actorContext === null) {
  1134. msg.setActorContext(null);
  1135. } else {
  1136. let value = TypeParsers.parserFor('type.spine.io/spine.core.ActorContext').fromObject(obj.actorContext);
  1137. msg.setActorContext(value);
  1138. }
  1139. }
  1140. if (obj.targetVersion !== undefined) {
  1141. if (obj.targetVersion !== null) {
  1142. let value = obj.targetVersion;
  1143. msg.setTargetVersion(value);
  1144. }
  1145. }
  1146. if (obj.attributes !== undefined && obj.attributes !== null) {
  1147. for (let attribute in obj.attributes) {
  1148. if (obj.attributes.hasOwnProperty(attribute)) {
  1149. let mapKey = attribute;
  1150. if (obj.attributes[attribute] === null) {
  1151. msg.getAttributesMap().set(mapKey, null);
  1152. } else {
  1153. let value = TypeParsers.parserFor('type.googleapis.com/google.protobuf.Any').fromObject(obj.attributes[attribute]);
  1154. msg.getAttributesMap().set(mapKey, value);
  1155. }
  1156. }
  1157. }
  1158. }
  1159. if (obj.schedule !== undefined) {
  1160. if (obj.schedule === null) {
  1161. msg.setSchedule(null);
  1162. } else {
  1163. let value = TypeParsers.parserFor('type.spine.io/spine.core.CommandContext.Schedule').fromObject(obj.schedule);
  1164. msg.setSchedule(value);
  1165. }
  1166. }
  1167. if (obj.origin !== undefined) {
  1168. if (obj.origin === null) {
  1169. msg.setOrigin(null);
  1170. } else {
  1171. let value = TypeParsers.parserFor('type.spine.io/spine.core.Origin').fromObject(obj.origin);
  1172. msg.setOrigin(value);
  1173. }
  1174. }
  1175. return msg;
  1176. };
  1177. proto.spine.core.Command.SystemProperties.Parser = function() {
  1178. ObjectParser.call(this);
  1179. };
  1180. proto.spine.core.Command.SystemProperties.Parser.prototype = Object.create(ObjectParser.prototype);
  1181. proto.spine.core.Command.SystemProperties.Parser.prototype.constructor = proto.spine.core.Command.SystemProperties.Parser;
  1182. proto.spine.core.Command.SystemProperties.Parser.prototype.fromObject = function(obj) {
  1183. if (obj === null) {
  1184. return null;
  1185. }
  1186. let msg = new proto.spine.core.Command.SystemProperties();
  1187. if (obj.schedulingTime !== undefined) {
  1188. if (obj.schedulingTime === null) {
  1189. msg.setSchedulingTime(null);
  1190. } else {
  1191. let value = TypeParsers.parserFor('type.googleapis.com/google.protobuf.Timestamp').fromObject(obj.schedulingTime);
  1192. msg.setSchedulingTime(value);
  1193. }
  1194. }
  1195. return msg;
  1196. };
  1197. // Generated by Spine ProtoJs Plugin
  1198. proto.spine.core.Command.typeUrl = function() {
  1199. return 'type.spine.io/spine.core.Command';
  1200. };
  1201. // Generated by Spine ProtoJs Plugin
  1202. proto.spine.core.CommandContext.Schedule.typeUrl = function() {
  1203. return 'type.spine.io/spine.core.CommandContext.Schedule';
  1204. };
  1205. // Generated by Spine ProtoJs Plugin
  1206. proto.spine.core.CommandId.typeUrl = function() {
  1207. return 'type.spine.io/spine.core.CommandId';
  1208. };
  1209. // Generated by Spine ProtoJs Plugin
  1210. proto.spine.core.CommandContext.typeUrl = function() {
  1211. return 'type.spine.io/spine.core.CommandContext';
  1212. };
  1213. // Generated by Spine ProtoJs Plugin
  1214. proto.spine.core.Command.SystemProperties.typeUrl = function() {
  1215. return 'type.spine.io/spine.core.Command.SystemProperties';
  1216. };
  1217. // Generated by Spine ProtoJs Plugin
  1218. proto.spine.core.CommandValidationError.typeUrl = function() {
  1219. return 'type.spine.io/spine.core.CommandValidationError';
  1220. };