Source: proto/spine/client/query_pb.js

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