Channel_pb.js 17 KB

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