Video_pb.js 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740
  1. // source: proto/Video.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.License', null, global);
  16. goog.exportSymbol('proto.MediaType', null, global);
  17. goog.exportSymbol('proto.PublishedBeforeJoystream', null, global);
  18. goog.exportSymbol('proto.VideoCategoryMetadata', null, global);
  19. goog.exportSymbol('proto.VideoMetadata', null, global);
  20. /**
  21. * Generated by JsPbCodeGenerator.
  22. * @param {Array=} opt_data Optional initial data array, typically from a
  23. * server response, or constructed directly in Javascript. The array is used
  24. * in place and becomes part of the constructed object. It is not cloned.
  25. * If no data is provided, the constructed object will be empty, but still
  26. * valid.
  27. * @extends {jspb.Message}
  28. * @constructor
  29. */
  30. proto.PublishedBeforeJoystream = function(opt_data) {
  31. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  32. };
  33. goog.inherits(proto.PublishedBeforeJoystream, jspb.Message);
  34. if (goog.DEBUG && !COMPILED) {
  35. /**
  36. * @public
  37. * @override
  38. */
  39. proto.PublishedBeforeJoystream.displayName = 'proto.PublishedBeforeJoystream';
  40. }
  41. /**
  42. * Generated by JsPbCodeGenerator.
  43. * @param {Array=} opt_data Optional initial data array, typically from a
  44. * server response, or constructed directly in Javascript. The array is used
  45. * in place and becomes part of the constructed object. It is not cloned.
  46. * If no data is provided, the constructed object will be empty, but still
  47. * valid.
  48. * @extends {jspb.Message}
  49. * @constructor
  50. */
  51. proto.License = function(opt_data) {
  52. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  53. };
  54. goog.inherits(proto.License, jspb.Message);
  55. if (goog.DEBUG && !COMPILED) {
  56. /**
  57. * @public
  58. * @override
  59. */
  60. proto.License.displayName = 'proto.License';
  61. }
  62. /**
  63. * Generated by JsPbCodeGenerator.
  64. * @param {Array=} opt_data Optional initial data array, typically from a
  65. * server response, or constructed directly in Javascript. The array is used
  66. * in place and becomes part of the constructed object. It is not cloned.
  67. * If no data is provided, the constructed object will be empty, but still
  68. * valid.
  69. * @extends {jspb.Message}
  70. * @constructor
  71. */
  72. proto.MediaType = function(opt_data) {
  73. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  74. };
  75. goog.inherits(proto.MediaType, jspb.Message);
  76. if (goog.DEBUG && !COMPILED) {
  77. /**
  78. * @public
  79. * @override
  80. */
  81. proto.MediaType.displayName = 'proto.MediaType';
  82. }
  83. /**
  84. * Generated by JsPbCodeGenerator.
  85. * @param {Array=} opt_data Optional initial data array, typically from a
  86. * server response, or constructed directly in Javascript. The array is used
  87. * in place and becomes part of the constructed object. It is not cloned.
  88. * If no data is provided, the constructed object will be empty, but still
  89. * valid.
  90. * @extends {jspb.Message}
  91. * @constructor
  92. */
  93. proto.VideoMetadata = function(opt_data) {
  94. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  95. };
  96. goog.inherits(proto.VideoMetadata, jspb.Message);
  97. if (goog.DEBUG && !COMPILED) {
  98. /**
  99. * @public
  100. * @override
  101. */
  102. proto.VideoMetadata.displayName = 'proto.VideoMetadata';
  103. }
  104. /**
  105. * Generated by JsPbCodeGenerator.
  106. * @param {Array=} opt_data Optional initial data array, typically from a
  107. * server response, or constructed directly in Javascript. The array is used
  108. * in place and becomes part of the constructed object. It is not cloned.
  109. * If no data is provided, the constructed object will be empty, but still
  110. * valid.
  111. * @extends {jspb.Message}
  112. * @constructor
  113. */
  114. proto.VideoCategoryMetadata = function(opt_data) {
  115. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  116. };
  117. goog.inherits(proto.VideoCategoryMetadata, jspb.Message);
  118. if (goog.DEBUG && !COMPILED) {
  119. /**
  120. * @public
  121. * @override
  122. */
  123. proto.VideoCategoryMetadata.displayName = 'proto.VideoCategoryMetadata';
  124. }
  125. if (jspb.Message.GENERATE_TO_OBJECT) {
  126. /**
  127. * Creates an object representation of this proto.
  128. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  129. * Optional fields that are not set will be set to undefined.
  130. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  131. * For the list of reserved names please see:
  132. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  133. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  134. * JSPB instance for transitional soy proto support:
  135. * http://goto/soy-param-migration
  136. * @return {!Object}
  137. */
  138. proto.PublishedBeforeJoystream.prototype.toObject = function(opt_includeInstance) {
  139. return proto.PublishedBeforeJoystream.toObject(opt_includeInstance, this);
  140. };
  141. /**
  142. * Static version of the {@see toObject} method.
  143. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  144. * the JSPB instance for transitional soy proto support:
  145. * http://goto/soy-param-migration
  146. * @param {!proto.PublishedBeforeJoystream} msg The msg instance to transform.
  147. * @return {!Object}
  148. * @suppress {unusedLocalVariables} f is only used for nested messages
  149. */
  150. proto.PublishedBeforeJoystream.toObject = function(includeInstance, msg) {
  151. var f, obj = {
  152. isPublished: (f = jspb.Message.getBooleanField(msg, 1)) == null ? undefined : f,
  153. date: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f
  154. };
  155. if (includeInstance) {
  156. obj.$jspbMessageInstance = msg;
  157. }
  158. return obj;
  159. };
  160. }
  161. /**
  162. * Deserializes binary data (in protobuf wire format).
  163. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  164. * @return {!proto.PublishedBeforeJoystream}
  165. */
  166. proto.PublishedBeforeJoystream.deserializeBinary = function(bytes) {
  167. var reader = new jspb.BinaryReader(bytes);
  168. var msg = new proto.PublishedBeforeJoystream;
  169. return proto.PublishedBeforeJoystream.deserializeBinaryFromReader(msg, reader);
  170. };
  171. /**
  172. * Deserializes binary data (in protobuf wire format) from the
  173. * given reader into the given message object.
  174. * @param {!proto.PublishedBeforeJoystream} msg The message object to deserialize into.
  175. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  176. * @return {!proto.PublishedBeforeJoystream}
  177. */
  178. proto.PublishedBeforeJoystream.deserializeBinaryFromReader = function(msg, reader) {
  179. while (reader.nextField()) {
  180. if (reader.isEndGroup()) {
  181. break;
  182. }
  183. var field = reader.getFieldNumber();
  184. switch (field) {
  185. case 1:
  186. var value = /** @type {boolean} */ (reader.readBool());
  187. msg.setIsPublished(value);
  188. break;
  189. case 2:
  190. var value = /** @type {string} */ (reader.readString());
  191. msg.setDate(value);
  192. break;
  193. default:
  194. reader.skipField();
  195. break;
  196. }
  197. }
  198. return msg;
  199. };
  200. /**
  201. * Serializes the message to binary data (in protobuf wire format).
  202. * @return {!Uint8Array}
  203. */
  204. proto.PublishedBeforeJoystream.prototype.serializeBinary = function() {
  205. var writer = new jspb.BinaryWriter();
  206. proto.PublishedBeforeJoystream.serializeBinaryToWriter(this, writer);
  207. return writer.getResultBuffer();
  208. };
  209. /**
  210. * Serializes the given message to binary data (in protobuf wire
  211. * format), writing to the given BinaryWriter.
  212. * @param {!proto.PublishedBeforeJoystream} message
  213. * @param {!jspb.BinaryWriter} writer
  214. * @suppress {unusedLocalVariables} f is only used for nested messages
  215. */
  216. proto.PublishedBeforeJoystream.serializeBinaryToWriter = function(message, writer) {
  217. var f = undefined;
  218. f = /** @type {boolean} */ (jspb.Message.getField(message, 1));
  219. if (f != null) {
  220. writer.writeBool(
  221. 1,
  222. f
  223. );
  224. }
  225. f = /** @type {string} */ (jspb.Message.getField(message, 2));
  226. if (f != null) {
  227. writer.writeString(
  228. 2,
  229. f
  230. );
  231. }
  232. };
  233. /**
  234. * optional bool is_published = 1;
  235. * @return {boolean}
  236. */
  237. proto.PublishedBeforeJoystream.prototype.getIsPublished = function() {
  238. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));
  239. };
  240. /**
  241. * @param {boolean} value
  242. * @return {!proto.PublishedBeforeJoystream} returns this
  243. */
  244. proto.PublishedBeforeJoystream.prototype.setIsPublished = function(value) {
  245. return jspb.Message.setField(this, 1, value);
  246. };
  247. /**
  248. * Clears the field making it undefined.
  249. * @return {!proto.PublishedBeforeJoystream} returns this
  250. */
  251. proto.PublishedBeforeJoystream.prototype.clearIsPublished = function() {
  252. return jspb.Message.setField(this, 1, undefined);
  253. };
  254. /**
  255. * Returns whether this field is set.
  256. * @return {boolean}
  257. */
  258. proto.PublishedBeforeJoystream.prototype.hasIsPublished = function() {
  259. return jspb.Message.getField(this, 1) != null;
  260. };
  261. /**
  262. * optional string date = 2;
  263. * @return {string}
  264. */
  265. proto.PublishedBeforeJoystream.prototype.getDate = function() {
  266. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
  267. };
  268. /**
  269. * @param {string} value
  270. * @return {!proto.PublishedBeforeJoystream} returns this
  271. */
  272. proto.PublishedBeforeJoystream.prototype.setDate = function(value) {
  273. return jspb.Message.setField(this, 2, value);
  274. };
  275. /**
  276. * Clears the field making it undefined.
  277. * @return {!proto.PublishedBeforeJoystream} returns this
  278. */
  279. proto.PublishedBeforeJoystream.prototype.clearDate = function() {
  280. return jspb.Message.setField(this, 2, undefined);
  281. };
  282. /**
  283. * Returns whether this field is set.
  284. * @return {boolean}
  285. */
  286. proto.PublishedBeforeJoystream.prototype.hasDate = function() {
  287. return jspb.Message.getField(this, 2) != null;
  288. };
  289. if (jspb.Message.GENERATE_TO_OBJECT) {
  290. /**
  291. * Creates an object representation of this proto.
  292. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  293. * Optional fields that are not set will be set to undefined.
  294. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  295. * For the list of reserved names please see:
  296. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  297. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  298. * JSPB instance for transitional soy proto support:
  299. * http://goto/soy-param-migration
  300. * @return {!Object}
  301. */
  302. proto.License.prototype.toObject = function(opt_includeInstance) {
  303. return proto.License.toObject(opt_includeInstance, this);
  304. };
  305. /**
  306. * Static version of the {@see toObject} method.
  307. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  308. * the JSPB instance for transitional soy proto support:
  309. * http://goto/soy-param-migration
  310. * @param {!proto.License} msg The msg instance to transform.
  311. * @return {!Object}
  312. * @suppress {unusedLocalVariables} f is only used for nested messages
  313. */
  314. proto.License.toObject = function(includeInstance, msg) {
  315. var f, obj = {
  316. code: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f,
  317. attribution: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f,
  318. customText: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f
  319. };
  320. if (includeInstance) {
  321. obj.$jspbMessageInstance = msg;
  322. }
  323. return obj;
  324. };
  325. }
  326. /**
  327. * Deserializes binary data (in protobuf wire format).
  328. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  329. * @return {!proto.License}
  330. */
  331. proto.License.deserializeBinary = function(bytes) {
  332. var reader = new jspb.BinaryReader(bytes);
  333. var msg = new proto.License;
  334. return proto.License.deserializeBinaryFromReader(msg, reader);
  335. };
  336. /**
  337. * Deserializes binary data (in protobuf wire format) from the
  338. * given reader into the given message object.
  339. * @param {!proto.License} msg The message object to deserialize into.
  340. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  341. * @return {!proto.License}
  342. */
  343. proto.License.deserializeBinaryFromReader = function(msg, reader) {
  344. while (reader.nextField()) {
  345. if (reader.isEndGroup()) {
  346. break;
  347. }
  348. var field = reader.getFieldNumber();
  349. switch (field) {
  350. case 1:
  351. var value = /** @type {number} */ (reader.readUint32());
  352. msg.setCode(value);
  353. break;
  354. case 2:
  355. var value = /** @type {string} */ (reader.readString());
  356. msg.setAttribution(value);
  357. break;
  358. case 3:
  359. var value = /** @type {string} */ (reader.readString());
  360. msg.setCustomText(value);
  361. break;
  362. default:
  363. reader.skipField();
  364. break;
  365. }
  366. }
  367. return msg;
  368. };
  369. /**
  370. * Serializes the message to binary data (in protobuf wire format).
  371. * @return {!Uint8Array}
  372. */
  373. proto.License.prototype.serializeBinary = function() {
  374. var writer = new jspb.BinaryWriter();
  375. proto.License.serializeBinaryToWriter(this, writer);
  376. return writer.getResultBuffer();
  377. };
  378. /**
  379. * Serializes the given message to binary data (in protobuf wire
  380. * format), writing to the given BinaryWriter.
  381. * @param {!proto.License} message
  382. * @param {!jspb.BinaryWriter} writer
  383. * @suppress {unusedLocalVariables} f is only used for nested messages
  384. */
  385. proto.License.serializeBinaryToWriter = function(message, writer) {
  386. var f = undefined;
  387. f = /** @type {number} */ (jspb.Message.getField(message, 1));
  388. if (f != null) {
  389. writer.writeUint32(
  390. 1,
  391. f
  392. );
  393. }
  394. f = /** @type {string} */ (jspb.Message.getField(message, 2));
  395. if (f != null) {
  396. writer.writeString(
  397. 2,
  398. f
  399. );
  400. }
  401. f = /** @type {string} */ (jspb.Message.getField(message, 3));
  402. if (f != null) {
  403. writer.writeString(
  404. 3,
  405. f
  406. );
  407. }
  408. };
  409. /**
  410. * optional uint32 code = 1;
  411. * @return {number}
  412. */
  413. proto.License.prototype.getCode = function() {
  414. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
  415. };
  416. /**
  417. * @param {number} value
  418. * @return {!proto.License} returns this
  419. */
  420. proto.License.prototype.setCode = function(value) {
  421. return jspb.Message.setField(this, 1, value);
  422. };
  423. /**
  424. * Clears the field making it undefined.
  425. * @return {!proto.License} returns this
  426. */
  427. proto.License.prototype.clearCode = function() {
  428. return jspb.Message.setField(this, 1, undefined);
  429. };
  430. /**
  431. * Returns whether this field is set.
  432. * @return {boolean}
  433. */
  434. proto.License.prototype.hasCode = function() {
  435. return jspb.Message.getField(this, 1) != null;
  436. };
  437. /**
  438. * optional string attribution = 2;
  439. * @return {string}
  440. */
  441. proto.License.prototype.getAttribution = function() {
  442. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
  443. };
  444. /**
  445. * @param {string} value
  446. * @return {!proto.License} returns this
  447. */
  448. proto.License.prototype.setAttribution = function(value) {
  449. return jspb.Message.setField(this, 2, value);
  450. };
  451. /**
  452. * Clears the field making it undefined.
  453. * @return {!proto.License} returns this
  454. */
  455. proto.License.prototype.clearAttribution = function() {
  456. return jspb.Message.setField(this, 2, undefined);
  457. };
  458. /**
  459. * Returns whether this field is set.
  460. * @return {boolean}
  461. */
  462. proto.License.prototype.hasAttribution = function() {
  463. return jspb.Message.getField(this, 2) != null;
  464. };
  465. /**
  466. * optional string custom_text = 3;
  467. * @return {string}
  468. */
  469. proto.License.prototype.getCustomText = function() {
  470. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
  471. };
  472. /**
  473. * @param {string} value
  474. * @return {!proto.License} returns this
  475. */
  476. proto.License.prototype.setCustomText = function(value) {
  477. return jspb.Message.setField(this, 3, value);
  478. };
  479. /**
  480. * Clears the field making it undefined.
  481. * @return {!proto.License} returns this
  482. */
  483. proto.License.prototype.clearCustomText = function() {
  484. return jspb.Message.setField(this, 3, undefined);
  485. };
  486. /**
  487. * Returns whether this field is set.
  488. * @return {boolean}
  489. */
  490. proto.License.prototype.hasCustomText = function() {
  491. return jspb.Message.getField(this, 3) != null;
  492. };
  493. if (jspb.Message.GENERATE_TO_OBJECT) {
  494. /**
  495. * Creates an object representation of this proto.
  496. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  497. * Optional fields that are not set will be set to undefined.
  498. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  499. * For the list of reserved names please see:
  500. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  501. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  502. * JSPB instance for transitional soy proto support:
  503. * http://goto/soy-param-migration
  504. * @return {!Object}
  505. */
  506. proto.MediaType.prototype.toObject = function(opt_includeInstance) {
  507. return proto.MediaType.toObject(opt_includeInstance, this);
  508. };
  509. /**
  510. * Static version of the {@see toObject} method.
  511. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  512. * the JSPB instance for transitional soy proto support:
  513. * http://goto/soy-param-migration
  514. * @param {!proto.MediaType} msg The msg instance to transform.
  515. * @return {!Object}
  516. * @suppress {unusedLocalVariables} f is only used for nested messages
  517. */
  518. proto.MediaType.toObject = function(includeInstance, msg) {
  519. var f, obj = {
  520. codecName: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f,
  521. container: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f,
  522. mimeMediaType: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f
  523. };
  524. if (includeInstance) {
  525. obj.$jspbMessageInstance = msg;
  526. }
  527. return obj;
  528. };
  529. }
  530. /**
  531. * Deserializes binary data (in protobuf wire format).
  532. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  533. * @return {!proto.MediaType}
  534. */
  535. proto.MediaType.deserializeBinary = function(bytes) {
  536. var reader = new jspb.BinaryReader(bytes);
  537. var msg = new proto.MediaType;
  538. return proto.MediaType.deserializeBinaryFromReader(msg, reader);
  539. };
  540. /**
  541. * Deserializes binary data (in protobuf wire format) from the
  542. * given reader into the given message object.
  543. * @param {!proto.MediaType} msg The message object to deserialize into.
  544. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  545. * @return {!proto.MediaType}
  546. */
  547. proto.MediaType.deserializeBinaryFromReader = function(msg, reader) {
  548. while (reader.nextField()) {
  549. if (reader.isEndGroup()) {
  550. break;
  551. }
  552. var field = reader.getFieldNumber();
  553. switch (field) {
  554. case 1:
  555. var value = /** @type {string} */ (reader.readString());
  556. msg.setCodecName(value);
  557. break;
  558. case 2:
  559. var value = /** @type {string} */ (reader.readString());
  560. msg.setContainer(value);
  561. break;
  562. case 3:
  563. var value = /** @type {string} */ (reader.readString());
  564. msg.setMimeMediaType(value);
  565. break;
  566. default:
  567. reader.skipField();
  568. break;
  569. }
  570. }
  571. return msg;
  572. };
  573. /**
  574. * Serializes the message to binary data (in protobuf wire format).
  575. * @return {!Uint8Array}
  576. */
  577. proto.MediaType.prototype.serializeBinary = function() {
  578. var writer = new jspb.BinaryWriter();
  579. proto.MediaType.serializeBinaryToWriter(this, writer);
  580. return writer.getResultBuffer();
  581. };
  582. /**
  583. * Serializes the given message to binary data (in protobuf wire
  584. * format), writing to the given BinaryWriter.
  585. * @param {!proto.MediaType} message
  586. * @param {!jspb.BinaryWriter} writer
  587. * @suppress {unusedLocalVariables} f is only used for nested messages
  588. */
  589. proto.MediaType.serializeBinaryToWriter = function(message, writer) {
  590. var f = undefined;
  591. f = /** @type {string} */ (jspb.Message.getField(message, 1));
  592. if (f != null) {
  593. writer.writeString(
  594. 1,
  595. f
  596. );
  597. }
  598. f = /** @type {string} */ (jspb.Message.getField(message, 2));
  599. if (f != null) {
  600. writer.writeString(
  601. 2,
  602. f
  603. );
  604. }
  605. f = /** @type {string} */ (jspb.Message.getField(message, 3));
  606. if (f != null) {
  607. writer.writeString(
  608. 3,
  609. f
  610. );
  611. }
  612. };
  613. /**
  614. * optional string codec_name = 1;
  615. * @return {string}
  616. */
  617. proto.MediaType.prototype.getCodecName = function() {
  618. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
  619. };
  620. /**
  621. * @param {string} value
  622. * @return {!proto.MediaType} returns this
  623. */
  624. proto.MediaType.prototype.setCodecName = function(value) {
  625. return jspb.Message.setField(this, 1, value);
  626. };
  627. /**
  628. * Clears the field making it undefined.
  629. * @return {!proto.MediaType} returns this
  630. */
  631. proto.MediaType.prototype.clearCodecName = function() {
  632. return jspb.Message.setField(this, 1, undefined);
  633. };
  634. /**
  635. * Returns whether this field is set.
  636. * @return {boolean}
  637. */
  638. proto.MediaType.prototype.hasCodecName = function() {
  639. return jspb.Message.getField(this, 1) != null;
  640. };
  641. /**
  642. * optional string container = 2;
  643. * @return {string}
  644. */
  645. proto.MediaType.prototype.getContainer = function() {
  646. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
  647. };
  648. /**
  649. * @param {string} value
  650. * @return {!proto.MediaType} returns this
  651. */
  652. proto.MediaType.prototype.setContainer = function(value) {
  653. return jspb.Message.setField(this, 2, value);
  654. };
  655. /**
  656. * Clears the field making it undefined.
  657. * @return {!proto.MediaType} returns this
  658. */
  659. proto.MediaType.prototype.clearContainer = function() {
  660. return jspb.Message.setField(this, 2, undefined);
  661. };
  662. /**
  663. * Returns whether this field is set.
  664. * @return {boolean}
  665. */
  666. proto.MediaType.prototype.hasContainer = function() {
  667. return jspb.Message.getField(this, 2) != null;
  668. };
  669. /**
  670. * optional string mime_media_type = 3;
  671. * @return {string}
  672. */
  673. proto.MediaType.prototype.getMimeMediaType = function() {
  674. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
  675. };
  676. /**
  677. * @param {string} value
  678. * @return {!proto.MediaType} returns this
  679. */
  680. proto.MediaType.prototype.setMimeMediaType = function(value) {
  681. return jspb.Message.setField(this, 3, value);
  682. };
  683. /**
  684. * Clears the field making it undefined.
  685. * @return {!proto.MediaType} returns this
  686. */
  687. proto.MediaType.prototype.clearMimeMediaType = function() {
  688. return jspb.Message.setField(this, 3, undefined);
  689. };
  690. /**
  691. * Returns whether this field is set.
  692. * @return {boolean}
  693. */
  694. proto.MediaType.prototype.hasMimeMediaType = function() {
  695. return jspb.Message.getField(this, 3) != null;
  696. };
  697. if (jspb.Message.GENERATE_TO_OBJECT) {
  698. /**
  699. * Creates an object representation of this proto.
  700. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  701. * Optional fields that are not set will be set to undefined.
  702. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  703. * For the list of reserved names please see:
  704. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  705. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  706. * JSPB instance for transitional soy proto support:
  707. * http://goto/soy-param-migration
  708. * @return {!Object}
  709. */
  710. proto.VideoMetadata.prototype.toObject = function(opt_includeInstance) {
  711. return proto.VideoMetadata.toObject(opt_includeInstance, this);
  712. };
  713. /**
  714. * Static version of the {@see toObject} method.
  715. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  716. * the JSPB instance for transitional soy proto support:
  717. * http://goto/soy-param-migration
  718. * @param {!proto.VideoMetadata} msg The msg instance to transform.
  719. * @return {!Object}
  720. * @suppress {unusedLocalVariables} f is only used for nested messages
  721. */
  722. proto.VideoMetadata.toObject = function(includeInstance, msg) {
  723. var f, obj = {
  724. title: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f,
  725. description: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f,
  726. video: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f,
  727. thumbnailPhoto: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f,
  728. duration: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f,
  729. mediaPixelHeight: (f = jspb.Message.getField(msg, 6)) == null ? undefined : f,
  730. mediaPixelWidth: (f = jspb.Message.getField(msg, 7)) == null ? undefined : f,
  731. mediaType: (f = msg.getMediaType()) && proto.MediaType.toObject(includeInstance, f),
  732. language: (f = jspb.Message.getField(msg, 9)) == null ? undefined : f,
  733. license: (f = msg.getLicense()) && proto.License.toObject(includeInstance, f),
  734. publishedBeforeJoystream: (f = msg.getPublishedBeforeJoystream()) && proto.PublishedBeforeJoystream.toObject(includeInstance, f),
  735. hasMarketing: (f = jspb.Message.getBooleanField(msg, 12)) == null ? undefined : f,
  736. isPublic: (f = jspb.Message.getBooleanField(msg, 13)) == null ? undefined : f,
  737. isExplicit: (f = jspb.Message.getBooleanField(msg, 14)) == null ? undefined : f
  738. };
  739. if (includeInstance) {
  740. obj.$jspbMessageInstance = msg;
  741. }
  742. return obj;
  743. };
  744. }
  745. /**
  746. * Deserializes binary data (in protobuf wire format).
  747. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  748. * @return {!proto.VideoMetadata}
  749. */
  750. proto.VideoMetadata.deserializeBinary = function(bytes) {
  751. var reader = new jspb.BinaryReader(bytes);
  752. var msg = new proto.VideoMetadata;
  753. return proto.VideoMetadata.deserializeBinaryFromReader(msg, reader);
  754. };
  755. /**
  756. * Deserializes binary data (in protobuf wire format) from the
  757. * given reader into the given message object.
  758. * @param {!proto.VideoMetadata} msg The message object to deserialize into.
  759. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  760. * @return {!proto.VideoMetadata}
  761. */
  762. proto.VideoMetadata.deserializeBinaryFromReader = function(msg, reader) {
  763. while (reader.nextField()) {
  764. if (reader.isEndGroup()) {
  765. break;
  766. }
  767. var field = reader.getFieldNumber();
  768. switch (field) {
  769. case 1:
  770. var value = /** @type {string} */ (reader.readString());
  771. msg.setTitle(value);
  772. break;
  773. case 2:
  774. var value = /** @type {string} */ (reader.readString());
  775. msg.setDescription(value);
  776. break;
  777. case 3:
  778. var value = /** @type {number} */ (reader.readUint32());
  779. msg.setVideo(value);
  780. break;
  781. case 4:
  782. var value = /** @type {number} */ (reader.readUint32());
  783. msg.setThumbnailPhoto(value);
  784. break;
  785. case 5:
  786. var value = /** @type {number} */ (reader.readUint32());
  787. msg.setDuration(value);
  788. break;
  789. case 6:
  790. var value = /** @type {number} */ (reader.readUint32());
  791. msg.setMediaPixelHeight(value);
  792. break;
  793. case 7:
  794. var value = /** @type {number} */ (reader.readUint32());
  795. msg.setMediaPixelWidth(value);
  796. break;
  797. case 8:
  798. var value = new proto.MediaType;
  799. reader.readMessage(value,proto.MediaType.deserializeBinaryFromReader);
  800. msg.setMediaType(value);
  801. break;
  802. case 9:
  803. var value = /** @type {string} */ (reader.readString());
  804. msg.setLanguage(value);
  805. break;
  806. case 10:
  807. var value = new proto.License;
  808. reader.readMessage(value,proto.License.deserializeBinaryFromReader);
  809. msg.setLicense(value);
  810. break;
  811. case 11:
  812. var value = new proto.PublishedBeforeJoystream;
  813. reader.readMessage(value,proto.PublishedBeforeJoystream.deserializeBinaryFromReader);
  814. msg.setPublishedBeforeJoystream(value);
  815. break;
  816. case 12:
  817. var value = /** @type {boolean} */ (reader.readBool());
  818. msg.setHasMarketing(value);
  819. break;
  820. case 13:
  821. var value = /** @type {boolean} */ (reader.readBool());
  822. msg.setIsPublic(value);
  823. break;
  824. case 14:
  825. var value = /** @type {boolean} */ (reader.readBool());
  826. msg.setIsExplicit(value);
  827. break;
  828. default:
  829. reader.skipField();
  830. break;
  831. }
  832. }
  833. return msg;
  834. };
  835. /**
  836. * Serializes the message to binary data (in protobuf wire format).
  837. * @return {!Uint8Array}
  838. */
  839. proto.VideoMetadata.prototype.serializeBinary = function() {
  840. var writer = new jspb.BinaryWriter();
  841. proto.VideoMetadata.serializeBinaryToWriter(this, writer);
  842. return writer.getResultBuffer();
  843. };
  844. /**
  845. * Serializes the given message to binary data (in protobuf wire
  846. * format), writing to the given BinaryWriter.
  847. * @param {!proto.VideoMetadata} message
  848. * @param {!jspb.BinaryWriter} writer
  849. * @suppress {unusedLocalVariables} f is only used for nested messages
  850. */
  851. proto.VideoMetadata.serializeBinaryToWriter = function(message, writer) {
  852. var f = undefined;
  853. f = /** @type {string} */ (jspb.Message.getField(message, 1));
  854. if (f != null) {
  855. writer.writeString(
  856. 1,
  857. f
  858. );
  859. }
  860. f = /** @type {string} */ (jspb.Message.getField(message, 2));
  861. if (f != null) {
  862. writer.writeString(
  863. 2,
  864. f
  865. );
  866. }
  867. f = /** @type {number} */ (jspb.Message.getField(message, 3));
  868. if (f != null) {
  869. writer.writeUint32(
  870. 3,
  871. f
  872. );
  873. }
  874. f = /** @type {number} */ (jspb.Message.getField(message, 4));
  875. if (f != null) {
  876. writer.writeUint32(
  877. 4,
  878. f
  879. );
  880. }
  881. f = /** @type {number} */ (jspb.Message.getField(message, 5));
  882. if (f != null) {
  883. writer.writeUint32(
  884. 5,
  885. f
  886. );
  887. }
  888. f = /** @type {number} */ (jspb.Message.getField(message, 6));
  889. if (f != null) {
  890. writer.writeUint32(
  891. 6,
  892. f
  893. );
  894. }
  895. f = /** @type {number} */ (jspb.Message.getField(message, 7));
  896. if (f != null) {
  897. writer.writeUint32(
  898. 7,
  899. f
  900. );
  901. }
  902. f = message.getMediaType();
  903. if (f != null) {
  904. writer.writeMessage(
  905. 8,
  906. f,
  907. proto.MediaType.serializeBinaryToWriter
  908. );
  909. }
  910. f = /** @type {string} */ (jspb.Message.getField(message, 9));
  911. if (f != null) {
  912. writer.writeString(
  913. 9,
  914. f
  915. );
  916. }
  917. f = message.getLicense();
  918. if (f != null) {
  919. writer.writeMessage(
  920. 10,
  921. f,
  922. proto.License.serializeBinaryToWriter
  923. );
  924. }
  925. f = message.getPublishedBeforeJoystream();
  926. if (f != null) {
  927. writer.writeMessage(
  928. 11,
  929. f,
  930. proto.PublishedBeforeJoystream.serializeBinaryToWriter
  931. );
  932. }
  933. f = /** @type {boolean} */ (jspb.Message.getField(message, 12));
  934. if (f != null) {
  935. writer.writeBool(
  936. 12,
  937. f
  938. );
  939. }
  940. f = /** @type {boolean} */ (jspb.Message.getField(message, 13));
  941. if (f != null) {
  942. writer.writeBool(
  943. 13,
  944. f
  945. );
  946. }
  947. f = /** @type {boolean} */ (jspb.Message.getField(message, 14));
  948. if (f != null) {
  949. writer.writeBool(
  950. 14,
  951. f
  952. );
  953. }
  954. };
  955. /**
  956. * optional string title = 1;
  957. * @return {string}
  958. */
  959. proto.VideoMetadata.prototype.getTitle = function() {
  960. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
  961. };
  962. /**
  963. * @param {string} value
  964. * @return {!proto.VideoMetadata} returns this
  965. */
  966. proto.VideoMetadata.prototype.setTitle = function(value) {
  967. return jspb.Message.setField(this, 1, value);
  968. };
  969. /**
  970. * Clears the field making it undefined.
  971. * @return {!proto.VideoMetadata} returns this
  972. */
  973. proto.VideoMetadata.prototype.clearTitle = function() {
  974. return jspb.Message.setField(this, 1, undefined);
  975. };
  976. /**
  977. * Returns whether this field is set.
  978. * @return {boolean}
  979. */
  980. proto.VideoMetadata.prototype.hasTitle = function() {
  981. return jspb.Message.getField(this, 1) != null;
  982. };
  983. /**
  984. * optional string description = 2;
  985. * @return {string}
  986. */
  987. proto.VideoMetadata.prototype.getDescription = function() {
  988. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
  989. };
  990. /**
  991. * @param {string} value
  992. * @return {!proto.VideoMetadata} returns this
  993. */
  994. proto.VideoMetadata.prototype.setDescription = function(value) {
  995. return jspb.Message.setField(this, 2, value);
  996. };
  997. /**
  998. * Clears the field making it undefined.
  999. * @return {!proto.VideoMetadata} returns this
  1000. */
  1001. proto.VideoMetadata.prototype.clearDescription = function() {
  1002. return jspb.Message.setField(this, 2, undefined);
  1003. };
  1004. /**
  1005. * Returns whether this field is set.
  1006. * @return {boolean}
  1007. */
  1008. proto.VideoMetadata.prototype.hasDescription = function() {
  1009. return jspb.Message.getField(this, 2) != null;
  1010. };
  1011. /**
  1012. * optional uint32 video = 3;
  1013. * @return {number}
  1014. */
  1015. proto.VideoMetadata.prototype.getVideo = function() {
  1016. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
  1017. };
  1018. /**
  1019. * @param {number} value
  1020. * @return {!proto.VideoMetadata} returns this
  1021. */
  1022. proto.VideoMetadata.prototype.setVideo = function(value) {
  1023. return jspb.Message.setField(this, 3, value);
  1024. };
  1025. /**
  1026. * Clears the field making it undefined.
  1027. * @return {!proto.VideoMetadata} returns this
  1028. */
  1029. proto.VideoMetadata.prototype.clearVideo = function() {
  1030. return jspb.Message.setField(this, 3, undefined);
  1031. };
  1032. /**
  1033. * Returns whether this field is set.
  1034. * @return {boolean}
  1035. */
  1036. proto.VideoMetadata.prototype.hasVideo = function() {
  1037. return jspb.Message.getField(this, 3) != null;
  1038. };
  1039. /**
  1040. * optional uint32 thumbnail_photo = 4;
  1041. * @return {number}
  1042. */
  1043. proto.VideoMetadata.prototype.getThumbnailPhoto = function() {
  1044. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
  1045. };
  1046. /**
  1047. * @param {number} value
  1048. * @return {!proto.VideoMetadata} returns this
  1049. */
  1050. proto.VideoMetadata.prototype.setThumbnailPhoto = function(value) {
  1051. return jspb.Message.setField(this, 4, value);
  1052. };
  1053. /**
  1054. * Clears the field making it undefined.
  1055. * @return {!proto.VideoMetadata} returns this
  1056. */
  1057. proto.VideoMetadata.prototype.clearThumbnailPhoto = function() {
  1058. return jspb.Message.setField(this, 4, undefined);
  1059. };
  1060. /**
  1061. * Returns whether this field is set.
  1062. * @return {boolean}
  1063. */
  1064. proto.VideoMetadata.prototype.hasThumbnailPhoto = function() {
  1065. return jspb.Message.getField(this, 4) != null;
  1066. };
  1067. /**
  1068. * optional uint32 duration = 5;
  1069. * @return {number}
  1070. */
  1071. proto.VideoMetadata.prototype.getDuration = function() {
  1072. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
  1073. };
  1074. /**
  1075. * @param {number} value
  1076. * @return {!proto.VideoMetadata} returns this
  1077. */
  1078. proto.VideoMetadata.prototype.setDuration = function(value) {
  1079. return jspb.Message.setField(this, 5, value);
  1080. };
  1081. /**
  1082. * Clears the field making it undefined.
  1083. * @return {!proto.VideoMetadata} returns this
  1084. */
  1085. proto.VideoMetadata.prototype.clearDuration = function() {
  1086. return jspb.Message.setField(this, 5, undefined);
  1087. };
  1088. /**
  1089. * Returns whether this field is set.
  1090. * @return {boolean}
  1091. */
  1092. proto.VideoMetadata.prototype.hasDuration = function() {
  1093. return jspb.Message.getField(this, 5) != null;
  1094. };
  1095. /**
  1096. * optional uint32 media_pixel_height = 6;
  1097. * @return {number}
  1098. */
  1099. proto.VideoMetadata.prototype.getMediaPixelHeight = function() {
  1100. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
  1101. };
  1102. /**
  1103. * @param {number} value
  1104. * @return {!proto.VideoMetadata} returns this
  1105. */
  1106. proto.VideoMetadata.prototype.setMediaPixelHeight = function(value) {
  1107. return jspb.Message.setField(this, 6, value);
  1108. };
  1109. /**
  1110. * Clears the field making it undefined.
  1111. * @return {!proto.VideoMetadata} returns this
  1112. */
  1113. proto.VideoMetadata.prototype.clearMediaPixelHeight = function() {
  1114. return jspb.Message.setField(this, 6, undefined);
  1115. };
  1116. /**
  1117. * Returns whether this field is set.
  1118. * @return {boolean}
  1119. */
  1120. proto.VideoMetadata.prototype.hasMediaPixelHeight = function() {
  1121. return jspb.Message.getField(this, 6) != null;
  1122. };
  1123. /**
  1124. * optional uint32 media_pixel_width = 7;
  1125. * @return {number}
  1126. */
  1127. proto.VideoMetadata.prototype.getMediaPixelWidth = function() {
  1128. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
  1129. };
  1130. /**
  1131. * @param {number} value
  1132. * @return {!proto.VideoMetadata} returns this
  1133. */
  1134. proto.VideoMetadata.prototype.setMediaPixelWidth = function(value) {
  1135. return jspb.Message.setField(this, 7, value);
  1136. };
  1137. /**
  1138. * Clears the field making it undefined.
  1139. * @return {!proto.VideoMetadata} returns this
  1140. */
  1141. proto.VideoMetadata.prototype.clearMediaPixelWidth = function() {
  1142. return jspb.Message.setField(this, 7, undefined);
  1143. };
  1144. /**
  1145. * Returns whether this field is set.
  1146. * @return {boolean}
  1147. */
  1148. proto.VideoMetadata.prototype.hasMediaPixelWidth = function() {
  1149. return jspb.Message.getField(this, 7) != null;
  1150. };
  1151. /**
  1152. * optional MediaType media_type = 8;
  1153. * @return {?proto.MediaType}
  1154. */
  1155. proto.VideoMetadata.prototype.getMediaType = function() {
  1156. return /** @type{?proto.MediaType} */ (
  1157. jspb.Message.getWrapperField(this, proto.MediaType, 8));
  1158. };
  1159. /**
  1160. * @param {?proto.MediaType|undefined} value
  1161. * @return {!proto.VideoMetadata} returns this
  1162. */
  1163. proto.VideoMetadata.prototype.setMediaType = function(value) {
  1164. return jspb.Message.setWrapperField(this, 8, value);
  1165. };
  1166. /**
  1167. * Clears the message field making it undefined.
  1168. * @return {!proto.VideoMetadata} returns this
  1169. */
  1170. proto.VideoMetadata.prototype.clearMediaType = function() {
  1171. return this.setMediaType(undefined);
  1172. };
  1173. /**
  1174. * Returns whether this field is set.
  1175. * @return {boolean}
  1176. */
  1177. proto.VideoMetadata.prototype.hasMediaType = function() {
  1178. return jspb.Message.getField(this, 8) != null;
  1179. };
  1180. /**
  1181. * optional string language = 9;
  1182. * @return {string}
  1183. */
  1184. proto.VideoMetadata.prototype.getLanguage = function() {
  1185. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
  1186. };
  1187. /**
  1188. * @param {string} value
  1189. * @return {!proto.VideoMetadata} returns this
  1190. */
  1191. proto.VideoMetadata.prototype.setLanguage = function(value) {
  1192. return jspb.Message.setField(this, 9, value);
  1193. };
  1194. /**
  1195. * Clears the field making it undefined.
  1196. * @return {!proto.VideoMetadata} returns this
  1197. */
  1198. proto.VideoMetadata.prototype.clearLanguage = function() {
  1199. return jspb.Message.setField(this, 9, undefined);
  1200. };
  1201. /**
  1202. * Returns whether this field is set.
  1203. * @return {boolean}
  1204. */
  1205. proto.VideoMetadata.prototype.hasLanguage = function() {
  1206. return jspb.Message.getField(this, 9) != null;
  1207. };
  1208. /**
  1209. * optional License license = 10;
  1210. * @return {?proto.License}
  1211. */
  1212. proto.VideoMetadata.prototype.getLicense = function() {
  1213. return /** @type{?proto.License} */ (
  1214. jspb.Message.getWrapperField(this, proto.License, 10));
  1215. };
  1216. /**
  1217. * @param {?proto.License|undefined} value
  1218. * @return {!proto.VideoMetadata} returns this
  1219. */
  1220. proto.VideoMetadata.prototype.setLicense = function(value) {
  1221. return jspb.Message.setWrapperField(this, 10, value);
  1222. };
  1223. /**
  1224. * Clears the message field making it undefined.
  1225. * @return {!proto.VideoMetadata} returns this
  1226. */
  1227. proto.VideoMetadata.prototype.clearLicense = function() {
  1228. return this.setLicense(undefined);
  1229. };
  1230. /**
  1231. * Returns whether this field is set.
  1232. * @return {boolean}
  1233. */
  1234. proto.VideoMetadata.prototype.hasLicense = function() {
  1235. return jspb.Message.getField(this, 10) != null;
  1236. };
  1237. /**
  1238. * optional PublishedBeforeJoystream published_before_joystream = 11;
  1239. * @return {?proto.PublishedBeforeJoystream}
  1240. */
  1241. proto.VideoMetadata.prototype.getPublishedBeforeJoystream = function() {
  1242. return /** @type{?proto.PublishedBeforeJoystream} */ (
  1243. jspb.Message.getWrapperField(this, proto.PublishedBeforeJoystream, 11));
  1244. };
  1245. /**
  1246. * @param {?proto.PublishedBeforeJoystream|undefined} value
  1247. * @return {!proto.VideoMetadata} returns this
  1248. */
  1249. proto.VideoMetadata.prototype.setPublishedBeforeJoystream = function(value) {
  1250. return jspb.Message.setWrapperField(this, 11, value);
  1251. };
  1252. /**
  1253. * Clears the message field making it undefined.
  1254. * @return {!proto.VideoMetadata} returns this
  1255. */
  1256. proto.VideoMetadata.prototype.clearPublishedBeforeJoystream = function() {
  1257. return this.setPublishedBeforeJoystream(undefined);
  1258. };
  1259. /**
  1260. * Returns whether this field is set.
  1261. * @return {boolean}
  1262. */
  1263. proto.VideoMetadata.prototype.hasPublishedBeforeJoystream = function() {
  1264. return jspb.Message.getField(this, 11) != null;
  1265. };
  1266. /**
  1267. * optional bool has_marketing = 12;
  1268. * @return {boolean}
  1269. */
  1270. proto.VideoMetadata.prototype.getHasMarketing = function() {
  1271. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 12, false));
  1272. };
  1273. /**
  1274. * @param {boolean} value
  1275. * @return {!proto.VideoMetadata} returns this
  1276. */
  1277. proto.VideoMetadata.prototype.setHasMarketing = function(value) {
  1278. return jspb.Message.setField(this, 12, value);
  1279. };
  1280. /**
  1281. * Clears the field making it undefined.
  1282. * @return {!proto.VideoMetadata} returns this
  1283. */
  1284. proto.VideoMetadata.prototype.clearHasMarketing = function() {
  1285. return jspb.Message.setField(this, 12, undefined);
  1286. };
  1287. /**
  1288. * Returns whether this field is set.
  1289. * @return {boolean}
  1290. */
  1291. proto.VideoMetadata.prototype.hasHasMarketing = function() {
  1292. return jspb.Message.getField(this, 12) != null;
  1293. };
  1294. /**
  1295. * optional bool is_public = 13;
  1296. * @return {boolean}
  1297. */
  1298. proto.VideoMetadata.prototype.getIsPublic = function() {
  1299. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 13, false));
  1300. };
  1301. /**
  1302. * @param {boolean} value
  1303. * @return {!proto.VideoMetadata} returns this
  1304. */
  1305. proto.VideoMetadata.prototype.setIsPublic = function(value) {
  1306. return jspb.Message.setField(this, 13, value);
  1307. };
  1308. /**
  1309. * Clears the field making it undefined.
  1310. * @return {!proto.VideoMetadata} returns this
  1311. */
  1312. proto.VideoMetadata.prototype.clearIsPublic = function() {
  1313. return jspb.Message.setField(this, 13, undefined);
  1314. };
  1315. /**
  1316. * Returns whether this field is set.
  1317. * @return {boolean}
  1318. */
  1319. proto.VideoMetadata.prototype.hasIsPublic = function() {
  1320. return jspb.Message.getField(this, 13) != null;
  1321. };
  1322. /**
  1323. * optional bool is_explicit = 14;
  1324. * @return {boolean}
  1325. */
  1326. proto.VideoMetadata.prototype.getIsExplicit = function() {
  1327. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 14, false));
  1328. };
  1329. /**
  1330. * @param {boolean} value
  1331. * @return {!proto.VideoMetadata} returns this
  1332. */
  1333. proto.VideoMetadata.prototype.setIsExplicit = function(value) {
  1334. return jspb.Message.setField(this, 14, value);
  1335. };
  1336. /**
  1337. * Clears the field making it undefined.
  1338. * @return {!proto.VideoMetadata} returns this
  1339. */
  1340. proto.VideoMetadata.prototype.clearIsExplicit = function() {
  1341. return jspb.Message.setField(this, 14, undefined);
  1342. };
  1343. /**
  1344. * Returns whether this field is set.
  1345. * @return {boolean}
  1346. */
  1347. proto.VideoMetadata.prototype.hasIsExplicit = function() {
  1348. return jspb.Message.getField(this, 14) != null;
  1349. };
  1350. if (jspb.Message.GENERATE_TO_OBJECT) {
  1351. /**
  1352. * Creates an object representation of this proto.
  1353. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  1354. * Optional fields that are not set will be set to undefined.
  1355. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  1356. * For the list of reserved names please see:
  1357. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  1358. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  1359. * JSPB instance for transitional soy proto support:
  1360. * http://goto/soy-param-migration
  1361. * @return {!Object}
  1362. */
  1363. proto.VideoCategoryMetadata.prototype.toObject = function(opt_includeInstance) {
  1364. return proto.VideoCategoryMetadata.toObject(opt_includeInstance, this);
  1365. };
  1366. /**
  1367. * Static version of the {@see toObject} method.
  1368. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  1369. * the JSPB instance for transitional soy proto support:
  1370. * http://goto/soy-param-migration
  1371. * @param {!proto.VideoCategoryMetadata} msg The msg instance to transform.
  1372. * @return {!Object}
  1373. * @suppress {unusedLocalVariables} f is only used for nested messages
  1374. */
  1375. proto.VideoCategoryMetadata.toObject = function(includeInstance, msg) {
  1376. var f, obj = {
  1377. name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f
  1378. };
  1379. if (includeInstance) {
  1380. obj.$jspbMessageInstance = msg;
  1381. }
  1382. return obj;
  1383. };
  1384. }
  1385. /**
  1386. * Deserializes binary data (in protobuf wire format).
  1387. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  1388. * @return {!proto.VideoCategoryMetadata}
  1389. */
  1390. proto.VideoCategoryMetadata.deserializeBinary = function(bytes) {
  1391. var reader = new jspb.BinaryReader(bytes);
  1392. var msg = new proto.VideoCategoryMetadata;
  1393. return proto.VideoCategoryMetadata.deserializeBinaryFromReader(msg, reader);
  1394. };
  1395. /**
  1396. * Deserializes binary data (in protobuf wire format) from the
  1397. * given reader into the given message object.
  1398. * @param {!proto.VideoCategoryMetadata} msg The message object to deserialize into.
  1399. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  1400. * @return {!proto.VideoCategoryMetadata}
  1401. */
  1402. proto.VideoCategoryMetadata.deserializeBinaryFromReader = function(msg, reader) {
  1403. while (reader.nextField()) {
  1404. if (reader.isEndGroup()) {
  1405. break;
  1406. }
  1407. var field = reader.getFieldNumber();
  1408. switch (field) {
  1409. case 1:
  1410. var value = /** @type {string} */ (reader.readString());
  1411. msg.setName(value);
  1412. break;
  1413. default:
  1414. reader.skipField();
  1415. break;
  1416. }
  1417. }
  1418. return msg;
  1419. };
  1420. /**
  1421. * Serializes the message to binary data (in protobuf wire format).
  1422. * @return {!Uint8Array}
  1423. */
  1424. proto.VideoCategoryMetadata.prototype.serializeBinary = function() {
  1425. var writer = new jspb.BinaryWriter();
  1426. proto.VideoCategoryMetadata.serializeBinaryToWriter(this, writer);
  1427. return writer.getResultBuffer();
  1428. };
  1429. /**
  1430. * Serializes the given message to binary data (in protobuf wire
  1431. * format), writing to the given BinaryWriter.
  1432. * @param {!proto.VideoCategoryMetadata} message
  1433. * @param {!jspb.BinaryWriter} writer
  1434. * @suppress {unusedLocalVariables} f is only used for nested messages
  1435. */
  1436. proto.VideoCategoryMetadata.serializeBinaryToWriter = function(message, writer) {
  1437. var f = undefined;
  1438. f = /** @type {string} */ (jspb.Message.getField(message, 1));
  1439. if (f != null) {
  1440. writer.writeString(
  1441. 1,
  1442. f
  1443. );
  1444. }
  1445. };
  1446. /**
  1447. * optional string name = 1;
  1448. * @return {string}
  1449. */
  1450. proto.VideoCategoryMetadata.prototype.getName = function() {
  1451. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
  1452. };
  1453. /**
  1454. * @param {string} value
  1455. * @return {!proto.VideoCategoryMetadata} returns this
  1456. */
  1457. proto.VideoCategoryMetadata.prototype.setName = function(value) {
  1458. return jspb.Message.setField(this, 1, value);
  1459. };
  1460. /**
  1461. * Clears the field making it undefined.
  1462. * @return {!proto.VideoCategoryMetadata} returns this
  1463. */
  1464. proto.VideoCategoryMetadata.prototype.clearName = function() {
  1465. return jspb.Message.setField(this, 1, undefined);
  1466. };
  1467. /**
  1468. * Returns whether this field is set.
  1469. * @return {boolean}
  1470. */
  1471. proto.VideoCategoryMetadata.prototype.hasName = function() {
  1472. return jspb.Message.getField(this, 1) != null;
  1473. };
  1474. goog.object.extend(exports, proto);