Series_pb.js 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588
  1. /**
  2. * @fileoverview
  3. * @enhanceable
  4. * @suppress {messageConventions} JS Compiler reports an error if a variable or
  5. * field starts with 'MSG_' and isn't a translatable message.
  6. * @public
  7. */
  8. // GENERATED CODE -- DO NOT EDIT!
  9. var jspb = require('google-protobuf');
  10. var goog = jspb;
  11. var global = Function('return this')();
  12. goog.exportSymbol('proto.SeasonMetadata', null, global);
  13. goog.exportSymbol('proto.SeriesMetadata', null, global);
  14. /**
  15. * Generated by JsPbCodeGenerator.
  16. * @param {Array=} opt_data Optional initial data array, typically from a
  17. * server response, or constructed directly in Javascript. The array is used
  18. * in place and becomes part of the constructed object. It is not cloned.
  19. * If no data is provided, the constructed object will be empty, but still
  20. * valid.
  21. * @extends {jspb.Message}
  22. * @constructor
  23. */
  24. proto.SeriesMetadata = function(opt_data) {
  25. jspb.Message.initialize(this, opt_data, 0, -1, proto.SeriesMetadata.repeatedFields_, null);
  26. };
  27. goog.inherits(proto.SeriesMetadata, jspb.Message);
  28. if (goog.DEBUG && !COMPILED) {
  29. proto.SeriesMetadata.displayName = 'proto.SeriesMetadata';
  30. }
  31. /**
  32. * List of repeated fields within this message type.
  33. * @private {!Array<number>}
  34. * @const
  35. */
  36. proto.SeriesMetadata.repeatedFields_ = [4];
  37. if (jspb.Message.GENERATE_TO_OBJECT) {
  38. /**
  39. * Creates an object representation of this proto suitable for use in Soy templates.
  40. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  41. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  42. * For the list of reserved names please see:
  43. * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
  44. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
  45. * for transitional soy proto support: http://goto/soy-param-migration
  46. * @return {!Object}
  47. */
  48. proto.SeriesMetadata.prototype.toObject = function(opt_includeInstance) {
  49. return proto.SeriesMetadata.toObject(opt_includeInstance, this);
  50. };
  51. /**
  52. * Static version of the {@see toObject} method.
  53. * @param {boolean|undefined} includeInstance Whether to include the JSPB
  54. * instance for transitional soy proto support:
  55. * http://goto/soy-param-migration
  56. * @param {!proto.SeriesMetadata} msg The msg instance to transform.
  57. * @return {!Object}
  58. * @suppress {unusedLocalVariables} f is only used for nested messages
  59. */
  60. proto.SeriesMetadata.toObject = function(includeInstance, msg) {
  61. var f, obj = {
  62. title: jspb.Message.getField(msg, 1),
  63. description: jspb.Message.getField(msg, 2),
  64. coverPhoto: jspb.Message.getField(msg, 3),
  65. personsList: jspb.Message.getRepeatedField(msg, 4)
  66. };
  67. if (includeInstance) {
  68. obj.$jspbMessageInstance = msg;
  69. }
  70. return obj;
  71. };
  72. }
  73. /**
  74. * Deserializes binary data (in protobuf wire format).
  75. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  76. * @return {!proto.SeriesMetadata}
  77. */
  78. proto.SeriesMetadata.deserializeBinary = function(bytes) {
  79. var reader = new jspb.BinaryReader(bytes);
  80. var msg = new proto.SeriesMetadata;
  81. return proto.SeriesMetadata.deserializeBinaryFromReader(msg, reader);
  82. };
  83. /**
  84. * Deserializes binary data (in protobuf wire format) from the
  85. * given reader into the given message object.
  86. * @param {!proto.SeriesMetadata} msg The message object to deserialize into.
  87. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  88. * @return {!proto.SeriesMetadata}
  89. */
  90. proto.SeriesMetadata.deserializeBinaryFromReader = function(msg, reader) {
  91. while (reader.nextField()) {
  92. if (reader.isEndGroup()) {
  93. break;
  94. }
  95. var field = reader.getFieldNumber();
  96. switch (field) {
  97. case 1:
  98. var value = /** @type {string} */ (reader.readString());
  99. msg.setTitle(value);
  100. break;
  101. case 2:
  102. var value = /** @type {string} */ (reader.readString());
  103. msg.setDescription(value);
  104. break;
  105. case 3:
  106. var value = /** @type {number} */ (reader.readUint32());
  107. msg.setCoverPhoto(value);
  108. break;
  109. case 4:
  110. var value = /** @type {!Array<number>} */ (reader.readPackedUint64());
  111. msg.setPersonsList(value);
  112. break;
  113. default:
  114. reader.skipField();
  115. break;
  116. }
  117. }
  118. return msg;
  119. };
  120. /**
  121. * Serializes the message to binary data (in protobuf wire format).
  122. * @return {!Uint8Array}
  123. */
  124. proto.SeriesMetadata.prototype.serializeBinary = function() {
  125. var writer = new jspb.BinaryWriter();
  126. proto.SeriesMetadata.serializeBinaryToWriter(this, writer);
  127. return writer.getResultBuffer();
  128. };
  129. /**
  130. * Serializes the given message to binary data (in protobuf wire
  131. * format), writing to the given BinaryWriter.
  132. * @param {!proto.SeriesMetadata} message
  133. * @param {!jspb.BinaryWriter} writer
  134. * @suppress {unusedLocalVariables} f is only used for nested messages
  135. */
  136. proto.SeriesMetadata.serializeBinaryToWriter = function(message, writer) {
  137. var f = undefined;
  138. f = /** @type {string} */ (jspb.Message.getField(message, 1));
  139. if (f != null) {
  140. writer.writeString(
  141. 1,
  142. f
  143. );
  144. }
  145. f = /** @type {string} */ (jspb.Message.getField(message, 2));
  146. if (f != null) {
  147. writer.writeString(
  148. 2,
  149. f
  150. );
  151. }
  152. f = /** @type {number} */ (jspb.Message.getField(message, 3));
  153. if (f != null) {
  154. writer.writeUint32(
  155. 3,
  156. f
  157. );
  158. }
  159. f = message.getPersonsList();
  160. if (f.length > 0) {
  161. writer.writePackedUint64(
  162. 4,
  163. f
  164. );
  165. }
  166. };
  167. /**
  168. * optional string title = 1;
  169. * @return {string}
  170. */
  171. proto.SeriesMetadata.prototype.getTitle = function() {
  172. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
  173. };
  174. /** @param {string} value */
  175. proto.SeriesMetadata.prototype.setTitle = function(value) {
  176. jspb.Message.setField(this, 1, value);
  177. };
  178. proto.SeriesMetadata.prototype.clearTitle = function() {
  179. jspb.Message.setField(this, 1, undefined);
  180. };
  181. /**
  182. * Returns whether this field is set.
  183. * @return {!boolean}
  184. */
  185. proto.SeriesMetadata.prototype.hasTitle = function() {
  186. return jspb.Message.getField(this, 1) != null;
  187. };
  188. /**
  189. * optional string description = 2;
  190. * @return {string}
  191. */
  192. proto.SeriesMetadata.prototype.getDescription = function() {
  193. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
  194. };
  195. /** @param {string} value */
  196. proto.SeriesMetadata.prototype.setDescription = function(value) {
  197. jspb.Message.setField(this, 2, value);
  198. };
  199. proto.SeriesMetadata.prototype.clearDescription = function() {
  200. jspb.Message.setField(this, 2, undefined);
  201. };
  202. /**
  203. * Returns whether this field is set.
  204. * @return {!boolean}
  205. */
  206. proto.SeriesMetadata.prototype.hasDescription = function() {
  207. return jspb.Message.getField(this, 2) != null;
  208. };
  209. /**
  210. * optional uint32 cover_photo = 3;
  211. * @return {number}
  212. */
  213. proto.SeriesMetadata.prototype.getCoverPhoto = function() {
  214. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
  215. };
  216. /** @param {number} value */
  217. proto.SeriesMetadata.prototype.setCoverPhoto = function(value) {
  218. jspb.Message.setField(this, 3, value);
  219. };
  220. proto.SeriesMetadata.prototype.clearCoverPhoto = function() {
  221. jspb.Message.setField(this, 3, undefined);
  222. };
  223. /**
  224. * Returns whether this field is set.
  225. * @return {!boolean}
  226. */
  227. proto.SeriesMetadata.prototype.hasCoverPhoto = function() {
  228. return jspb.Message.getField(this, 3) != null;
  229. };
  230. /**
  231. * repeated uint64 persons = 4;
  232. * @return {!Array<number>}
  233. */
  234. proto.SeriesMetadata.prototype.getPersonsList = function() {
  235. return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 4));
  236. };
  237. /** @param {!Array<number>} value */
  238. proto.SeriesMetadata.prototype.setPersonsList = function(value) {
  239. jspb.Message.setField(this, 4, value || []);
  240. };
  241. /**
  242. * @param {!number} value
  243. * @param {number=} opt_index
  244. */
  245. proto.SeriesMetadata.prototype.addPersons = function(value, opt_index) {
  246. jspb.Message.addToRepeatedField(this, 4, value, opt_index);
  247. };
  248. proto.SeriesMetadata.prototype.clearPersonsList = function() {
  249. this.setPersonsList([]);
  250. };
  251. /**
  252. * Generated by JsPbCodeGenerator.
  253. * @param {Array=} opt_data Optional initial data array, typically from a
  254. * server response, or constructed directly in Javascript. The array is used
  255. * in place and becomes part of the constructed object. It is not cloned.
  256. * If no data is provided, the constructed object will be empty, but still
  257. * valid.
  258. * @extends {jspb.Message}
  259. * @constructor
  260. */
  261. proto.SeasonMetadata = function(opt_data) {
  262. jspb.Message.initialize(this, opt_data, 0, -1, proto.SeasonMetadata.repeatedFields_, null);
  263. };
  264. goog.inherits(proto.SeasonMetadata, jspb.Message);
  265. if (goog.DEBUG && !COMPILED) {
  266. proto.SeasonMetadata.displayName = 'proto.SeasonMetadata';
  267. }
  268. /**
  269. * List of repeated fields within this message type.
  270. * @private {!Array<number>}
  271. * @const
  272. */
  273. proto.SeasonMetadata.repeatedFields_ = [4];
  274. if (jspb.Message.GENERATE_TO_OBJECT) {
  275. /**
  276. * Creates an object representation of this proto suitable for use in Soy templates.
  277. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  278. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  279. * For the list of reserved names please see:
  280. * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
  281. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
  282. * for transitional soy proto support: http://goto/soy-param-migration
  283. * @return {!Object}
  284. */
  285. proto.SeasonMetadata.prototype.toObject = function(opt_includeInstance) {
  286. return proto.SeasonMetadata.toObject(opt_includeInstance, this);
  287. };
  288. /**
  289. * Static version of the {@see toObject} method.
  290. * @param {boolean|undefined} includeInstance Whether to include the JSPB
  291. * instance for transitional soy proto support:
  292. * http://goto/soy-param-migration
  293. * @param {!proto.SeasonMetadata} msg The msg instance to transform.
  294. * @return {!Object}
  295. * @suppress {unusedLocalVariables} f is only used for nested messages
  296. */
  297. proto.SeasonMetadata.toObject = function(includeInstance, msg) {
  298. var f, obj = {
  299. title: jspb.Message.getField(msg, 1),
  300. description: jspb.Message.getField(msg, 2),
  301. coverPhoto: jspb.Message.getField(msg, 3),
  302. personsList: jspb.Message.getRepeatedField(msg, 4)
  303. };
  304. if (includeInstance) {
  305. obj.$jspbMessageInstance = msg;
  306. }
  307. return obj;
  308. };
  309. }
  310. /**
  311. * Deserializes binary data (in protobuf wire format).
  312. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  313. * @return {!proto.SeasonMetadata}
  314. */
  315. proto.SeasonMetadata.deserializeBinary = function(bytes) {
  316. var reader = new jspb.BinaryReader(bytes);
  317. var msg = new proto.SeasonMetadata;
  318. return proto.SeasonMetadata.deserializeBinaryFromReader(msg, reader);
  319. };
  320. /**
  321. * Deserializes binary data (in protobuf wire format) from the
  322. * given reader into the given message object.
  323. * @param {!proto.SeasonMetadata} msg The message object to deserialize into.
  324. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  325. * @return {!proto.SeasonMetadata}
  326. */
  327. proto.SeasonMetadata.deserializeBinaryFromReader = function(msg, reader) {
  328. while (reader.nextField()) {
  329. if (reader.isEndGroup()) {
  330. break;
  331. }
  332. var field = reader.getFieldNumber();
  333. switch (field) {
  334. case 1:
  335. var value = /** @type {string} */ (reader.readString());
  336. msg.setTitle(value);
  337. break;
  338. case 2:
  339. var value = /** @type {string} */ (reader.readString());
  340. msg.setDescription(value);
  341. break;
  342. case 3:
  343. var value = /** @type {number} */ (reader.readUint32());
  344. msg.setCoverPhoto(value);
  345. break;
  346. case 4:
  347. var value = /** @type {!Array<number>} */ (reader.readPackedUint64());
  348. msg.setPersonsList(value);
  349. break;
  350. default:
  351. reader.skipField();
  352. break;
  353. }
  354. }
  355. return msg;
  356. };
  357. /**
  358. * Serializes the message to binary data (in protobuf wire format).
  359. * @return {!Uint8Array}
  360. */
  361. proto.SeasonMetadata.prototype.serializeBinary = function() {
  362. var writer = new jspb.BinaryWriter();
  363. proto.SeasonMetadata.serializeBinaryToWriter(this, writer);
  364. return writer.getResultBuffer();
  365. };
  366. /**
  367. * Serializes the given message to binary data (in protobuf wire
  368. * format), writing to the given BinaryWriter.
  369. * @param {!proto.SeasonMetadata} message
  370. * @param {!jspb.BinaryWriter} writer
  371. * @suppress {unusedLocalVariables} f is only used for nested messages
  372. */
  373. proto.SeasonMetadata.serializeBinaryToWriter = function(message, writer) {
  374. var f = undefined;
  375. f = /** @type {string} */ (jspb.Message.getField(message, 1));
  376. if (f != null) {
  377. writer.writeString(
  378. 1,
  379. f
  380. );
  381. }
  382. f = /** @type {string} */ (jspb.Message.getField(message, 2));
  383. if (f != null) {
  384. writer.writeString(
  385. 2,
  386. f
  387. );
  388. }
  389. f = /** @type {number} */ (jspb.Message.getField(message, 3));
  390. if (f != null) {
  391. writer.writeUint32(
  392. 3,
  393. f
  394. );
  395. }
  396. f = message.getPersonsList();
  397. if (f.length > 0) {
  398. writer.writePackedUint64(
  399. 4,
  400. f
  401. );
  402. }
  403. };
  404. /**
  405. * optional string title = 1;
  406. * @return {string}
  407. */
  408. proto.SeasonMetadata.prototype.getTitle = function() {
  409. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
  410. };
  411. /** @param {string} value */
  412. proto.SeasonMetadata.prototype.setTitle = function(value) {
  413. jspb.Message.setField(this, 1, value);
  414. };
  415. proto.SeasonMetadata.prototype.clearTitle = function() {
  416. jspb.Message.setField(this, 1, undefined);
  417. };
  418. /**
  419. * Returns whether this field is set.
  420. * @return {!boolean}
  421. */
  422. proto.SeasonMetadata.prototype.hasTitle = function() {
  423. return jspb.Message.getField(this, 1) != null;
  424. };
  425. /**
  426. * optional string description = 2;
  427. * @return {string}
  428. */
  429. proto.SeasonMetadata.prototype.getDescription = function() {
  430. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
  431. };
  432. /** @param {string} value */
  433. proto.SeasonMetadata.prototype.setDescription = function(value) {
  434. jspb.Message.setField(this, 2, value);
  435. };
  436. proto.SeasonMetadata.prototype.clearDescription = function() {
  437. jspb.Message.setField(this, 2, undefined);
  438. };
  439. /**
  440. * Returns whether this field is set.
  441. * @return {!boolean}
  442. */
  443. proto.SeasonMetadata.prototype.hasDescription = function() {
  444. return jspb.Message.getField(this, 2) != null;
  445. };
  446. /**
  447. * optional uint32 cover_photo = 3;
  448. * @return {number}
  449. */
  450. proto.SeasonMetadata.prototype.getCoverPhoto = function() {
  451. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
  452. };
  453. /** @param {number} value */
  454. proto.SeasonMetadata.prototype.setCoverPhoto = function(value) {
  455. jspb.Message.setField(this, 3, value);
  456. };
  457. proto.SeasonMetadata.prototype.clearCoverPhoto = function() {
  458. jspb.Message.setField(this, 3, undefined);
  459. };
  460. /**
  461. * Returns whether this field is set.
  462. * @return {!boolean}
  463. */
  464. proto.SeasonMetadata.prototype.hasCoverPhoto = function() {
  465. return jspb.Message.getField(this, 3) != null;
  466. };
  467. /**
  468. * repeated uint64 persons = 4;
  469. * @return {!Array<number>}
  470. */
  471. proto.SeasonMetadata.prototype.getPersonsList = function() {
  472. return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 4));
  473. };
  474. /** @param {!Array<number>} value */
  475. proto.SeasonMetadata.prototype.setPersonsList = function(value) {
  476. jspb.Message.setField(this, 4, value || []);
  477. };
  478. /**
  479. * @param {!number} value
  480. * @param {number=} opt_index
  481. */
  482. proto.SeasonMetadata.prototype.addPersons = function(value, opt_index) {
  483. jspb.Message.addToRepeatedField(this, 4, value, opt_index);
  484. };
  485. proto.SeasonMetadata.prototype.clearPersonsList = function() {
  486. this.setPersonsList([]);
  487. };
  488. goog.object.extend(exports, proto);