Source: proto/spine/core/event_pb.js

  1. // source: spine/core/event.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_any_pb = require('../../google/protobuf/any_pb.js');
  16. goog.object.extend(proto, google_protobuf_any_pb);
  17. var google_protobuf_timestamp_pb = require('../../google/protobuf/timestamp_pb.js');
  18. goog.object.extend(proto, google_protobuf_timestamp_pb);
  19. var spine_core_actor_context_pb = require('../../spine/core/actor_context_pb.js');
  20. goog.object.extend(proto, spine_core_actor_context_pb);
  21. var spine_core_command_pb = require('../../spine/core/command_pb.js');
  22. goog.object.extend(proto, spine_core_command_pb);
  23. var spine_core_diagnostics_pb = require('../../spine/core/diagnostics_pb.js');
  24. goog.object.extend(proto, spine_core_diagnostics_pb);
  25. var spine_core_enrichment_pb = require('../../spine/core/enrichment_pb.js');
  26. goog.object.extend(proto, spine_core_enrichment_pb);
  27. var spine_core_version_pb = require('../../spine/core/version_pb.js');
  28. goog.object.extend(proto, spine_core_version_pb);
  29. goog.exportSymbol('proto.spine.core.Event', null, global);
  30. goog.exportSymbol('proto.spine.core.EventContext', null, global);
  31. goog.exportSymbol('proto.spine.core.EventContext.OriginCase', null, global);
  32. goog.exportSymbol('proto.spine.core.EventContext.OriginIdCase', null, global);
  33. goog.exportSymbol('proto.spine.core.EventId', null, global);
  34. goog.exportSymbol('proto.spine.core.EventValidationError', null, global);
  35. goog.exportSymbol('proto.spine.core.RejectionEventContext', null, global);
  36. /**
  37. * Generated by JsPbCodeGenerator.
  38. * @param {Array=} opt_data Optional initial data array, typically from a
  39. * server response, or constructed directly in Javascript. The array is used
  40. * in place and becomes part of the constructed object. It is not cloned.
  41. * If no data is provided, the constructed object will be empty, but still
  42. * valid.
  43. * @extends {jspb.Message}
  44. * @constructor
  45. */
  46. proto.spine.core.EventId = function(opt_data) {
  47. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  48. };
  49. goog.inherits(proto.spine.core.EventId, jspb.Message);
  50. if (goog.DEBUG && !COMPILED) {
  51. /**
  52. * @public
  53. * @override
  54. */
  55. proto.spine.core.EventId.displayName = 'proto.spine.core.EventId';
  56. }
  57. /**
  58. * Generated by JsPbCodeGenerator.
  59. * @param {Array=} opt_data Optional initial data array, typically from a
  60. * server response, or constructed directly in Javascript. The array is used
  61. * in place and becomes part of the constructed object. It is not cloned.
  62. * If no data is provided, the constructed object will be empty, but still
  63. * valid.
  64. * @extends {jspb.Message}
  65. * @constructor
  66. */
  67. proto.spine.core.Event = function(opt_data) {
  68. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  69. };
  70. goog.inherits(proto.spine.core.Event, jspb.Message);
  71. if (goog.DEBUG && !COMPILED) {
  72. /**
  73. * @public
  74. * @override
  75. */
  76. proto.spine.core.Event.displayName = 'proto.spine.core.Event';
  77. }
  78. /**
  79. * Generated by JsPbCodeGenerator.
  80. * @param {Array=} opt_data Optional initial data array, typically from a
  81. * server response, or constructed directly in Javascript. The array is used
  82. * in place and becomes part of the constructed object. It is not cloned.
  83. * If no data is provided, the constructed object will be empty, but still
  84. * valid.
  85. * @extends {jspb.Message}
  86. * @constructor
  87. */
  88. proto.spine.core.EventContext = function(opt_data) {
  89. jspb.Message.initialize(this, opt_data, 0, -1, null, proto.spine.core.EventContext.oneofGroups_);
  90. };
  91. goog.inherits(proto.spine.core.EventContext, jspb.Message);
  92. if (goog.DEBUG && !COMPILED) {
  93. /**
  94. * @public
  95. * @override
  96. */
  97. proto.spine.core.EventContext.displayName = 'proto.spine.core.EventContext';
  98. }
  99. /**
  100. * Generated by JsPbCodeGenerator.
  101. * @param {Array=} opt_data Optional initial data array, typically from a
  102. * server response, or constructed directly in Javascript. The array is used
  103. * in place and becomes part of the constructed object. It is not cloned.
  104. * If no data is provided, the constructed object will be empty, but still
  105. * valid.
  106. * @extends {jspb.Message}
  107. * @constructor
  108. */
  109. proto.spine.core.RejectionEventContext = function(opt_data) {
  110. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  111. };
  112. goog.inherits(proto.spine.core.RejectionEventContext, jspb.Message);
  113. if (goog.DEBUG && !COMPILED) {
  114. /**
  115. * @public
  116. * @override
  117. */
  118. proto.spine.core.RejectionEventContext.displayName = 'proto.spine.core.RejectionEventContext';
  119. }
  120. if (jspb.Message.GENERATE_TO_OBJECT) {
  121. /**
  122. * Creates an object representation of this proto.
  123. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  124. * Optional fields that are not set will be set to undefined.
  125. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  126. * For the list of reserved names please see:
  127. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  128. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  129. * JSPB instance for transitional soy proto support:
  130. * http://goto/soy-param-migration
  131. * @return {!Object}
  132. */
  133. proto.spine.core.EventId.prototype.toObject = function(opt_includeInstance) {
  134. return proto.spine.core.EventId.toObject(opt_includeInstance, this);
  135. };
  136. /**
  137. * Static version of the {@see toObject} method.
  138. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  139. * the JSPB instance for transitional soy proto support:
  140. * http://goto/soy-param-migration
  141. * @param {!proto.spine.core.EventId} msg The msg instance to transform.
  142. * @return {!Object}
  143. * @suppress {unusedLocalVariables} f is only used for nested messages
  144. */
  145. proto.spine.core.EventId.toObject = function(includeInstance, msg) {
  146. var f, obj = {
  147. value: jspb.Message.getFieldWithDefault(msg, 1, "")
  148. };
  149. if (includeInstance) {
  150. obj.$jspbMessageInstance = msg;
  151. }
  152. return obj;
  153. };
  154. }
  155. /**
  156. * Deserializes binary data (in protobuf wire format).
  157. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  158. * @return {!proto.spine.core.EventId}
  159. */
  160. proto.spine.core.EventId.deserializeBinary = function(bytes) {
  161. var reader = new jspb.BinaryReader(bytes);
  162. var msg = new proto.spine.core.EventId;
  163. return proto.spine.core.EventId.deserializeBinaryFromReader(msg, reader);
  164. };
  165. /**
  166. * Deserializes binary data (in protobuf wire format) from the
  167. * given reader into the given message object.
  168. * @param {!proto.spine.core.EventId} msg The message object to deserialize into.
  169. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  170. * @return {!proto.spine.core.EventId}
  171. */
  172. proto.spine.core.EventId.deserializeBinaryFromReader = function(msg, reader) {
  173. while (reader.nextField()) {
  174. if (reader.isEndGroup()) {
  175. break;
  176. }
  177. var field = reader.getFieldNumber();
  178. switch (field) {
  179. case 1:
  180. var value = /** @type {string} */ (reader.readString());
  181. msg.setValue(value);
  182. break;
  183. default:
  184. reader.skipField();
  185. break;
  186. }
  187. }
  188. return msg;
  189. };
  190. /**
  191. * Serializes the message to binary data (in protobuf wire format).
  192. * @return {!Uint8Array}
  193. */
  194. proto.spine.core.EventId.prototype.serializeBinary = function() {
  195. var writer = new jspb.BinaryWriter();
  196. proto.spine.core.EventId.serializeBinaryToWriter(this, writer);
  197. return writer.getResultBuffer();
  198. };
  199. /**
  200. * Serializes the given message to binary data (in protobuf wire
  201. * format), writing to the given BinaryWriter.
  202. * @param {!proto.spine.core.EventId} message
  203. * @param {!jspb.BinaryWriter} writer
  204. * @suppress {unusedLocalVariables} f is only used for nested messages
  205. */
  206. proto.spine.core.EventId.serializeBinaryToWriter = function(message, writer) {
  207. var f = undefined;
  208. f = message.getValue();
  209. if (f.length > 0) {
  210. writer.writeString(
  211. 1,
  212. f
  213. );
  214. }
  215. };
  216. /**
  217. * optional string value = 1;
  218. * @return {string}
  219. */
  220. proto.spine.core.EventId.prototype.getValue = function() {
  221. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
  222. };
  223. /**
  224. * @param {string} value
  225. * @return {!proto.spine.core.EventId} returns this
  226. */
  227. proto.spine.core.EventId.prototype.setValue = function(value) {
  228. return jspb.Message.setProto3StringField(this, 1, value);
  229. };
  230. if (jspb.Message.GENERATE_TO_OBJECT) {
  231. /**
  232. * Creates an object representation of this proto.
  233. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  234. * Optional fields that are not set will be set to undefined.
  235. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  236. * For the list of reserved names please see:
  237. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  238. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  239. * JSPB instance for transitional soy proto support:
  240. * http://goto/soy-param-migration
  241. * @return {!Object}
  242. */
  243. proto.spine.core.Event.prototype.toObject = function(opt_includeInstance) {
  244. return proto.spine.core.Event.toObject(opt_includeInstance, this);
  245. };
  246. /**
  247. * Static version of the {@see toObject} method.
  248. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  249. * the JSPB instance for transitional soy proto support:
  250. * http://goto/soy-param-migration
  251. * @param {!proto.spine.core.Event} msg The msg instance to transform.
  252. * @return {!Object}
  253. * @suppress {unusedLocalVariables} f is only used for nested messages
  254. */
  255. proto.spine.core.Event.toObject = function(includeInstance, msg) {
  256. var f, obj = {
  257. id: (f = msg.getId()) && proto.spine.core.EventId.toObject(includeInstance, f),
  258. message: (f = msg.getMessage()) && google_protobuf_any_pb.Any.toObject(includeInstance, f),
  259. context: (f = msg.getContext()) && proto.spine.core.EventContext.toObject(includeInstance, f)
  260. };
  261. if (includeInstance) {
  262. obj.$jspbMessageInstance = msg;
  263. }
  264. return obj;
  265. };
  266. }
  267. /**
  268. * Deserializes binary data (in protobuf wire format).
  269. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  270. * @return {!proto.spine.core.Event}
  271. */
  272. proto.spine.core.Event.deserializeBinary = function(bytes) {
  273. var reader = new jspb.BinaryReader(bytes);
  274. var msg = new proto.spine.core.Event;
  275. return proto.spine.core.Event.deserializeBinaryFromReader(msg, reader);
  276. };
  277. /**
  278. * Deserializes binary data (in protobuf wire format) from the
  279. * given reader into the given message object.
  280. * @param {!proto.spine.core.Event} msg The message object to deserialize into.
  281. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  282. * @return {!proto.spine.core.Event}
  283. */
  284. proto.spine.core.Event.deserializeBinaryFromReader = function(msg, reader) {
  285. while (reader.nextField()) {
  286. if (reader.isEndGroup()) {
  287. break;
  288. }
  289. var field = reader.getFieldNumber();
  290. switch (field) {
  291. case 1:
  292. var value = new proto.spine.core.EventId;
  293. reader.readMessage(value,proto.spine.core.EventId.deserializeBinaryFromReader);
  294. msg.setId(value);
  295. break;
  296. case 2:
  297. var value = new google_protobuf_any_pb.Any;
  298. reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader);
  299. msg.setMessage(value);
  300. break;
  301. case 3:
  302. var value = new proto.spine.core.EventContext;
  303. reader.readMessage(value,proto.spine.core.EventContext.deserializeBinaryFromReader);
  304. msg.setContext(value);
  305. break;
  306. default:
  307. reader.skipField();
  308. break;
  309. }
  310. }
  311. return msg;
  312. };
  313. /**
  314. * Serializes the message to binary data (in protobuf wire format).
  315. * @return {!Uint8Array}
  316. */
  317. proto.spine.core.Event.prototype.serializeBinary = function() {
  318. var writer = new jspb.BinaryWriter();
  319. proto.spine.core.Event.serializeBinaryToWriter(this, writer);
  320. return writer.getResultBuffer();
  321. };
  322. /**
  323. * Serializes the given message to binary data (in protobuf wire
  324. * format), writing to the given BinaryWriter.
  325. * @param {!proto.spine.core.Event} message
  326. * @param {!jspb.BinaryWriter} writer
  327. * @suppress {unusedLocalVariables} f is only used for nested messages
  328. */
  329. proto.spine.core.Event.serializeBinaryToWriter = function(message, writer) {
  330. var f = undefined;
  331. f = message.getId();
  332. if (f != null) {
  333. writer.writeMessage(
  334. 1,
  335. f,
  336. proto.spine.core.EventId.serializeBinaryToWriter
  337. );
  338. }
  339. f = message.getMessage();
  340. if (f != null) {
  341. writer.writeMessage(
  342. 2,
  343. f,
  344. google_protobuf_any_pb.Any.serializeBinaryToWriter
  345. );
  346. }
  347. f = message.getContext();
  348. if (f != null) {
  349. writer.writeMessage(
  350. 3,
  351. f,
  352. proto.spine.core.EventContext.serializeBinaryToWriter
  353. );
  354. }
  355. };
  356. /**
  357. * optional EventId id = 1;
  358. * @return {?proto.spine.core.EventId}
  359. */
  360. proto.spine.core.Event.prototype.getId = function() {
  361. return /** @type{?proto.spine.core.EventId} */ (
  362. jspb.Message.getWrapperField(this, proto.spine.core.EventId, 1));
  363. };
  364. /**
  365. * @param {?proto.spine.core.EventId|undefined} value
  366. * @return {!proto.spine.core.Event} returns this
  367. */
  368. proto.spine.core.Event.prototype.setId = function(value) {
  369. return jspb.Message.setWrapperField(this, 1, value);
  370. };
  371. /**
  372. * Clears the message field making it undefined.
  373. * @return {!proto.spine.core.Event} returns this
  374. */
  375. proto.spine.core.Event.prototype.clearId = function() {
  376. return this.setId(undefined);
  377. };
  378. /**
  379. * Returns whether this field is set.
  380. * @return {boolean}
  381. */
  382. proto.spine.core.Event.prototype.hasId = function() {
  383. return jspb.Message.getField(this, 1) != null;
  384. };
  385. /**
  386. * optional google.protobuf.Any message = 2;
  387. * @return {?proto.google.protobuf.Any}
  388. */
  389. proto.spine.core.Event.prototype.getMessage = function() {
  390. return /** @type{?proto.google.protobuf.Any} */ (
  391. jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 2));
  392. };
  393. /**
  394. * @param {?proto.google.protobuf.Any|undefined} value
  395. * @return {!proto.spine.core.Event} returns this
  396. */
  397. proto.spine.core.Event.prototype.setMessage = function(value) {
  398. return jspb.Message.setWrapperField(this, 2, value);
  399. };
  400. /**
  401. * Clears the message field making it undefined.
  402. * @return {!proto.spine.core.Event} returns this
  403. */
  404. proto.spine.core.Event.prototype.clearMessage = function() {
  405. return this.setMessage(undefined);
  406. };
  407. /**
  408. * Returns whether this field is set.
  409. * @return {boolean}
  410. */
  411. proto.spine.core.Event.prototype.hasMessage = function() {
  412. return jspb.Message.getField(this, 2) != null;
  413. };
  414. /**
  415. * optional EventContext context = 3;
  416. * @return {?proto.spine.core.EventContext}
  417. */
  418. proto.spine.core.Event.prototype.getContext = function() {
  419. return /** @type{?proto.spine.core.EventContext} */ (
  420. jspb.Message.getWrapperField(this, proto.spine.core.EventContext, 3));
  421. };
  422. /**
  423. * @param {?proto.spine.core.EventContext|undefined} value
  424. * @return {!proto.spine.core.Event} returns this
  425. */
  426. proto.spine.core.Event.prototype.setContext = function(value) {
  427. return jspb.Message.setWrapperField(this, 3, value);
  428. };
  429. /**
  430. * Clears the message field making it undefined.
  431. * @return {!proto.spine.core.Event} returns this
  432. */
  433. proto.spine.core.Event.prototype.clearContext = function() {
  434. return this.setContext(undefined);
  435. };
  436. /**
  437. * Returns whether this field is set.
  438. * @return {boolean}
  439. */
  440. proto.spine.core.Event.prototype.hasContext = function() {
  441. return jspb.Message.getField(this, 3) != null;
  442. };
  443. /**
  444. * Oneof group definitions for this message. Each group defines the field
  445. * numbers belonging to that group. When of these fields' value is set, all
  446. * other fields in the group are cleared. During deserialization, if multiple
  447. * fields are encountered for a group, only the last value seen will be kept.
  448. * @private {!Array<!Array<number>>}
  449. * @const
  450. */
  451. proto.spine.core.EventContext.oneofGroups_ = [[2,6,14,11],[12,13]];
  452. /**
  453. * @enum {number}
  454. */
  455. proto.spine.core.EventContext.OriginCase = {
  456. ORIGIN_NOT_SET: 0,
  457. COMMAND_CONTEXT: 2,
  458. EVENT_CONTEXT: 6,
  459. PAST_MESSAGE: 14,
  460. IMPORT_CONTEXT: 11
  461. };
  462. /**
  463. * @return {proto.spine.core.EventContext.OriginCase}
  464. */
  465. proto.spine.core.EventContext.prototype.getOriginCase = function() {
  466. return /** @type {proto.spine.core.EventContext.OriginCase} */(jspb.Message.computeOneofCase(this, proto.spine.core.EventContext.oneofGroups_[0]));
  467. };
  468. /**
  469. * @enum {number}
  470. */
  471. proto.spine.core.EventContext.OriginIdCase = {
  472. ORIGIN_ID_NOT_SET: 0,
  473. COMMAND_ID: 12,
  474. EVENT_ID: 13
  475. };
  476. /**
  477. * @return {proto.spine.core.EventContext.OriginIdCase}
  478. */
  479. proto.spine.core.EventContext.prototype.getOriginIdCase = function() {
  480. return /** @type {proto.spine.core.EventContext.OriginIdCase} */(jspb.Message.computeOneofCase(this, proto.spine.core.EventContext.oneofGroups_[1]));
  481. };
  482. if (jspb.Message.GENERATE_TO_OBJECT) {
  483. /**
  484. * Creates an object representation of this proto.
  485. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  486. * Optional fields that are not set will be set to undefined.
  487. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  488. * For the list of reserved names please see:
  489. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  490. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  491. * JSPB instance for transitional soy proto support:
  492. * http://goto/soy-param-migration
  493. * @return {!Object}
  494. */
  495. proto.spine.core.EventContext.prototype.toObject = function(opt_includeInstance) {
  496. return proto.spine.core.EventContext.toObject(opt_includeInstance, this);
  497. };
  498. /**
  499. * Static version of the {@see toObject} method.
  500. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  501. * the JSPB instance for transitional soy proto support:
  502. * http://goto/soy-param-migration
  503. * @param {!proto.spine.core.EventContext} msg The msg instance to transform.
  504. * @return {!Object}
  505. * @suppress {unusedLocalVariables} f is only used for nested messages
  506. */
  507. proto.spine.core.EventContext.toObject = function(includeInstance, msg) {
  508. var f, obj = {
  509. timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
  510. commandContext: (f = msg.getCommandContext()) && spine_core_command_pb.CommandContext.toObject(includeInstance, f),
  511. eventContext: (f = msg.getEventContext()) && proto.spine.core.EventContext.toObject(includeInstance, f),
  512. pastMessage: (f = msg.getPastMessage()) && spine_core_diagnostics_pb.Origin.toObject(includeInstance, f),
  513. importContext: (f = msg.getImportContext()) && spine_core_actor_context_pb.ActorContext.toObject(includeInstance, f),
  514. commandId: (f = msg.getCommandId()) && spine_core_command_pb.CommandId.toObject(includeInstance, f),
  515. eventId: (f = msg.getEventId()) && proto.spine.core.EventId.toObject(includeInstance, f),
  516. rootCommandId: (f = msg.getRootCommandId()) && spine_core_command_pb.CommandId.toObject(includeInstance, f),
  517. producerId: (f = msg.getProducerId()) && google_protobuf_any_pb.Any.toObject(includeInstance, f),
  518. version: (f = msg.getVersion()) && spine_core_version_pb.Version.toObject(includeInstance, f),
  519. enrichment: (f = msg.getEnrichment()) && spine_core_enrichment_pb.Enrichment.toObject(includeInstance, f),
  520. external: jspb.Message.getBooleanFieldWithDefault(msg, 8, false),
  521. rejection: (f = msg.getRejection()) && proto.spine.core.RejectionEventContext.toObject(includeInstance, f)
  522. };
  523. if (includeInstance) {
  524. obj.$jspbMessageInstance = msg;
  525. }
  526. return obj;
  527. };
  528. }
  529. /**
  530. * Deserializes binary data (in protobuf wire format).
  531. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  532. * @return {!proto.spine.core.EventContext}
  533. */
  534. proto.spine.core.EventContext.deserializeBinary = function(bytes) {
  535. var reader = new jspb.BinaryReader(bytes);
  536. var msg = new proto.spine.core.EventContext;
  537. return proto.spine.core.EventContext.deserializeBinaryFromReader(msg, reader);
  538. };
  539. /**
  540. * Deserializes binary data (in protobuf wire format) from the
  541. * given reader into the given message object.
  542. * @param {!proto.spine.core.EventContext} msg The message object to deserialize into.
  543. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  544. * @return {!proto.spine.core.EventContext}
  545. */
  546. proto.spine.core.EventContext.deserializeBinaryFromReader = function(msg, reader) {
  547. while (reader.nextField()) {
  548. if (reader.isEndGroup()) {
  549. break;
  550. }
  551. var field = reader.getFieldNumber();
  552. switch (field) {
  553. case 1:
  554. var value = new google_protobuf_timestamp_pb.Timestamp;
  555. reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
  556. msg.setTimestamp(value);
  557. break;
  558. case 2:
  559. var value = new spine_core_command_pb.CommandContext;
  560. reader.readMessage(value,spine_core_command_pb.CommandContext.deserializeBinaryFromReader);
  561. msg.setCommandContext(value);
  562. break;
  563. case 6:
  564. var value = new proto.spine.core.EventContext;
  565. reader.readMessage(value,proto.spine.core.EventContext.deserializeBinaryFromReader);
  566. msg.setEventContext(value);
  567. break;
  568. case 14:
  569. var value = new spine_core_diagnostics_pb.Origin;
  570. reader.readMessage(value,spine_core_diagnostics_pb.Origin.deserializeBinaryFromReader);
  571. msg.setPastMessage(value);
  572. break;
  573. case 11:
  574. var value = new spine_core_actor_context_pb.ActorContext;
  575. reader.readMessage(value,spine_core_actor_context_pb.ActorContext.deserializeBinaryFromReader);
  576. msg.setImportContext(value);
  577. break;
  578. case 12:
  579. var value = new spine_core_command_pb.CommandId;
  580. reader.readMessage(value,spine_core_command_pb.CommandId.deserializeBinaryFromReader);
  581. msg.setCommandId(value);
  582. break;
  583. case 13:
  584. var value = new proto.spine.core.EventId;
  585. reader.readMessage(value,proto.spine.core.EventId.deserializeBinaryFromReader);
  586. msg.setEventId(value);
  587. break;
  588. case 9:
  589. var value = new spine_core_command_pb.CommandId;
  590. reader.readMessage(value,spine_core_command_pb.CommandId.deserializeBinaryFromReader);
  591. msg.setRootCommandId(value);
  592. break;
  593. case 3:
  594. var value = new google_protobuf_any_pb.Any;
  595. reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader);
  596. msg.setProducerId(value);
  597. break;
  598. case 4:
  599. var value = new spine_core_version_pb.Version;
  600. reader.readMessage(value,spine_core_version_pb.Version.deserializeBinaryFromReader);
  601. msg.setVersion(value);
  602. break;
  603. case 5:
  604. var value = new spine_core_enrichment_pb.Enrichment;
  605. reader.readMessage(value,spine_core_enrichment_pb.Enrichment.deserializeBinaryFromReader);
  606. msg.setEnrichment(value);
  607. break;
  608. case 8:
  609. var value = /** @type {boolean} */ (reader.readBool());
  610. msg.setExternal(value);
  611. break;
  612. case 10:
  613. var value = new proto.spine.core.RejectionEventContext;
  614. reader.readMessage(value,proto.spine.core.RejectionEventContext.deserializeBinaryFromReader);
  615. msg.setRejection(value);
  616. break;
  617. default:
  618. reader.skipField();
  619. break;
  620. }
  621. }
  622. return msg;
  623. };
  624. /**
  625. * Serializes the message to binary data (in protobuf wire format).
  626. * @return {!Uint8Array}
  627. */
  628. proto.spine.core.EventContext.prototype.serializeBinary = function() {
  629. var writer = new jspb.BinaryWriter();
  630. proto.spine.core.EventContext.serializeBinaryToWriter(this, writer);
  631. return writer.getResultBuffer();
  632. };
  633. /**
  634. * Serializes the given message to binary data (in protobuf wire
  635. * format), writing to the given BinaryWriter.
  636. * @param {!proto.spine.core.EventContext} message
  637. * @param {!jspb.BinaryWriter} writer
  638. * @suppress {unusedLocalVariables} f is only used for nested messages
  639. */
  640. proto.spine.core.EventContext.serializeBinaryToWriter = function(message, writer) {
  641. var f = undefined;
  642. f = message.getTimestamp();
  643. if (f != null) {
  644. writer.writeMessage(
  645. 1,
  646. f,
  647. google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
  648. );
  649. }
  650. f = message.getCommandContext();
  651. if (f != null) {
  652. writer.writeMessage(
  653. 2,
  654. f,
  655. spine_core_command_pb.CommandContext.serializeBinaryToWriter
  656. );
  657. }
  658. f = message.getEventContext();
  659. if (f != null) {
  660. writer.writeMessage(
  661. 6,
  662. f,
  663. proto.spine.core.EventContext.serializeBinaryToWriter
  664. );
  665. }
  666. f = message.getPastMessage();
  667. if (f != null) {
  668. writer.writeMessage(
  669. 14,
  670. f,
  671. spine_core_diagnostics_pb.Origin.serializeBinaryToWriter
  672. );
  673. }
  674. f = message.getImportContext();
  675. if (f != null) {
  676. writer.writeMessage(
  677. 11,
  678. f,
  679. spine_core_actor_context_pb.ActorContext.serializeBinaryToWriter
  680. );
  681. }
  682. f = message.getCommandId();
  683. if (f != null) {
  684. writer.writeMessage(
  685. 12,
  686. f,
  687. spine_core_command_pb.CommandId.serializeBinaryToWriter
  688. );
  689. }
  690. f = message.getEventId();
  691. if (f != null) {
  692. writer.writeMessage(
  693. 13,
  694. f,
  695. proto.spine.core.EventId.serializeBinaryToWriter
  696. );
  697. }
  698. f = message.getRootCommandId();
  699. if (f != null) {
  700. writer.writeMessage(
  701. 9,
  702. f,
  703. spine_core_command_pb.CommandId.serializeBinaryToWriter
  704. );
  705. }
  706. f = message.getProducerId();
  707. if (f != null) {
  708. writer.writeMessage(
  709. 3,
  710. f,
  711. google_protobuf_any_pb.Any.serializeBinaryToWriter
  712. );
  713. }
  714. f = message.getVersion();
  715. if (f != null) {
  716. writer.writeMessage(
  717. 4,
  718. f,
  719. spine_core_version_pb.Version.serializeBinaryToWriter
  720. );
  721. }
  722. f = message.getEnrichment();
  723. if (f != null) {
  724. writer.writeMessage(
  725. 5,
  726. f,
  727. spine_core_enrichment_pb.Enrichment.serializeBinaryToWriter
  728. );
  729. }
  730. f = message.getExternal();
  731. if (f) {
  732. writer.writeBool(
  733. 8,
  734. f
  735. );
  736. }
  737. f = message.getRejection();
  738. if (f != null) {
  739. writer.writeMessage(
  740. 10,
  741. f,
  742. proto.spine.core.RejectionEventContext.serializeBinaryToWriter
  743. );
  744. }
  745. };
  746. /**
  747. * optional google.protobuf.Timestamp timestamp = 1;
  748. * @return {?proto.google.protobuf.Timestamp}
  749. */
  750. proto.spine.core.EventContext.prototype.getTimestamp = function() {
  751. return /** @type{?proto.google.protobuf.Timestamp} */ (
  752. jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1));
  753. };
  754. /**
  755. * @param {?proto.google.protobuf.Timestamp|undefined} value
  756. * @return {!proto.spine.core.EventContext} returns this
  757. */
  758. proto.spine.core.EventContext.prototype.setTimestamp = function(value) {
  759. return jspb.Message.setWrapperField(this, 1, value);
  760. };
  761. /**
  762. * Clears the message field making it undefined.
  763. * @return {!proto.spine.core.EventContext} returns this
  764. */
  765. proto.spine.core.EventContext.prototype.clearTimestamp = function() {
  766. return this.setTimestamp(undefined);
  767. };
  768. /**
  769. * Returns whether this field is set.
  770. * @return {boolean}
  771. */
  772. proto.spine.core.EventContext.prototype.hasTimestamp = function() {
  773. return jspb.Message.getField(this, 1) != null;
  774. };
  775. /**
  776. * optional CommandContext command_context = 2;
  777. * @return {?proto.spine.core.CommandContext}
  778. */
  779. proto.spine.core.EventContext.prototype.getCommandContext = function() {
  780. return /** @type{?proto.spine.core.CommandContext} */ (
  781. jspb.Message.getWrapperField(this, spine_core_command_pb.CommandContext, 2));
  782. };
  783. /**
  784. * @param {?proto.spine.core.CommandContext|undefined} value
  785. * @return {!proto.spine.core.EventContext} returns this
  786. */
  787. proto.spine.core.EventContext.prototype.setCommandContext = function(value) {
  788. return jspb.Message.setOneofWrapperField(this, 2, proto.spine.core.EventContext.oneofGroups_[0], value);
  789. };
  790. /**
  791. * Clears the message field making it undefined.
  792. * @return {!proto.spine.core.EventContext} returns this
  793. */
  794. proto.spine.core.EventContext.prototype.clearCommandContext = function() {
  795. return this.setCommandContext(undefined);
  796. };
  797. /**
  798. * Returns whether this field is set.
  799. * @return {boolean}
  800. */
  801. proto.spine.core.EventContext.prototype.hasCommandContext = function() {
  802. return jspb.Message.getField(this, 2) != null;
  803. };
  804. /**
  805. * optional EventContext event_context = 6;
  806. * @return {?proto.spine.core.EventContext}
  807. */
  808. proto.spine.core.EventContext.prototype.getEventContext = function() {
  809. return /** @type{?proto.spine.core.EventContext} */ (
  810. jspb.Message.getWrapperField(this, proto.spine.core.EventContext, 6));
  811. };
  812. /**
  813. * @param {?proto.spine.core.EventContext|undefined} value
  814. * @return {!proto.spine.core.EventContext} returns this
  815. */
  816. proto.spine.core.EventContext.prototype.setEventContext = function(value) {
  817. return jspb.Message.setOneofWrapperField(this, 6, proto.spine.core.EventContext.oneofGroups_[0], value);
  818. };
  819. /**
  820. * Clears the message field making it undefined.
  821. * @return {!proto.spine.core.EventContext} returns this
  822. */
  823. proto.spine.core.EventContext.prototype.clearEventContext = function() {
  824. return this.setEventContext(undefined);
  825. };
  826. /**
  827. * Returns whether this field is set.
  828. * @return {boolean}
  829. */
  830. proto.spine.core.EventContext.prototype.hasEventContext = function() {
  831. return jspb.Message.getField(this, 6) != null;
  832. };
  833. /**
  834. * optional Origin past_message = 14;
  835. * @return {?proto.spine.core.Origin}
  836. */
  837. proto.spine.core.EventContext.prototype.getPastMessage = function() {
  838. return /** @type{?proto.spine.core.Origin} */ (
  839. jspb.Message.getWrapperField(this, spine_core_diagnostics_pb.Origin, 14));
  840. };
  841. /**
  842. * @param {?proto.spine.core.Origin|undefined} value
  843. * @return {!proto.spine.core.EventContext} returns this
  844. */
  845. proto.spine.core.EventContext.prototype.setPastMessage = function(value) {
  846. return jspb.Message.setOneofWrapperField(this, 14, proto.spine.core.EventContext.oneofGroups_[0], value);
  847. };
  848. /**
  849. * Clears the message field making it undefined.
  850. * @return {!proto.spine.core.EventContext} returns this
  851. */
  852. proto.spine.core.EventContext.prototype.clearPastMessage = function() {
  853. return this.setPastMessage(undefined);
  854. };
  855. /**
  856. * Returns whether this field is set.
  857. * @return {boolean}
  858. */
  859. proto.spine.core.EventContext.prototype.hasPastMessage = function() {
  860. return jspb.Message.getField(this, 14) != null;
  861. };
  862. /**
  863. * optional ActorContext import_context = 11;
  864. * @return {?proto.spine.core.ActorContext}
  865. */
  866. proto.spine.core.EventContext.prototype.getImportContext = function() {
  867. return /** @type{?proto.spine.core.ActorContext} */ (
  868. jspb.Message.getWrapperField(this, spine_core_actor_context_pb.ActorContext, 11));
  869. };
  870. /**
  871. * @param {?proto.spine.core.ActorContext|undefined} value
  872. * @return {!proto.spine.core.EventContext} returns this
  873. */
  874. proto.spine.core.EventContext.prototype.setImportContext = function(value) {
  875. return jspb.Message.setOneofWrapperField(this, 11, proto.spine.core.EventContext.oneofGroups_[0], value);
  876. };
  877. /**
  878. * Clears the message field making it undefined.
  879. * @return {!proto.spine.core.EventContext} returns this
  880. */
  881. proto.spine.core.EventContext.prototype.clearImportContext = function() {
  882. return this.setImportContext(undefined);
  883. };
  884. /**
  885. * Returns whether this field is set.
  886. * @return {boolean}
  887. */
  888. proto.spine.core.EventContext.prototype.hasImportContext = function() {
  889. return jspb.Message.getField(this, 11) != null;
  890. };
  891. /**
  892. * optional CommandId command_id = 12;
  893. * @return {?proto.spine.core.CommandId}
  894. */
  895. proto.spine.core.EventContext.prototype.getCommandId = function() {
  896. return /** @type{?proto.spine.core.CommandId} */ (
  897. jspb.Message.getWrapperField(this, spine_core_command_pb.CommandId, 12));
  898. };
  899. /**
  900. * @param {?proto.spine.core.CommandId|undefined} value
  901. * @return {!proto.spine.core.EventContext} returns this
  902. */
  903. proto.spine.core.EventContext.prototype.setCommandId = function(value) {
  904. return jspb.Message.setOneofWrapperField(this, 12, proto.spine.core.EventContext.oneofGroups_[1], value);
  905. };
  906. /**
  907. * Clears the message field making it undefined.
  908. * @return {!proto.spine.core.EventContext} returns this
  909. */
  910. proto.spine.core.EventContext.prototype.clearCommandId = function() {
  911. return this.setCommandId(undefined);
  912. };
  913. /**
  914. * Returns whether this field is set.
  915. * @return {boolean}
  916. */
  917. proto.spine.core.EventContext.prototype.hasCommandId = function() {
  918. return jspb.Message.getField(this, 12) != null;
  919. };
  920. /**
  921. * optional EventId event_id = 13;
  922. * @return {?proto.spine.core.EventId}
  923. */
  924. proto.spine.core.EventContext.prototype.getEventId = function() {
  925. return /** @type{?proto.spine.core.EventId} */ (
  926. jspb.Message.getWrapperField(this, proto.spine.core.EventId, 13));
  927. };
  928. /**
  929. * @param {?proto.spine.core.EventId|undefined} value
  930. * @return {!proto.spine.core.EventContext} returns this
  931. */
  932. proto.spine.core.EventContext.prototype.setEventId = function(value) {
  933. return jspb.Message.setOneofWrapperField(this, 13, proto.spine.core.EventContext.oneofGroups_[1], value);
  934. };
  935. /**
  936. * Clears the message field making it undefined.
  937. * @return {!proto.spine.core.EventContext} returns this
  938. */
  939. proto.spine.core.EventContext.prototype.clearEventId = function() {
  940. return this.setEventId(undefined);
  941. };
  942. /**
  943. * Returns whether this field is set.
  944. * @return {boolean}
  945. */
  946. proto.spine.core.EventContext.prototype.hasEventId = function() {
  947. return jspb.Message.getField(this, 13) != null;
  948. };
  949. /**
  950. * optional CommandId root_command_id = 9;
  951. * @return {?proto.spine.core.CommandId}
  952. */
  953. proto.spine.core.EventContext.prototype.getRootCommandId = function() {
  954. return /** @type{?proto.spine.core.CommandId} */ (
  955. jspb.Message.getWrapperField(this, spine_core_command_pb.CommandId, 9));
  956. };
  957. /**
  958. * @param {?proto.spine.core.CommandId|undefined} value
  959. * @return {!proto.spine.core.EventContext} returns this
  960. */
  961. proto.spine.core.EventContext.prototype.setRootCommandId = function(value) {
  962. return jspb.Message.setWrapperField(this, 9, value);
  963. };
  964. /**
  965. * Clears the message field making it undefined.
  966. * @return {!proto.spine.core.EventContext} returns this
  967. */
  968. proto.spine.core.EventContext.prototype.clearRootCommandId = function() {
  969. return this.setRootCommandId(undefined);
  970. };
  971. /**
  972. * Returns whether this field is set.
  973. * @return {boolean}
  974. */
  975. proto.spine.core.EventContext.prototype.hasRootCommandId = function() {
  976. return jspb.Message.getField(this, 9) != null;
  977. };
  978. /**
  979. * optional google.protobuf.Any producer_id = 3;
  980. * @return {?proto.google.protobuf.Any}
  981. */
  982. proto.spine.core.EventContext.prototype.getProducerId = function() {
  983. return /** @type{?proto.google.protobuf.Any} */ (
  984. jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 3));
  985. };
  986. /**
  987. * @param {?proto.google.protobuf.Any|undefined} value
  988. * @return {!proto.spine.core.EventContext} returns this
  989. */
  990. proto.spine.core.EventContext.prototype.setProducerId = function(value) {
  991. return jspb.Message.setWrapperField(this, 3, value);
  992. };
  993. /**
  994. * Clears the message field making it undefined.
  995. * @return {!proto.spine.core.EventContext} returns this
  996. */
  997. proto.spine.core.EventContext.prototype.clearProducerId = function() {
  998. return this.setProducerId(undefined);
  999. };
  1000. /**
  1001. * Returns whether this field is set.
  1002. * @return {boolean}
  1003. */
  1004. proto.spine.core.EventContext.prototype.hasProducerId = function() {
  1005. return jspb.Message.getField(this, 3) != null;
  1006. };
  1007. /**
  1008. * optional Version version = 4;
  1009. * @return {?proto.spine.core.Version}
  1010. */
  1011. proto.spine.core.EventContext.prototype.getVersion = function() {
  1012. return /** @type{?proto.spine.core.Version} */ (
  1013. jspb.Message.getWrapperField(this, spine_core_version_pb.Version, 4));
  1014. };
  1015. /**
  1016. * @param {?proto.spine.core.Version|undefined} value
  1017. * @return {!proto.spine.core.EventContext} returns this
  1018. */
  1019. proto.spine.core.EventContext.prototype.setVersion = function(value) {
  1020. return jspb.Message.setWrapperField(this, 4, value);
  1021. };
  1022. /**
  1023. * Clears the message field making it undefined.
  1024. * @return {!proto.spine.core.EventContext} returns this
  1025. */
  1026. proto.spine.core.EventContext.prototype.clearVersion = function() {
  1027. return this.setVersion(undefined);
  1028. };
  1029. /**
  1030. * Returns whether this field is set.
  1031. * @return {boolean}
  1032. */
  1033. proto.spine.core.EventContext.prototype.hasVersion = function() {
  1034. return jspb.Message.getField(this, 4) != null;
  1035. };
  1036. /**
  1037. * optional Enrichment enrichment = 5;
  1038. * @return {?proto.spine.core.Enrichment}
  1039. */
  1040. proto.spine.core.EventContext.prototype.getEnrichment = function() {
  1041. return /** @type{?proto.spine.core.Enrichment} */ (
  1042. jspb.Message.getWrapperField(this, spine_core_enrichment_pb.Enrichment, 5));
  1043. };
  1044. /**
  1045. * @param {?proto.spine.core.Enrichment|undefined} value
  1046. * @return {!proto.spine.core.EventContext} returns this
  1047. */
  1048. proto.spine.core.EventContext.prototype.setEnrichment = function(value) {
  1049. return jspb.Message.setWrapperField(this, 5, value);
  1050. };
  1051. /**
  1052. * Clears the message field making it undefined.
  1053. * @return {!proto.spine.core.EventContext} returns this
  1054. */
  1055. proto.spine.core.EventContext.prototype.clearEnrichment = function() {
  1056. return this.setEnrichment(undefined);
  1057. };
  1058. /**
  1059. * Returns whether this field is set.
  1060. * @return {boolean}
  1061. */
  1062. proto.spine.core.EventContext.prototype.hasEnrichment = function() {
  1063. return jspb.Message.getField(this, 5) != null;
  1064. };
  1065. /**
  1066. * optional bool external = 8;
  1067. * @return {boolean}
  1068. */
  1069. proto.spine.core.EventContext.prototype.getExternal = function() {
  1070. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false));
  1071. };
  1072. /**
  1073. * @param {boolean} value
  1074. * @return {!proto.spine.core.EventContext} returns this
  1075. */
  1076. proto.spine.core.EventContext.prototype.setExternal = function(value) {
  1077. return jspb.Message.setProto3BooleanField(this, 8, value);
  1078. };
  1079. /**
  1080. * optional RejectionEventContext rejection = 10;
  1081. * @return {?proto.spine.core.RejectionEventContext}
  1082. */
  1083. proto.spine.core.EventContext.prototype.getRejection = function() {
  1084. return /** @type{?proto.spine.core.RejectionEventContext} */ (
  1085. jspb.Message.getWrapperField(this, proto.spine.core.RejectionEventContext, 10));
  1086. };
  1087. /**
  1088. * @param {?proto.spine.core.RejectionEventContext|undefined} value
  1089. * @return {!proto.spine.core.EventContext} returns this
  1090. */
  1091. proto.spine.core.EventContext.prototype.setRejection = function(value) {
  1092. return jspb.Message.setWrapperField(this, 10, value);
  1093. };
  1094. /**
  1095. * Clears the message field making it undefined.
  1096. * @return {!proto.spine.core.EventContext} returns this
  1097. */
  1098. proto.spine.core.EventContext.prototype.clearRejection = function() {
  1099. return this.setRejection(undefined);
  1100. };
  1101. /**
  1102. * Returns whether this field is set.
  1103. * @return {boolean}
  1104. */
  1105. proto.spine.core.EventContext.prototype.hasRejection = function() {
  1106. return jspb.Message.getField(this, 10) != null;
  1107. };
  1108. if (jspb.Message.GENERATE_TO_OBJECT) {
  1109. /**
  1110. * Creates an object representation of this proto.
  1111. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  1112. * Optional fields that are not set will be set to undefined.
  1113. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  1114. * For the list of reserved names please see:
  1115. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  1116. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  1117. * JSPB instance for transitional soy proto support:
  1118. * http://goto/soy-param-migration
  1119. * @return {!Object}
  1120. */
  1121. proto.spine.core.RejectionEventContext.prototype.toObject = function(opt_includeInstance) {
  1122. return proto.spine.core.RejectionEventContext.toObject(opt_includeInstance, this);
  1123. };
  1124. /**
  1125. * Static version of the {@see toObject} method.
  1126. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  1127. * the JSPB instance for transitional soy proto support:
  1128. * http://goto/soy-param-migration
  1129. * @param {!proto.spine.core.RejectionEventContext} msg The msg instance to transform.
  1130. * @return {!Object}
  1131. * @suppress {unusedLocalVariables} f is only used for nested messages
  1132. */
  1133. proto.spine.core.RejectionEventContext.toObject = function(includeInstance, msg) {
  1134. var f, obj = {
  1135. command: (f = msg.getCommand()) && spine_core_command_pb.Command.toObject(includeInstance, f),
  1136. stacktrace: jspb.Message.getFieldWithDefault(msg, 2, ""),
  1137. commandMessage: (f = msg.getCommandMessage()) && google_protobuf_any_pb.Any.toObject(includeInstance, f)
  1138. };
  1139. if (includeInstance) {
  1140. obj.$jspbMessageInstance = msg;
  1141. }
  1142. return obj;
  1143. };
  1144. }
  1145. /**
  1146. * Deserializes binary data (in protobuf wire format).
  1147. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  1148. * @return {!proto.spine.core.RejectionEventContext}
  1149. */
  1150. proto.spine.core.RejectionEventContext.deserializeBinary = function(bytes) {
  1151. var reader = new jspb.BinaryReader(bytes);
  1152. var msg = new proto.spine.core.RejectionEventContext;
  1153. return proto.spine.core.RejectionEventContext.deserializeBinaryFromReader(msg, reader);
  1154. };
  1155. /**
  1156. * Deserializes binary data (in protobuf wire format) from the
  1157. * given reader into the given message object.
  1158. * @param {!proto.spine.core.RejectionEventContext} msg The message object to deserialize into.
  1159. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  1160. * @return {!proto.spine.core.RejectionEventContext}
  1161. */
  1162. proto.spine.core.RejectionEventContext.deserializeBinaryFromReader = function(msg, reader) {
  1163. while (reader.nextField()) {
  1164. if (reader.isEndGroup()) {
  1165. break;
  1166. }
  1167. var field = reader.getFieldNumber();
  1168. switch (field) {
  1169. case 3:
  1170. var value = new spine_core_command_pb.Command;
  1171. reader.readMessage(value,spine_core_command_pb.Command.deserializeBinaryFromReader);
  1172. msg.setCommand(value);
  1173. break;
  1174. case 2:
  1175. var value = /** @type {string} */ (reader.readString());
  1176. msg.setStacktrace(value);
  1177. break;
  1178. case 1:
  1179. var value = new google_protobuf_any_pb.Any;
  1180. reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader);
  1181. msg.setCommandMessage(value);
  1182. break;
  1183. default:
  1184. reader.skipField();
  1185. break;
  1186. }
  1187. }
  1188. return msg;
  1189. };
  1190. /**
  1191. * Serializes the message to binary data (in protobuf wire format).
  1192. * @return {!Uint8Array}
  1193. */
  1194. proto.spine.core.RejectionEventContext.prototype.serializeBinary = function() {
  1195. var writer = new jspb.BinaryWriter();
  1196. proto.spine.core.RejectionEventContext.serializeBinaryToWriter(this, writer);
  1197. return writer.getResultBuffer();
  1198. };
  1199. /**
  1200. * Serializes the given message to binary data (in protobuf wire
  1201. * format), writing to the given BinaryWriter.
  1202. * @param {!proto.spine.core.RejectionEventContext} message
  1203. * @param {!jspb.BinaryWriter} writer
  1204. * @suppress {unusedLocalVariables} f is only used for nested messages
  1205. */
  1206. proto.spine.core.RejectionEventContext.serializeBinaryToWriter = function(message, writer) {
  1207. var f = undefined;
  1208. f = message.getCommand();
  1209. if (f != null) {
  1210. writer.writeMessage(
  1211. 3,
  1212. f,
  1213. spine_core_command_pb.Command.serializeBinaryToWriter
  1214. );
  1215. }
  1216. f = message.getStacktrace();
  1217. if (f.length > 0) {
  1218. writer.writeString(
  1219. 2,
  1220. f
  1221. );
  1222. }
  1223. f = message.getCommandMessage();
  1224. if (f != null) {
  1225. writer.writeMessage(
  1226. 1,
  1227. f,
  1228. google_protobuf_any_pb.Any.serializeBinaryToWriter
  1229. );
  1230. }
  1231. };
  1232. /**
  1233. * optional Command command = 3;
  1234. * @return {?proto.spine.core.Command}
  1235. */
  1236. proto.spine.core.RejectionEventContext.prototype.getCommand = function() {
  1237. return /** @type{?proto.spine.core.Command} */ (
  1238. jspb.Message.getWrapperField(this, spine_core_command_pb.Command, 3));
  1239. };
  1240. /**
  1241. * @param {?proto.spine.core.Command|undefined} value
  1242. * @return {!proto.spine.core.RejectionEventContext} returns this
  1243. */
  1244. proto.spine.core.RejectionEventContext.prototype.setCommand = function(value) {
  1245. return jspb.Message.setWrapperField(this, 3, value);
  1246. };
  1247. /**
  1248. * Clears the message field making it undefined.
  1249. * @return {!proto.spine.core.RejectionEventContext} returns this
  1250. */
  1251. proto.spine.core.RejectionEventContext.prototype.clearCommand = function() {
  1252. return this.setCommand(undefined);
  1253. };
  1254. /**
  1255. * Returns whether this field is set.
  1256. * @return {boolean}
  1257. */
  1258. proto.spine.core.RejectionEventContext.prototype.hasCommand = function() {
  1259. return jspb.Message.getField(this, 3) != null;
  1260. };
  1261. /**
  1262. * optional string stacktrace = 2;
  1263. * @return {string}
  1264. */
  1265. proto.spine.core.RejectionEventContext.prototype.getStacktrace = function() {
  1266. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
  1267. };
  1268. /**
  1269. * @param {string} value
  1270. * @return {!proto.spine.core.RejectionEventContext} returns this
  1271. */
  1272. proto.spine.core.RejectionEventContext.prototype.setStacktrace = function(value) {
  1273. return jspb.Message.setProto3StringField(this, 2, value);
  1274. };
  1275. /**
  1276. * optional google.protobuf.Any command_message = 1;
  1277. * @return {?proto.google.protobuf.Any}
  1278. */
  1279. proto.spine.core.RejectionEventContext.prototype.getCommandMessage = function() {
  1280. return /** @type{?proto.google.protobuf.Any} */ (
  1281. jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 1));
  1282. };
  1283. /**
  1284. * @param {?proto.google.protobuf.Any|undefined} value
  1285. * @return {!proto.spine.core.RejectionEventContext} returns this
  1286. */
  1287. proto.spine.core.RejectionEventContext.prototype.setCommandMessage = function(value) {
  1288. return jspb.Message.setWrapperField(this, 1, value);
  1289. };
  1290. /**
  1291. * Clears the message field making it undefined.
  1292. * @return {!proto.spine.core.RejectionEventContext} returns this
  1293. */
  1294. proto.spine.core.RejectionEventContext.prototype.clearCommandMessage = function() {
  1295. return this.setCommandMessage(undefined);
  1296. };
  1297. /**
  1298. * Returns whether this field is set.
  1299. * @return {boolean}
  1300. */
  1301. proto.spine.core.RejectionEventContext.prototype.hasCommandMessage = function() {
  1302. return jspb.Message.getField(this, 1) != null;
  1303. };
  1304. /**
  1305. * @enum {number}
  1306. */
  1307. proto.spine.core.EventValidationError = {
  1308. UNKNOWN_REASON: 0,
  1309. UNSUPPORTED_EVENT: 1,
  1310. INVALID_EVENT: 2,
  1311. DUPLICATE_EVENT: 3
  1312. };
  1313. goog.object.extend(exports, proto.spine.core);
  1314. // Generated by Spine ProtoJs Plugin
  1315. let ObjectParser = require('../../../client/parser/object-parser.js').default;
  1316. let TypeParsers = require('../../../client/parser/type-parsers.js').default;
  1317. proto.spine.core.EventId.Parser = function() {
  1318. ObjectParser.call(this);
  1319. };
  1320. proto.spine.core.EventId.Parser.prototype = Object.create(ObjectParser.prototype);
  1321. proto.spine.core.EventId.Parser.prototype.constructor = proto.spine.core.EventId.Parser;
  1322. proto.spine.core.EventId.Parser.prototype.fromObject = function(obj) {
  1323. if (obj === null) {
  1324. return null;
  1325. }
  1326. let msg = new proto.spine.core.EventId();
  1327. if (obj.value !== undefined) {
  1328. if (obj.value !== null) {
  1329. let value = obj.value;
  1330. msg.setValue(value);
  1331. }
  1332. }
  1333. return msg;
  1334. };
  1335. proto.spine.core.RejectionEventContext.Parser = function() {
  1336. ObjectParser.call(this);
  1337. };
  1338. proto.spine.core.RejectionEventContext.Parser.prototype = Object.create(ObjectParser.prototype);
  1339. proto.spine.core.RejectionEventContext.Parser.prototype.constructor = proto.spine.core.RejectionEventContext.Parser;
  1340. proto.spine.core.RejectionEventContext.Parser.prototype.fromObject = function(obj) {
  1341. if (obj === null) {
  1342. return null;
  1343. }
  1344. let msg = new proto.spine.core.RejectionEventContext();
  1345. if (obj.command !== undefined) {
  1346. if (obj.command === null) {
  1347. msg.setCommand(null);
  1348. } else {
  1349. let value = TypeParsers.parserFor('type.spine.io/spine.core.Command').fromObject(obj.command);
  1350. msg.setCommand(value);
  1351. }
  1352. }
  1353. if (obj.stacktrace !== undefined) {
  1354. if (obj.stacktrace !== null) {
  1355. let value = obj.stacktrace;
  1356. msg.setStacktrace(value);
  1357. }
  1358. }
  1359. if (obj.commandMessage !== undefined) {
  1360. if (obj.commandMessage === null) {
  1361. msg.setCommandMessage(null);
  1362. } else {
  1363. let value = TypeParsers.parserFor('type.googleapis.com/google.protobuf.Any').fromObject(obj.commandMessage);
  1364. msg.setCommandMessage(value);
  1365. }
  1366. }
  1367. return msg;
  1368. };
  1369. proto.spine.core.Event.Parser = function() {
  1370. ObjectParser.call(this);
  1371. };
  1372. proto.spine.core.Event.Parser.prototype = Object.create(ObjectParser.prototype);
  1373. proto.spine.core.Event.Parser.prototype.constructor = proto.spine.core.Event.Parser;
  1374. proto.spine.core.Event.Parser.prototype.fromObject = function(obj) {
  1375. if (obj === null) {
  1376. return null;
  1377. }
  1378. let msg = new proto.spine.core.Event();
  1379. if (obj.id !== undefined) {
  1380. if (obj.id === null) {
  1381. msg.setId(null);
  1382. } else {
  1383. let value = TypeParsers.parserFor('type.spine.io/spine.core.EventId').fromObject(obj.id);
  1384. msg.setId(value);
  1385. }
  1386. }
  1387. if (obj.message !== undefined) {
  1388. if (obj.message === null) {
  1389. msg.setMessage(null);
  1390. } else {
  1391. let value = TypeParsers.parserFor('type.googleapis.com/google.protobuf.Any').fromObject(obj.message);
  1392. msg.setMessage(value);
  1393. }
  1394. }
  1395. if (obj.context !== undefined) {
  1396. if (obj.context === null) {
  1397. msg.setContext(null);
  1398. } else {
  1399. let value = TypeParsers.parserFor('type.spine.io/spine.core.EventContext').fromObject(obj.context);
  1400. msg.setContext(value);
  1401. }
  1402. }
  1403. return msg;
  1404. };
  1405. proto.spine.core.EventContext.Parser = function() {
  1406. ObjectParser.call(this);
  1407. };
  1408. proto.spine.core.EventContext.Parser.prototype = Object.create(ObjectParser.prototype);
  1409. proto.spine.core.EventContext.Parser.prototype.constructor = proto.spine.core.EventContext.Parser;
  1410. proto.spine.core.EventContext.Parser.prototype.fromObject = function(obj) {
  1411. if (obj === null) {
  1412. return null;
  1413. }
  1414. let msg = new proto.spine.core.EventContext();
  1415. if (obj.timestamp !== undefined) {
  1416. if (obj.timestamp === null) {
  1417. msg.setTimestamp(null);
  1418. } else {
  1419. let value = TypeParsers.parserFor('type.googleapis.com/google.protobuf.Timestamp').fromObject(obj.timestamp);
  1420. msg.setTimestamp(value);
  1421. }
  1422. }
  1423. if (obj.commandContext !== undefined) {
  1424. if (obj.commandContext === null) {
  1425. msg.setCommandContext(null);
  1426. } else {
  1427. let value = TypeParsers.parserFor('type.spine.io/spine.core.CommandContext').fromObject(obj.commandContext);
  1428. msg.setCommandContext(value);
  1429. }
  1430. }
  1431. if (obj.eventContext !== undefined) {
  1432. if (obj.eventContext === null) {
  1433. msg.setEventContext(null);
  1434. } else {
  1435. let value = TypeParsers.parserFor('type.spine.io/spine.core.EventContext').fromObject(obj.eventContext);
  1436. msg.setEventContext(value);
  1437. }
  1438. }
  1439. if (obj.pastMessage !== undefined) {
  1440. if (obj.pastMessage === null) {
  1441. msg.setPastMessage(null);
  1442. } else {
  1443. let value = TypeParsers.parserFor('type.spine.io/spine.core.Origin').fromObject(obj.pastMessage);
  1444. msg.setPastMessage(value);
  1445. }
  1446. }
  1447. if (obj.importContext !== undefined) {
  1448. if (obj.importContext === null) {
  1449. msg.setImportContext(null);
  1450. } else {
  1451. let value = TypeParsers.parserFor('type.spine.io/spine.core.ActorContext').fromObject(obj.importContext);
  1452. msg.setImportContext(value);
  1453. }
  1454. }
  1455. if (obj.commandId !== undefined) {
  1456. if (obj.commandId === null) {
  1457. msg.setCommandId(null);
  1458. } else {
  1459. let value = TypeParsers.parserFor('type.spine.io/spine.core.CommandId').fromObject(obj.commandId);
  1460. msg.setCommandId(value);
  1461. }
  1462. }
  1463. if (obj.eventId !== undefined) {
  1464. if (obj.eventId === null) {
  1465. msg.setEventId(null);
  1466. } else {
  1467. let value = TypeParsers.parserFor('type.spine.io/spine.core.EventId').fromObject(obj.eventId);
  1468. msg.setEventId(value);
  1469. }
  1470. }
  1471. if (obj.rootCommandId !== undefined) {
  1472. if (obj.rootCommandId === null) {
  1473. msg.setRootCommandId(null);
  1474. } else {
  1475. let value = TypeParsers.parserFor('type.spine.io/spine.core.CommandId').fromObject(obj.rootCommandId);
  1476. msg.setRootCommandId(value);
  1477. }
  1478. }
  1479. if (obj.producerId !== undefined) {
  1480. if (obj.producerId === null) {
  1481. msg.setProducerId(null);
  1482. } else {
  1483. let value = TypeParsers.parserFor('type.googleapis.com/google.protobuf.Any').fromObject(obj.producerId);
  1484. msg.setProducerId(value);
  1485. }
  1486. }
  1487. if (obj.version !== undefined) {
  1488. if (obj.version === null) {
  1489. msg.setVersion(null);
  1490. } else {
  1491. let value = TypeParsers.parserFor('type.spine.io/spine.core.Version').fromObject(obj.version);
  1492. msg.setVersion(value);
  1493. }
  1494. }
  1495. if (obj.enrichment !== undefined) {
  1496. if (obj.enrichment === null) {
  1497. msg.setEnrichment(null);
  1498. } else {
  1499. let value = TypeParsers.parserFor('type.spine.io/spine.core.Enrichment').fromObject(obj.enrichment);
  1500. msg.setEnrichment(value);
  1501. }
  1502. }
  1503. if (obj.external !== undefined) {
  1504. if (obj.external !== null) {
  1505. let value = obj.external;
  1506. msg.setExternal(value);
  1507. }
  1508. }
  1509. if (obj.rejection !== undefined) {
  1510. if (obj.rejection === null) {
  1511. msg.setRejection(null);
  1512. } else {
  1513. let value = TypeParsers.parserFor('type.spine.io/spine.core.RejectionEventContext').fromObject(obj.rejection);
  1514. msg.setRejection(value);
  1515. }
  1516. }
  1517. return msg;
  1518. };
  1519. // Generated by Spine ProtoJs Plugin
  1520. proto.spine.core.EventId.typeUrl = function() {
  1521. return 'type.spine.io/spine.core.EventId';
  1522. };
  1523. // Generated by Spine ProtoJs Plugin
  1524. proto.spine.core.RejectionEventContext.typeUrl = function() {
  1525. return 'type.spine.io/spine.core.RejectionEventContext';
  1526. };
  1527. // Generated by Spine ProtoJs Plugin
  1528. proto.spine.core.Event.typeUrl = function() {
  1529. return 'type.spine.io/spine.core.Event';
  1530. };
  1531. // Generated by Spine ProtoJs Plugin
  1532. proto.spine.core.EventContext.typeUrl = function() {
  1533. return 'type.spine.io/spine.core.EventContext';
  1534. };
  1535. // Generated by Spine ProtoJs Plugin
  1536. proto.spine.core.EventValidationError.typeUrl = function() {
  1537. return 'type.spine.io/spine.core.EventValidationError';
  1538. };