Source: proto/spine/client/subscription_pb.js

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