Source: proto/spine/web/keeping_up_pb.js

  1. // source: spine/web/keeping_up.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 spine_client_subscription_pb = require('../../spine/client/subscription_pb.js');
  16. goog.object.extend(proto, spine_client_subscription_pb);
  17. var spine_core_response_pb = require('../../spine/core/response_pb.js');
  18. goog.object.extend(proto, spine_core_response_pb);
  19. goog.exportSymbol('proto.spine.web.Responses', null, global);
  20. goog.exportSymbol('proto.spine.web.Subscriptions', null, global);
  21. /**
  22. * Generated by JsPbCodeGenerator.
  23. * @param {Array=} opt_data Optional initial data array, typically from a
  24. * server response, or constructed directly in Javascript. The array is used
  25. * in place and becomes part of the constructed object. It is not cloned.
  26. * If no data is provided, the constructed object will be empty, but still
  27. * valid.
  28. * @extends {jspb.Message}
  29. * @constructor
  30. */
  31. proto.spine.web.Subscriptions = function(opt_data) {
  32. jspb.Message.initialize(this, opt_data, 0, -1, proto.spine.web.Subscriptions.repeatedFields_, null);
  33. };
  34. goog.inherits(proto.spine.web.Subscriptions, jspb.Message);
  35. if (goog.DEBUG && !COMPILED) {
  36. /**
  37. * @public
  38. * @override
  39. */
  40. proto.spine.web.Subscriptions.displayName = 'proto.spine.web.Subscriptions';
  41. }
  42. /**
  43. * Generated by JsPbCodeGenerator.
  44. * @param {Array=} opt_data Optional initial data array, typically from a
  45. * server response, or constructed directly in Javascript. The array is used
  46. * in place and becomes part of the constructed object. It is not cloned.
  47. * If no data is provided, the constructed object will be empty, but still
  48. * valid.
  49. * @extends {jspb.Message}
  50. * @constructor
  51. */
  52. proto.spine.web.Responses = function(opt_data) {
  53. jspb.Message.initialize(this, opt_data, 0, -1, proto.spine.web.Responses.repeatedFields_, null);
  54. };
  55. goog.inherits(proto.spine.web.Responses, jspb.Message);
  56. if (goog.DEBUG && !COMPILED) {
  57. /**
  58. * @public
  59. * @override
  60. */
  61. proto.spine.web.Responses.displayName = 'proto.spine.web.Responses';
  62. }
  63. /**
  64. * List of repeated fields within this message type.
  65. * @private {!Array<number>}
  66. * @const
  67. */
  68. proto.spine.web.Subscriptions.repeatedFields_ = [1];
  69. if (jspb.Message.GENERATE_TO_OBJECT) {
  70. /**
  71. * Creates an object representation of this proto.
  72. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  73. * Optional fields that are not set will be set to undefined.
  74. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  75. * For the list of reserved names please see:
  76. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  77. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  78. * JSPB instance for transitional soy proto support:
  79. * http://goto/soy-param-migration
  80. * @return {!Object}
  81. */
  82. proto.spine.web.Subscriptions.prototype.toObject = function(opt_includeInstance) {
  83. return proto.spine.web.Subscriptions.toObject(opt_includeInstance, this);
  84. };
  85. /**
  86. * Static version of the {@see toObject} method.
  87. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  88. * the JSPB instance for transitional soy proto support:
  89. * http://goto/soy-param-migration
  90. * @param {!proto.spine.web.Subscriptions} msg The msg instance to transform.
  91. * @return {!Object}
  92. * @suppress {unusedLocalVariables} f is only used for nested messages
  93. */
  94. proto.spine.web.Subscriptions.toObject = function(includeInstance, msg) {
  95. var f, obj = {
  96. subscriptionList: jspb.Message.toObjectList(msg.getSubscriptionList(),
  97. spine_client_subscription_pb.Subscription.toObject, includeInstance)
  98. };
  99. if (includeInstance) {
  100. obj.$jspbMessageInstance = msg;
  101. }
  102. return obj;
  103. };
  104. }
  105. /**
  106. * Deserializes binary data (in protobuf wire format).
  107. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  108. * @return {!proto.spine.web.Subscriptions}
  109. */
  110. proto.spine.web.Subscriptions.deserializeBinary = function(bytes) {
  111. var reader = new jspb.BinaryReader(bytes);
  112. var msg = new proto.spine.web.Subscriptions;
  113. return proto.spine.web.Subscriptions.deserializeBinaryFromReader(msg, reader);
  114. };
  115. /**
  116. * Deserializes binary data (in protobuf wire format) from the
  117. * given reader into the given message object.
  118. * @param {!proto.spine.web.Subscriptions} msg The message object to deserialize into.
  119. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  120. * @return {!proto.spine.web.Subscriptions}
  121. */
  122. proto.spine.web.Subscriptions.deserializeBinaryFromReader = function(msg, reader) {
  123. while (reader.nextField()) {
  124. if (reader.isEndGroup()) {
  125. break;
  126. }
  127. var field = reader.getFieldNumber();
  128. switch (field) {
  129. case 1:
  130. var value = new spine_client_subscription_pb.Subscription;
  131. reader.readMessage(value,spine_client_subscription_pb.Subscription.deserializeBinaryFromReader);
  132. msg.addSubscription(value);
  133. break;
  134. default:
  135. reader.skipField();
  136. break;
  137. }
  138. }
  139. return msg;
  140. };
  141. /**
  142. * Serializes the message to binary data (in protobuf wire format).
  143. * @return {!Uint8Array}
  144. */
  145. proto.spine.web.Subscriptions.prototype.serializeBinary = function() {
  146. var writer = new jspb.BinaryWriter();
  147. proto.spine.web.Subscriptions.serializeBinaryToWriter(this, writer);
  148. return writer.getResultBuffer();
  149. };
  150. /**
  151. * Serializes the given message to binary data (in protobuf wire
  152. * format), writing to the given BinaryWriter.
  153. * @param {!proto.spine.web.Subscriptions} message
  154. * @param {!jspb.BinaryWriter} writer
  155. * @suppress {unusedLocalVariables} f is only used for nested messages
  156. */
  157. proto.spine.web.Subscriptions.serializeBinaryToWriter = function(message, writer) {
  158. var f = undefined;
  159. f = message.getSubscriptionList();
  160. if (f.length > 0) {
  161. writer.writeRepeatedMessage(
  162. 1,
  163. f,
  164. spine_client_subscription_pb.Subscription.serializeBinaryToWriter
  165. );
  166. }
  167. };
  168. /**
  169. * repeated spine.client.Subscription subscription = 1;
  170. * @return {!Array<!proto.spine.client.Subscription>}
  171. */
  172. proto.spine.web.Subscriptions.prototype.getSubscriptionList = function() {
  173. return /** @type{!Array<!proto.spine.client.Subscription>} */ (
  174. jspb.Message.getRepeatedWrapperField(this, spine_client_subscription_pb.Subscription, 1));
  175. };
  176. /**
  177. * @param {!Array<!proto.spine.client.Subscription>} value
  178. * @return {!proto.spine.web.Subscriptions} returns this
  179. */
  180. proto.spine.web.Subscriptions.prototype.setSubscriptionList = function(value) {
  181. return jspb.Message.setRepeatedWrapperField(this, 1, value);
  182. };
  183. /**
  184. * @param {!proto.spine.client.Subscription=} opt_value
  185. * @param {number=} opt_index
  186. * @return {!proto.spine.client.Subscription}
  187. */
  188. proto.spine.web.Subscriptions.prototype.addSubscription = function(opt_value, opt_index) {
  189. return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.spine.client.Subscription, opt_index);
  190. };
  191. /**
  192. * Clears the list making it empty but non-null.
  193. * @return {!proto.spine.web.Subscriptions} returns this
  194. */
  195. proto.spine.web.Subscriptions.prototype.clearSubscriptionList = function() {
  196. return this.setSubscriptionList([]);
  197. };
  198. /**
  199. * List of repeated fields within this message type.
  200. * @private {!Array<number>}
  201. * @const
  202. */
  203. proto.spine.web.Responses.repeatedFields_ = [1];
  204. if (jspb.Message.GENERATE_TO_OBJECT) {
  205. /**
  206. * Creates an object representation of this proto.
  207. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  208. * Optional fields that are not set will be set to undefined.
  209. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  210. * For the list of reserved names please see:
  211. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  212. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  213. * JSPB instance for transitional soy proto support:
  214. * http://goto/soy-param-migration
  215. * @return {!Object}
  216. */
  217. proto.spine.web.Responses.prototype.toObject = function(opt_includeInstance) {
  218. return proto.spine.web.Responses.toObject(opt_includeInstance, this);
  219. };
  220. /**
  221. * Static version of the {@see toObject} method.
  222. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  223. * the JSPB instance for transitional soy proto support:
  224. * http://goto/soy-param-migration
  225. * @param {!proto.spine.web.Responses} msg The msg instance to transform.
  226. * @return {!Object}
  227. * @suppress {unusedLocalVariables} f is only used for nested messages
  228. */
  229. proto.spine.web.Responses.toObject = function(includeInstance, msg) {
  230. var f, obj = {
  231. responseList: jspb.Message.toObjectList(msg.getResponseList(),
  232. spine_core_response_pb.Response.toObject, includeInstance)
  233. };
  234. if (includeInstance) {
  235. obj.$jspbMessageInstance = msg;
  236. }
  237. return obj;
  238. };
  239. }
  240. /**
  241. * Deserializes binary data (in protobuf wire format).
  242. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  243. * @return {!proto.spine.web.Responses}
  244. */
  245. proto.spine.web.Responses.deserializeBinary = function(bytes) {
  246. var reader = new jspb.BinaryReader(bytes);
  247. var msg = new proto.spine.web.Responses;
  248. return proto.spine.web.Responses.deserializeBinaryFromReader(msg, reader);
  249. };
  250. /**
  251. * Deserializes binary data (in protobuf wire format) from the
  252. * given reader into the given message object.
  253. * @param {!proto.spine.web.Responses} msg The message object to deserialize into.
  254. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  255. * @return {!proto.spine.web.Responses}
  256. */
  257. proto.spine.web.Responses.deserializeBinaryFromReader = function(msg, reader) {
  258. while (reader.nextField()) {
  259. if (reader.isEndGroup()) {
  260. break;
  261. }
  262. var field = reader.getFieldNumber();
  263. switch (field) {
  264. case 1:
  265. var value = new spine_core_response_pb.Response;
  266. reader.readMessage(value,spine_core_response_pb.Response.deserializeBinaryFromReader);
  267. msg.addResponse(value);
  268. break;
  269. default:
  270. reader.skipField();
  271. break;
  272. }
  273. }
  274. return msg;
  275. };
  276. /**
  277. * Serializes the message to binary data (in protobuf wire format).
  278. * @return {!Uint8Array}
  279. */
  280. proto.spine.web.Responses.prototype.serializeBinary = function() {
  281. var writer = new jspb.BinaryWriter();
  282. proto.spine.web.Responses.serializeBinaryToWriter(this, writer);
  283. return writer.getResultBuffer();
  284. };
  285. /**
  286. * Serializes the given message to binary data (in protobuf wire
  287. * format), writing to the given BinaryWriter.
  288. * @param {!proto.spine.web.Responses} message
  289. * @param {!jspb.BinaryWriter} writer
  290. * @suppress {unusedLocalVariables} f is only used for nested messages
  291. */
  292. proto.spine.web.Responses.serializeBinaryToWriter = function(message, writer) {
  293. var f = undefined;
  294. f = message.getResponseList();
  295. if (f.length > 0) {
  296. writer.writeRepeatedMessage(
  297. 1,
  298. f,
  299. spine_core_response_pb.Response.serializeBinaryToWriter
  300. );
  301. }
  302. };
  303. /**
  304. * repeated spine.core.Response response = 1;
  305. * @return {!Array<!proto.spine.core.Response>}
  306. */
  307. proto.spine.web.Responses.prototype.getResponseList = function() {
  308. return /** @type{!Array<!proto.spine.core.Response>} */ (
  309. jspb.Message.getRepeatedWrapperField(this, spine_core_response_pb.Response, 1));
  310. };
  311. /**
  312. * @param {!Array<!proto.spine.core.Response>} value
  313. * @return {!proto.spine.web.Responses} returns this
  314. */
  315. proto.spine.web.Responses.prototype.setResponseList = function(value) {
  316. return jspb.Message.setRepeatedWrapperField(this, 1, value);
  317. };
  318. /**
  319. * @param {!proto.spine.core.Response=} opt_value
  320. * @param {number=} opt_index
  321. * @return {!proto.spine.core.Response}
  322. */
  323. proto.spine.web.Responses.prototype.addResponse = function(opt_value, opt_index) {
  324. return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.spine.core.Response, opt_index);
  325. };
  326. /**
  327. * Clears the list making it empty but non-null.
  328. * @return {!proto.spine.web.Responses} returns this
  329. */
  330. proto.spine.web.Responses.prototype.clearResponseList = function() {
  331. return this.setResponseList([]);
  332. };
  333. goog.object.extend(exports, proto.spine.web);
  334. // Generated by Spine ProtoJs Plugin
  335. let ObjectParser = require('../../../client/parser/object-parser.js').default;
  336. let TypeParsers = require('../../../client/parser/type-parsers.js').default;
  337. proto.spine.web.Responses.Parser = function() {
  338. ObjectParser.call(this);
  339. };
  340. proto.spine.web.Responses.Parser.prototype = Object.create(ObjectParser.prototype);
  341. proto.spine.web.Responses.Parser.prototype.constructor = proto.spine.web.Responses.Parser;
  342. proto.spine.web.Responses.Parser.prototype.fromObject = function(obj) {
  343. if (obj === null) {
  344. return null;
  345. }
  346. let msg = new proto.spine.web.Responses();
  347. if (obj.response !== undefined && obj.response !== null) {
  348. obj.response.forEach(
  349. (listItem, index, array) => {
  350. if (listItem === null) {
  351. msg.addResponse(null);
  352. } else {
  353. let value = TypeParsers.parserFor('type.spine.io/spine.core.Response').fromObject(listItem);
  354. msg.addResponse(value);
  355. }
  356. }
  357. );
  358. }
  359. return msg;
  360. };
  361. proto.spine.web.Subscriptions.Parser = function() {
  362. ObjectParser.call(this);
  363. };
  364. proto.spine.web.Subscriptions.Parser.prototype = Object.create(ObjectParser.prototype);
  365. proto.spine.web.Subscriptions.Parser.prototype.constructor = proto.spine.web.Subscriptions.Parser;
  366. proto.spine.web.Subscriptions.Parser.prototype.fromObject = function(obj) {
  367. if (obj === null) {
  368. return null;
  369. }
  370. let msg = new proto.spine.web.Subscriptions();
  371. if (obj.subscription !== undefined && obj.subscription !== null) {
  372. obj.subscription.forEach(
  373. (listItem, index, array) => {
  374. if (listItem === null) {
  375. msg.addSubscription(null);
  376. } else {
  377. let value = TypeParsers.parserFor('type.spine.io/spine.client.Subscription').fromObject(listItem);
  378. msg.addSubscription(value);
  379. }
  380. }
  381. );
  382. }
  383. return msg;
  384. };
  385. // Generated by Spine ProtoJs Plugin
  386. proto.spine.web.Responses.typeUrl = function() {
  387. return 'type.spine.io/spine.web.Responses';
  388. };
  389. // Generated by Spine ProtoJs Plugin
  390. proto.spine.web.Subscriptions.typeUrl = function() {
  391. return 'type.spine.io/spine.web.Subscriptions';
  392. };