Channel_pb.js 16 KB

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