Channel_pb.js 15 KB

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