Source: proto/spine/core/diagnostics_pb.js

  1. // source: spine/core/diagnostics.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 spine_core_actor_context_pb = require('../../spine/core/actor_context_pb.js');
  18. goog.object.extend(proto, spine_core_actor_context_pb);
  19. var spine_core_version_pb = require('../../spine/core/version_pb.js');
  20. goog.object.extend(proto, spine_core_version_pb);
  21. goog.exportSymbol('proto.spine.core.MessageId', null, global);
  22. goog.exportSymbol('proto.spine.core.Origin', null, global);
  23. /**
  24. * Generated by JsPbCodeGenerator.
  25. * @param {Array=} opt_data Optional initial data array, typically from a
  26. * server response, or constructed directly in Javascript. The array is used
  27. * in place and becomes part of the constructed object. It is not cloned.
  28. * If no data is provided, the constructed object will be empty, but still
  29. * valid.
  30. * @extends {jspb.Message}
  31. * @constructor
  32. */
  33. proto.spine.core.MessageId = function(opt_data) {
  34. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  35. };
  36. goog.inherits(proto.spine.core.MessageId, jspb.Message);
  37. if (goog.DEBUG && !COMPILED) {
  38. /**
  39. * @public
  40. * @override
  41. */
  42. proto.spine.core.MessageId.displayName = 'proto.spine.core.MessageId';
  43. }
  44. /**
  45. * Generated by JsPbCodeGenerator.
  46. * @param {Array=} opt_data Optional initial data array, typically from a
  47. * server response, or constructed directly in Javascript. The array is used
  48. * in place and becomes part of the constructed object. It is not cloned.
  49. * If no data is provided, the constructed object will be empty, but still
  50. * valid.
  51. * @extends {jspb.Message}
  52. * @constructor
  53. */
  54. proto.spine.core.Origin = function(opt_data) {
  55. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  56. };
  57. goog.inherits(proto.spine.core.Origin, jspb.Message);
  58. if (goog.DEBUG && !COMPILED) {
  59. /**
  60. * @public
  61. * @override
  62. */
  63. proto.spine.core.Origin.displayName = 'proto.spine.core.Origin';
  64. }
  65. if (jspb.Message.GENERATE_TO_OBJECT) {
  66. /**
  67. * Creates an object representation of this proto.
  68. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  69. * Optional fields that are not set will be set to undefined.
  70. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  71. * For the list of reserved names please see:
  72. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  73. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  74. * JSPB instance for transitional soy proto support:
  75. * http://goto/soy-param-migration
  76. * @return {!Object}
  77. */
  78. proto.spine.core.MessageId.prototype.toObject = function(opt_includeInstance) {
  79. return proto.spine.core.MessageId.toObject(opt_includeInstance, this);
  80. };
  81. /**
  82. * Static version of the {@see toObject} method.
  83. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  84. * the JSPB instance for transitional soy proto support:
  85. * http://goto/soy-param-migration
  86. * @param {!proto.spine.core.MessageId} msg The msg instance to transform.
  87. * @return {!Object}
  88. * @suppress {unusedLocalVariables} f is only used for nested messages
  89. */
  90. proto.spine.core.MessageId.toObject = function(includeInstance, msg) {
  91. var f, obj = {
  92. id: (f = msg.getId()) && google_protobuf_any_pb.Any.toObject(includeInstance, f),
  93. typeUrl: jspb.Message.getFieldWithDefault(msg, 2, ""),
  94. version: (f = msg.getVersion()) && spine_core_version_pb.Version.toObject(includeInstance, f)
  95. };
  96. if (includeInstance) {
  97. obj.$jspbMessageInstance = msg;
  98. }
  99. return obj;
  100. };
  101. }
  102. /**
  103. * Deserializes binary data (in protobuf wire format).
  104. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  105. * @return {!proto.spine.core.MessageId}
  106. */
  107. proto.spine.core.MessageId.deserializeBinary = function(bytes) {
  108. var reader = new jspb.BinaryReader(bytes);
  109. var msg = new proto.spine.core.MessageId;
  110. return proto.spine.core.MessageId.deserializeBinaryFromReader(msg, reader);
  111. };
  112. /**
  113. * Deserializes binary data (in protobuf wire format) from the
  114. * given reader into the given message object.
  115. * @param {!proto.spine.core.MessageId} msg The message object to deserialize into.
  116. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  117. * @return {!proto.spine.core.MessageId}
  118. */
  119. proto.spine.core.MessageId.deserializeBinaryFromReader = function(msg, reader) {
  120. while (reader.nextField()) {
  121. if (reader.isEndGroup()) {
  122. break;
  123. }
  124. var field = reader.getFieldNumber();
  125. switch (field) {
  126. case 1:
  127. var value = new google_protobuf_any_pb.Any;
  128. reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader);
  129. msg.setId(value);
  130. break;
  131. case 2:
  132. var value = /** @type {string} */ (reader.readString());
  133. msg.setTypeUrl(value);
  134. break;
  135. case 3:
  136. var value = new spine_core_version_pb.Version;
  137. reader.readMessage(value,spine_core_version_pb.Version.deserializeBinaryFromReader);
  138. msg.setVersion(value);
  139. break;
  140. default:
  141. reader.skipField();
  142. break;
  143. }
  144. }
  145. return msg;
  146. };
  147. /**
  148. * Serializes the message to binary data (in protobuf wire format).
  149. * @return {!Uint8Array}
  150. */
  151. proto.spine.core.MessageId.prototype.serializeBinary = function() {
  152. var writer = new jspb.BinaryWriter();
  153. proto.spine.core.MessageId.serializeBinaryToWriter(this, writer);
  154. return writer.getResultBuffer();
  155. };
  156. /**
  157. * Serializes the given message to binary data (in protobuf wire
  158. * format), writing to the given BinaryWriter.
  159. * @param {!proto.spine.core.MessageId} message
  160. * @param {!jspb.BinaryWriter} writer
  161. * @suppress {unusedLocalVariables} f is only used for nested messages
  162. */
  163. proto.spine.core.MessageId.serializeBinaryToWriter = function(message, writer) {
  164. var f = undefined;
  165. f = message.getId();
  166. if (f != null) {
  167. writer.writeMessage(
  168. 1,
  169. f,
  170. google_protobuf_any_pb.Any.serializeBinaryToWriter
  171. );
  172. }
  173. f = message.getTypeUrl();
  174. if (f.length > 0) {
  175. writer.writeString(
  176. 2,
  177. f
  178. );
  179. }
  180. f = message.getVersion();
  181. if (f != null) {
  182. writer.writeMessage(
  183. 3,
  184. f,
  185. spine_core_version_pb.Version.serializeBinaryToWriter
  186. );
  187. }
  188. };
  189. /**
  190. * optional google.protobuf.Any id = 1;
  191. * @return {?proto.google.protobuf.Any}
  192. */
  193. proto.spine.core.MessageId.prototype.getId = function() {
  194. return /** @type{?proto.google.protobuf.Any} */ (
  195. jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 1));
  196. };
  197. /**
  198. * @param {?proto.google.protobuf.Any|undefined} value
  199. * @return {!proto.spine.core.MessageId} returns this
  200. */
  201. proto.spine.core.MessageId.prototype.setId = function(value) {
  202. return jspb.Message.setWrapperField(this, 1, value);
  203. };
  204. /**
  205. * Clears the message field making it undefined.
  206. * @return {!proto.spine.core.MessageId} returns this
  207. */
  208. proto.spine.core.MessageId.prototype.clearId = function() {
  209. return this.setId(undefined);
  210. };
  211. /**
  212. * Returns whether this field is set.
  213. * @return {boolean}
  214. */
  215. proto.spine.core.MessageId.prototype.hasId = function() {
  216. return jspb.Message.getField(this, 1) != null;
  217. };
  218. /**
  219. * optional string type_url = 2;
  220. * @return {string}
  221. */
  222. proto.spine.core.MessageId.prototype.getTypeUrl = function() {
  223. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
  224. };
  225. /**
  226. * @param {string} value
  227. * @return {!proto.spine.core.MessageId} returns this
  228. */
  229. proto.spine.core.MessageId.prototype.setTypeUrl = function(value) {
  230. return jspb.Message.setProto3StringField(this, 2, value);
  231. };
  232. /**
  233. * optional Version version = 3;
  234. * @return {?proto.spine.core.Version}
  235. */
  236. proto.spine.core.MessageId.prototype.getVersion = function() {
  237. return /** @type{?proto.spine.core.Version} */ (
  238. jspb.Message.getWrapperField(this, spine_core_version_pb.Version, 3));
  239. };
  240. /**
  241. * @param {?proto.spine.core.Version|undefined} value
  242. * @return {!proto.spine.core.MessageId} returns this
  243. */
  244. proto.spine.core.MessageId.prototype.setVersion = function(value) {
  245. return jspb.Message.setWrapperField(this, 3, value);
  246. };
  247. /**
  248. * Clears the message field making it undefined.
  249. * @return {!proto.spine.core.MessageId} returns this
  250. */
  251. proto.spine.core.MessageId.prototype.clearVersion = function() {
  252. return this.setVersion(undefined);
  253. };
  254. /**
  255. * Returns whether this field is set.
  256. * @return {boolean}
  257. */
  258. proto.spine.core.MessageId.prototype.hasVersion = function() {
  259. return jspb.Message.getField(this, 3) != null;
  260. };
  261. if (jspb.Message.GENERATE_TO_OBJECT) {
  262. /**
  263. * Creates an object representation of this proto.
  264. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  265. * Optional fields that are not set will be set to undefined.
  266. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  267. * For the list of reserved names please see:
  268. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  269. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  270. * JSPB instance for transitional soy proto support:
  271. * http://goto/soy-param-migration
  272. * @return {!Object}
  273. */
  274. proto.spine.core.Origin.prototype.toObject = function(opt_includeInstance) {
  275. return proto.spine.core.Origin.toObject(opt_includeInstance, this);
  276. };
  277. /**
  278. * Static version of the {@see toObject} method.
  279. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  280. * the JSPB instance for transitional soy proto support:
  281. * http://goto/soy-param-migration
  282. * @param {!proto.spine.core.Origin} msg The msg instance to transform.
  283. * @return {!Object}
  284. * @suppress {unusedLocalVariables} f is only used for nested messages
  285. */
  286. proto.spine.core.Origin.toObject = function(includeInstance, msg) {
  287. var f, obj = {
  288. message: (f = msg.getMessage()) && proto.spine.core.MessageId.toObject(includeInstance, f),
  289. grandOrigin: (f = msg.getGrandOrigin()) && proto.spine.core.Origin.toObject(includeInstance, f),
  290. actorContext: (f = msg.getActorContext()) && spine_core_actor_context_pb.ActorContext.toObject(includeInstance, f)
  291. };
  292. if (includeInstance) {
  293. obj.$jspbMessageInstance = msg;
  294. }
  295. return obj;
  296. };
  297. }
  298. /**
  299. * Deserializes binary data (in protobuf wire format).
  300. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  301. * @return {!proto.spine.core.Origin}
  302. */
  303. proto.spine.core.Origin.deserializeBinary = function(bytes) {
  304. var reader = new jspb.BinaryReader(bytes);
  305. var msg = new proto.spine.core.Origin;
  306. return proto.spine.core.Origin.deserializeBinaryFromReader(msg, reader);
  307. };
  308. /**
  309. * Deserializes binary data (in protobuf wire format) from the
  310. * given reader into the given message object.
  311. * @param {!proto.spine.core.Origin} msg The message object to deserialize into.
  312. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  313. * @return {!proto.spine.core.Origin}
  314. */
  315. proto.spine.core.Origin.deserializeBinaryFromReader = function(msg, reader) {
  316. while (reader.nextField()) {
  317. if (reader.isEndGroup()) {
  318. break;
  319. }
  320. var field = reader.getFieldNumber();
  321. switch (field) {
  322. case 1:
  323. var value = new proto.spine.core.MessageId;
  324. reader.readMessage(value,proto.spine.core.MessageId.deserializeBinaryFromReader);
  325. msg.setMessage(value);
  326. break;
  327. case 2:
  328. var value = new proto.spine.core.Origin;
  329. reader.readMessage(value,proto.spine.core.Origin.deserializeBinaryFromReader);
  330. msg.setGrandOrigin(value);
  331. break;
  332. case 3:
  333. var value = new spine_core_actor_context_pb.ActorContext;
  334. reader.readMessage(value,spine_core_actor_context_pb.ActorContext.deserializeBinaryFromReader);
  335. msg.setActorContext(value);
  336. break;
  337. default:
  338. reader.skipField();
  339. break;
  340. }
  341. }
  342. return msg;
  343. };
  344. /**
  345. * Serializes the message to binary data (in protobuf wire format).
  346. * @return {!Uint8Array}
  347. */
  348. proto.spine.core.Origin.prototype.serializeBinary = function() {
  349. var writer = new jspb.BinaryWriter();
  350. proto.spine.core.Origin.serializeBinaryToWriter(this, writer);
  351. return writer.getResultBuffer();
  352. };
  353. /**
  354. * Serializes the given message to binary data (in protobuf wire
  355. * format), writing to the given BinaryWriter.
  356. * @param {!proto.spine.core.Origin} message
  357. * @param {!jspb.BinaryWriter} writer
  358. * @suppress {unusedLocalVariables} f is only used for nested messages
  359. */
  360. proto.spine.core.Origin.serializeBinaryToWriter = function(message, writer) {
  361. var f = undefined;
  362. f = message.getMessage();
  363. if (f != null) {
  364. writer.writeMessage(
  365. 1,
  366. f,
  367. proto.spine.core.MessageId.serializeBinaryToWriter
  368. );
  369. }
  370. f = message.getGrandOrigin();
  371. if (f != null) {
  372. writer.writeMessage(
  373. 2,
  374. f,
  375. proto.spine.core.Origin.serializeBinaryToWriter
  376. );
  377. }
  378. f = message.getActorContext();
  379. if (f != null) {
  380. writer.writeMessage(
  381. 3,
  382. f,
  383. spine_core_actor_context_pb.ActorContext.serializeBinaryToWriter
  384. );
  385. }
  386. };
  387. /**
  388. * optional MessageId message = 1;
  389. * @return {?proto.spine.core.MessageId}
  390. */
  391. proto.spine.core.Origin.prototype.getMessage = function() {
  392. return /** @type{?proto.spine.core.MessageId} */ (
  393. jspb.Message.getWrapperField(this, proto.spine.core.MessageId, 1));
  394. };
  395. /**
  396. * @param {?proto.spine.core.MessageId|undefined} value
  397. * @return {!proto.spine.core.Origin} returns this
  398. */
  399. proto.spine.core.Origin.prototype.setMessage = function(value) {
  400. return jspb.Message.setWrapperField(this, 1, value);
  401. };
  402. /**
  403. * Clears the message field making it undefined.
  404. * @return {!proto.spine.core.Origin} returns this
  405. */
  406. proto.spine.core.Origin.prototype.clearMessage = function() {
  407. return this.setMessage(undefined);
  408. };
  409. /**
  410. * Returns whether this field is set.
  411. * @return {boolean}
  412. */
  413. proto.spine.core.Origin.prototype.hasMessage = function() {
  414. return jspb.Message.getField(this, 1) != null;
  415. };
  416. /**
  417. * optional Origin grand_origin = 2;
  418. * @return {?proto.spine.core.Origin}
  419. */
  420. proto.spine.core.Origin.prototype.getGrandOrigin = function() {
  421. return /** @type{?proto.spine.core.Origin} */ (
  422. jspb.Message.getWrapperField(this, proto.spine.core.Origin, 2));
  423. };
  424. /**
  425. * @param {?proto.spine.core.Origin|undefined} value
  426. * @return {!proto.spine.core.Origin} returns this
  427. */
  428. proto.spine.core.Origin.prototype.setGrandOrigin = function(value) {
  429. return jspb.Message.setWrapperField(this, 2, value);
  430. };
  431. /**
  432. * Clears the message field making it undefined.
  433. * @return {!proto.spine.core.Origin} returns this
  434. */
  435. proto.spine.core.Origin.prototype.clearGrandOrigin = function() {
  436. return this.setGrandOrigin(undefined);
  437. };
  438. /**
  439. * Returns whether this field is set.
  440. * @return {boolean}
  441. */
  442. proto.spine.core.Origin.prototype.hasGrandOrigin = function() {
  443. return jspb.Message.getField(this, 2) != null;
  444. };
  445. /**
  446. * optional ActorContext actor_context = 3;
  447. * @return {?proto.spine.core.ActorContext}
  448. */
  449. proto.spine.core.Origin.prototype.getActorContext = function() {
  450. return /** @type{?proto.spine.core.ActorContext} */ (
  451. jspb.Message.getWrapperField(this, spine_core_actor_context_pb.ActorContext, 3));
  452. };
  453. /**
  454. * @param {?proto.spine.core.ActorContext|undefined} value
  455. * @return {!proto.spine.core.Origin} returns this
  456. */
  457. proto.spine.core.Origin.prototype.setActorContext = function(value) {
  458. return jspb.Message.setWrapperField(this, 3, value);
  459. };
  460. /**
  461. * Clears the message field making it undefined.
  462. * @return {!proto.spine.core.Origin} returns this
  463. */
  464. proto.spine.core.Origin.prototype.clearActorContext = function() {
  465. return this.setActorContext(undefined);
  466. };
  467. /**
  468. * Returns whether this field is set.
  469. * @return {boolean}
  470. */
  471. proto.spine.core.Origin.prototype.hasActorContext = function() {
  472. return jspb.Message.getField(this, 3) != null;
  473. };
  474. goog.object.extend(exports, proto.spine.core);
  475. // Generated by Spine ProtoJs Plugin
  476. let ObjectParser = require('../../../client/parser/object-parser.js').default;
  477. let TypeParsers = require('../../../client/parser/type-parsers.js').default;
  478. proto.spine.core.MessageId.Parser = function() {
  479. ObjectParser.call(this);
  480. };
  481. proto.spine.core.MessageId.Parser.prototype = Object.create(ObjectParser.prototype);
  482. proto.spine.core.MessageId.Parser.prototype.constructor = proto.spine.core.MessageId.Parser;
  483. proto.spine.core.MessageId.Parser.prototype.fromObject = function(obj) {
  484. if (obj === null) {
  485. return null;
  486. }
  487. let msg = new proto.spine.core.MessageId();
  488. if (obj.id !== undefined) {
  489. if (obj.id === null) {
  490. msg.setId(null);
  491. } else {
  492. let value = TypeParsers.parserFor('type.googleapis.com/google.protobuf.Any').fromObject(obj.id);
  493. msg.setId(value);
  494. }
  495. }
  496. if (obj.typeUrl !== undefined) {
  497. if (obj.typeUrl !== null) {
  498. let value = obj.typeUrl;
  499. msg.setTypeUrl(value);
  500. }
  501. }
  502. if (obj.version !== undefined) {
  503. if (obj.version === null) {
  504. msg.setVersion(null);
  505. } else {
  506. let value = TypeParsers.parserFor('type.spine.io/spine.core.Version').fromObject(obj.version);
  507. msg.setVersion(value);
  508. }
  509. }
  510. return msg;
  511. };
  512. proto.spine.core.Origin.Parser = function() {
  513. ObjectParser.call(this);
  514. };
  515. proto.spine.core.Origin.Parser.prototype = Object.create(ObjectParser.prototype);
  516. proto.spine.core.Origin.Parser.prototype.constructor = proto.spine.core.Origin.Parser;
  517. proto.spine.core.Origin.Parser.prototype.fromObject = function(obj) {
  518. if (obj === null) {
  519. return null;
  520. }
  521. let msg = new proto.spine.core.Origin();
  522. if (obj.message !== undefined) {
  523. if (obj.message === null) {
  524. msg.setMessage(null);
  525. } else {
  526. let value = TypeParsers.parserFor('type.spine.io/spine.core.MessageId').fromObject(obj.message);
  527. msg.setMessage(value);
  528. }
  529. }
  530. if (obj.grandOrigin !== undefined) {
  531. if (obj.grandOrigin === null) {
  532. msg.setGrandOrigin(null);
  533. } else {
  534. let value = TypeParsers.parserFor('type.spine.io/spine.core.Origin').fromObject(obj.grandOrigin);
  535. msg.setGrandOrigin(value);
  536. }
  537. }
  538. if (obj.actorContext !== undefined) {
  539. if (obj.actorContext === null) {
  540. msg.setActorContext(null);
  541. } else {
  542. let value = TypeParsers.parserFor('type.spine.io/spine.core.ActorContext').fromObject(obj.actorContext);
  543. msg.setActorContext(value);
  544. }
  545. }
  546. return msg;
  547. };
  548. // Generated by Spine ProtoJs Plugin
  549. proto.spine.core.MessageId.typeUrl = function() {
  550. return 'type.spine.io/spine.core.MessageId';
  551. };
  552. // Generated by Spine ProtoJs Plugin
  553. proto.spine.core.Origin.typeUrl = function() {
  554. return 'type.spine.io/spine.core.Origin';
  555. };