Video_pb.js 47 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846
  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, proto.VideoMetadata.repeatedFields_, 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. /**
  698. * List of repeated fields within this message type.
  699. * @private {!Array<number>}
  700. * @const
  701. */
  702. proto.VideoMetadata.repeatedFields_ = [15];
  703. if (jspb.Message.GENERATE_TO_OBJECT) {
  704. /**
  705. * Creates an object representation of this proto.
  706. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  707. * Optional fields that are not set will be set to undefined.
  708. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  709. * For the list of reserved names please see:
  710. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  711. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  712. * JSPB instance for transitional soy proto support:
  713. * http://goto/soy-param-migration
  714. * @return {!Object}
  715. */
  716. proto.VideoMetadata.prototype.toObject = function(opt_includeInstance) {
  717. return proto.VideoMetadata.toObject(opt_includeInstance, this);
  718. };
  719. /**
  720. * Static version of the {@see toObject} method.
  721. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  722. * the JSPB instance for transitional soy proto support:
  723. * http://goto/soy-param-migration
  724. * @param {!proto.VideoMetadata} msg The msg instance to transform.
  725. * @return {!Object}
  726. * @suppress {unusedLocalVariables} f is only used for nested messages
  727. */
  728. proto.VideoMetadata.toObject = function(includeInstance, msg) {
  729. var f, obj = {
  730. title: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f,
  731. description: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f,
  732. video: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f,
  733. thumbnailPhoto: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f,
  734. duration: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f,
  735. mediaPixelHeight: (f = jspb.Message.getField(msg, 6)) == null ? undefined : f,
  736. mediaPixelWidth: (f = jspb.Message.getField(msg, 7)) == null ? undefined : f,
  737. mediaType: (f = msg.getMediaType()) && proto.MediaType.toObject(includeInstance, f),
  738. language: (f = jspb.Message.getField(msg, 9)) == null ? undefined : f,
  739. license: (f = msg.getLicense()) && proto.License.toObject(includeInstance, f),
  740. publishedBeforeJoystream: (f = msg.getPublishedBeforeJoystream()) && proto.PublishedBeforeJoystream.toObject(includeInstance, f),
  741. hasMarketing: (f = jspb.Message.getBooleanField(msg, 12)) == null ? undefined : f,
  742. isPublic: (f = jspb.Message.getBooleanField(msg, 13)) == null ? undefined : f,
  743. isExplicit: (f = jspb.Message.getBooleanField(msg, 14)) == null ? undefined : f,
  744. personsList: (f = jspb.Message.getRepeatedField(msg, 15)) == null ? undefined : f,
  745. category: (f = jspb.Message.getField(msg, 16)) == null ? undefined : f
  746. };
  747. if (includeInstance) {
  748. obj.$jspbMessageInstance = msg;
  749. }
  750. return obj;
  751. };
  752. }
  753. /**
  754. * Deserializes binary data (in protobuf wire format).
  755. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  756. * @return {!proto.VideoMetadata}
  757. */
  758. proto.VideoMetadata.deserializeBinary = function(bytes) {
  759. var reader = new jspb.BinaryReader(bytes);
  760. var msg = new proto.VideoMetadata;
  761. return proto.VideoMetadata.deserializeBinaryFromReader(msg, reader);
  762. };
  763. /**
  764. * Deserializes binary data (in protobuf wire format) from the
  765. * given reader into the given message object.
  766. * @param {!proto.VideoMetadata} msg The message object to deserialize into.
  767. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  768. * @return {!proto.VideoMetadata}
  769. */
  770. proto.VideoMetadata.deserializeBinaryFromReader = function(msg, reader) {
  771. while (reader.nextField()) {
  772. if (reader.isEndGroup()) {
  773. break;
  774. }
  775. var field = reader.getFieldNumber();
  776. switch (field) {
  777. case 1:
  778. var value = /** @type {string} */ (reader.readString());
  779. msg.setTitle(value);
  780. break;
  781. case 2:
  782. var value = /** @type {string} */ (reader.readString());
  783. msg.setDescription(value);
  784. break;
  785. case 3:
  786. var value = /** @type {number} */ (reader.readUint32());
  787. msg.setVideo(value);
  788. break;
  789. case 4:
  790. var value = /** @type {number} */ (reader.readUint32());
  791. msg.setThumbnailPhoto(value);
  792. break;
  793. case 5:
  794. var value = /** @type {number} */ (reader.readUint32());
  795. msg.setDuration(value);
  796. break;
  797. case 6:
  798. var value = /** @type {number} */ (reader.readUint32());
  799. msg.setMediaPixelHeight(value);
  800. break;
  801. case 7:
  802. var value = /** @type {number} */ (reader.readUint32());
  803. msg.setMediaPixelWidth(value);
  804. break;
  805. case 8:
  806. var value = new proto.MediaType;
  807. reader.readMessage(value,proto.MediaType.deserializeBinaryFromReader);
  808. msg.setMediaType(value);
  809. break;
  810. case 9:
  811. var value = /** @type {string} */ (reader.readString());
  812. msg.setLanguage(value);
  813. break;
  814. case 10:
  815. var value = new proto.License;
  816. reader.readMessage(value,proto.License.deserializeBinaryFromReader);
  817. msg.setLicense(value);
  818. break;
  819. case 11:
  820. var value = new proto.PublishedBeforeJoystream;
  821. reader.readMessage(value,proto.PublishedBeforeJoystream.deserializeBinaryFromReader);
  822. msg.setPublishedBeforeJoystream(value);
  823. break;
  824. case 12:
  825. var value = /** @type {boolean} */ (reader.readBool());
  826. msg.setHasMarketing(value);
  827. break;
  828. case 13:
  829. var value = /** @type {boolean} */ (reader.readBool());
  830. msg.setIsPublic(value);
  831. break;
  832. case 14:
  833. var value = /** @type {boolean} */ (reader.readBool());
  834. msg.setIsExplicit(value);
  835. break;
  836. case 15:
  837. var values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedUint64() : [reader.readUint64()]);
  838. for (var i = 0; i < values.length; i++) {
  839. msg.addPersons(values[i]);
  840. }
  841. break;
  842. case 16:
  843. var value = /** @type {number} */ (reader.readUint64());
  844. msg.setCategory(value);
  845. break;
  846. default:
  847. reader.skipField();
  848. break;
  849. }
  850. }
  851. return msg;
  852. };
  853. /**
  854. * Serializes the message to binary data (in protobuf wire format).
  855. * @return {!Uint8Array}
  856. */
  857. proto.VideoMetadata.prototype.serializeBinary = function() {
  858. var writer = new jspb.BinaryWriter();
  859. proto.VideoMetadata.serializeBinaryToWriter(this, writer);
  860. return writer.getResultBuffer();
  861. };
  862. /**
  863. * Serializes the given message to binary data (in protobuf wire
  864. * format), writing to the given BinaryWriter.
  865. * @param {!proto.VideoMetadata} message
  866. * @param {!jspb.BinaryWriter} writer
  867. * @suppress {unusedLocalVariables} f is only used for nested messages
  868. */
  869. proto.VideoMetadata.serializeBinaryToWriter = function(message, writer) {
  870. var f = undefined;
  871. f = /** @type {string} */ (jspb.Message.getField(message, 1));
  872. if (f != null) {
  873. writer.writeString(
  874. 1,
  875. f
  876. );
  877. }
  878. f = /** @type {string} */ (jspb.Message.getField(message, 2));
  879. if (f != null) {
  880. writer.writeString(
  881. 2,
  882. f
  883. );
  884. }
  885. f = /** @type {number} */ (jspb.Message.getField(message, 3));
  886. if (f != null) {
  887. writer.writeUint32(
  888. 3,
  889. f
  890. );
  891. }
  892. f = /** @type {number} */ (jspb.Message.getField(message, 4));
  893. if (f != null) {
  894. writer.writeUint32(
  895. 4,
  896. f
  897. );
  898. }
  899. f = /** @type {number} */ (jspb.Message.getField(message, 5));
  900. if (f != null) {
  901. writer.writeUint32(
  902. 5,
  903. f
  904. );
  905. }
  906. f = /** @type {number} */ (jspb.Message.getField(message, 6));
  907. if (f != null) {
  908. writer.writeUint32(
  909. 6,
  910. f
  911. );
  912. }
  913. f = /** @type {number} */ (jspb.Message.getField(message, 7));
  914. if (f != null) {
  915. writer.writeUint32(
  916. 7,
  917. f
  918. );
  919. }
  920. f = message.getMediaType();
  921. if (f != null) {
  922. writer.writeMessage(
  923. 8,
  924. f,
  925. proto.MediaType.serializeBinaryToWriter
  926. );
  927. }
  928. f = /** @type {string} */ (jspb.Message.getField(message, 9));
  929. if (f != null) {
  930. writer.writeString(
  931. 9,
  932. f
  933. );
  934. }
  935. f = message.getLicense();
  936. if (f != null) {
  937. writer.writeMessage(
  938. 10,
  939. f,
  940. proto.License.serializeBinaryToWriter
  941. );
  942. }
  943. f = message.getPublishedBeforeJoystream();
  944. if (f != null) {
  945. writer.writeMessage(
  946. 11,
  947. f,
  948. proto.PublishedBeforeJoystream.serializeBinaryToWriter
  949. );
  950. }
  951. f = /** @type {boolean} */ (jspb.Message.getField(message, 12));
  952. if (f != null) {
  953. writer.writeBool(
  954. 12,
  955. f
  956. );
  957. }
  958. f = /** @type {boolean} */ (jspb.Message.getField(message, 13));
  959. if (f != null) {
  960. writer.writeBool(
  961. 13,
  962. f
  963. );
  964. }
  965. f = /** @type {boolean} */ (jspb.Message.getField(message, 14));
  966. if (f != null) {
  967. writer.writeBool(
  968. 14,
  969. f
  970. );
  971. }
  972. f = message.getPersonsList();
  973. if (f.length > 0) {
  974. writer.writePackedUint64(
  975. 15,
  976. f
  977. );
  978. }
  979. f = /** @type {number} */ (jspb.Message.getField(message, 16));
  980. if (f != null) {
  981. writer.writeUint64(
  982. 16,
  983. f
  984. );
  985. }
  986. };
  987. /**
  988. * optional string title = 1;
  989. * @return {string}
  990. */
  991. proto.VideoMetadata.prototype.getTitle = function() {
  992. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
  993. };
  994. /**
  995. * @param {string} value
  996. * @return {!proto.VideoMetadata} returns this
  997. */
  998. proto.VideoMetadata.prototype.setTitle = function(value) {
  999. return jspb.Message.setField(this, 1, value);
  1000. };
  1001. /**
  1002. * Clears the field making it undefined.
  1003. * @return {!proto.VideoMetadata} returns this
  1004. */
  1005. proto.VideoMetadata.prototype.clearTitle = function() {
  1006. return jspb.Message.setField(this, 1, undefined);
  1007. };
  1008. /**
  1009. * Returns whether this field is set.
  1010. * @return {boolean}
  1011. */
  1012. proto.VideoMetadata.prototype.hasTitle = function() {
  1013. return jspb.Message.getField(this, 1) != null;
  1014. };
  1015. /**
  1016. * optional string description = 2;
  1017. * @return {string}
  1018. */
  1019. proto.VideoMetadata.prototype.getDescription = function() {
  1020. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
  1021. };
  1022. /**
  1023. * @param {string} value
  1024. * @return {!proto.VideoMetadata} returns this
  1025. */
  1026. proto.VideoMetadata.prototype.setDescription = function(value) {
  1027. return jspb.Message.setField(this, 2, value);
  1028. };
  1029. /**
  1030. * Clears the field making it undefined.
  1031. * @return {!proto.VideoMetadata} returns this
  1032. */
  1033. proto.VideoMetadata.prototype.clearDescription = function() {
  1034. return jspb.Message.setField(this, 2, undefined);
  1035. };
  1036. /**
  1037. * Returns whether this field is set.
  1038. * @return {boolean}
  1039. */
  1040. proto.VideoMetadata.prototype.hasDescription = function() {
  1041. return jspb.Message.getField(this, 2) != null;
  1042. };
  1043. /**
  1044. * optional uint32 video = 3;
  1045. * @return {number}
  1046. */
  1047. proto.VideoMetadata.prototype.getVideo = function() {
  1048. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
  1049. };
  1050. /**
  1051. * @param {number} value
  1052. * @return {!proto.VideoMetadata} returns this
  1053. */
  1054. proto.VideoMetadata.prototype.setVideo = function(value) {
  1055. return jspb.Message.setField(this, 3, value);
  1056. };
  1057. /**
  1058. * Clears the field making it undefined.
  1059. * @return {!proto.VideoMetadata} returns this
  1060. */
  1061. proto.VideoMetadata.prototype.clearVideo = function() {
  1062. return jspb.Message.setField(this, 3, undefined);
  1063. };
  1064. /**
  1065. * Returns whether this field is set.
  1066. * @return {boolean}
  1067. */
  1068. proto.VideoMetadata.prototype.hasVideo = function() {
  1069. return jspb.Message.getField(this, 3) != null;
  1070. };
  1071. /**
  1072. * optional uint32 thumbnail_photo = 4;
  1073. * @return {number}
  1074. */
  1075. proto.VideoMetadata.prototype.getThumbnailPhoto = function() {
  1076. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
  1077. };
  1078. /**
  1079. * @param {number} value
  1080. * @return {!proto.VideoMetadata} returns this
  1081. */
  1082. proto.VideoMetadata.prototype.setThumbnailPhoto = function(value) {
  1083. return jspb.Message.setField(this, 4, value);
  1084. };
  1085. /**
  1086. * Clears the field making it undefined.
  1087. * @return {!proto.VideoMetadata} returns this
  1088. */
  1089. proto.VideoMetadata.prototype.clearThumbnailPhoto = function() {
  1090. return jspb.Message.setField(this, 4, undefined);
  1091. };
  1092. /**
  1093. * Returns whether this field is set.
  1094. * @return {boolean}
  1095. */
  1096. proto.VideoMetadata.prototype.hasThumbnailPhoto = function() {
  1097. return jspb.Message.getField(this, 4) != null;
  1098. };
  1099. /**
  1100. * optional uint32 duration = 5;
  1101. * @return {number}
  1102. */
  1103. proto.VideoMetadata.prototype.getDuration = function() {
  1104. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
  1105. };
  1106. /**
  1107. * @param {number} value
  1108. * @return {!proto.VideoMetadata} returns this
  1109. */
  1110. proto.VideoMetadata.prototype.setDuration = function(value) {
  1111. return jspb.Message.setField(this, 5, value);
  1112. };
  1113. /**
  1114. * Clears the field making it undefined.
  1115. * @return {!proto.VideoMetadata} returns this
  1116. */
  1117. proto.VideoMetadata.prototype.clearDuration = function() {
  1118. return jspb.Message.setField(this, 5, undefined);
  1119. };
  1120. /**
  1121. * Returns whether this field is set.
  1122. * @return {boolean}
  1123. */
  1124. proto.VideoMetadata.prototype.hasDuration = function() {
  1125. return jspb.Message.getField(this, 5) != null;
  1126. };
  1127. /**
  1128. * optional uint32 media_pixel_height = 6;
  1129. * @return {number}
  1130. */
  1131. proto.VideoMetadata.prototype.getMediaPixelHeight = function() {
  1132. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
  1133. };
  1134. /**
  1135. * @param {number} value
  1136. * @return {!proto.VideoMetadata} returns this
  1137. */
  1138. proto.VideoMetadata.prototype.setMediaPixelHeight = function(value) {
  1139. return jspb.Message.setField(this, 6, value);
  1140. };
  1141. /**
  1142. * Clears the field making it undefined.
  1143. * @return {!proto.VideoMetadata} returns this
  1144. */
  1145. proto.VideoMetadata.prototype.clearMediaPixelHeight = function() {
  1146. return jspb.Message.setField(this, 6, undefined);
  1147. };
  1148. /**
  1149. * Returns whether this field is set.
  1150. * @return {boolean}
  1151. */
  1152. proto.VideoMetadata.prototype.hasMediaPixelHeight = function() {
  1153. return jspb.Message.getField(this, 6) != null;
  1154. };
  1155. /**
  1156. * optional uint32 media_pixel_width = 7;
  1157. * @return {number}
  1158. */
  1159. proto.VideoMetadata.prototype.getMediaPixelWidth = function() {
  1160. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
  1161. };
  1162. /**
  1163. * @param {number} value
  1164. * @return {!proto.VideoMetadata} returns this
  1165. */
  1166. proto.VideoMetadata.prototype.setMediaPixelWidth = function(value) {
  1167. return jspb.Message.setField(this, 7, value);
  1168. };
  1169. /**
  1170. * Clears the field making it undefined.
  1171. * @return {!proto.VideoMetadata} returns this
  1172. */
  1173. proto.VideoMetadata.prototype.clearMediaPixelWidth = function() {
  1174. return jspb.Message.setField(this, 7, undefined);
  1175. };
  1176. /**
  1177. * Returns whether this field is set.
  1178. * @return {boolean}
  1179. */
  1180. proto.VideoMetadata.prototype.hasMediaPixelWidth = function() {
  1181. return jspb.Message.getField(this, 7) != null;
  1182. };
  1183. /**
  1184. * optional MediaType media_type = 8;
  1185. * @return {?proto.MediaType}
  1186. */
  1187. proto.VideoMetadata.prototype.getMediaType = function() {
  1188. return /** @type{?proto.MediaType} */ (
  1189. jspb.Message.getWrapperField(this, proto.MediaType, 8));
  1190. };
  1191. /**
  1192. * @param {?proto.MediaType|undefined} value
  1193. * @return {!proto.VideoMetadata} returns this
  1194. */
  1195. proto.VideoMetadata.prototype.setMediaType = function(value) {
  1196. return jspb.Message.setWrapperField(this, 8, value);
  1197. };
  1198. /**
  1199. * Clears the message field making it undefined.
  1200. * @return {!proto.VideoMetadata} returns this
  1201. */
  1202. proto.VideoMetadata.prototype.clearMediaType = function() {
  1203. return this.setMediaType(undefined);
  1204. };
  1205. /**
  1206. * Returns whether this field is set.
  1207. * @return {boolean}
  1208. */
  1209. proto.VideoMetadata.prototype.hasMediaType = function() {
  1210. return jspb.Message.getField(this, 8) != null;
  1211. };
  1212. /**
  1213. * optional string language = 9;
  1214. * @return {string}
  1215. */
  1216. proto.VideoMetadata.prototype.getLanguage = function() {
  1217. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
  1218. };
  1219. /**
  1220. * @param {string} value
  1221. * @return {!proto.VideoMetadata} returns this
  1222. */
  1223. proto.VideoMetadata.prototype.setLanguage = function(value) {
  1224. return jspb.Message.setField(this, 9, value);
  1225. };
  1226. /**
  1227. * Clears the field making it undefined.
  1228. * @return {!proto.VideoMetadata} returns this
  1229. */
  1230. proto.VideoMetadata.prototype.clearLanguage = function() {
  1231. return jspb.Message.setField(this, 9, undefined);
  1232. };
  1233. /**
  1234. * Returns whether this field is set.
  1235. * @return {boolean}
  1236. */
  1237. proto.VideoMetadata.prototype.hasLanguage = function() {
  1238. return jspb.Message.getField(this, 9) != null;
  1239. };
  1240. /**
  1241. * optional License license = 10;
  1242. * @return {?proto.License}
  1243. */
  1244. proto.VideoMetadata.prototype.getLicense = function() {
  1245. return /** @type{?proto.License} */ (
  1246. jspb.Message.getWrapperField(this, proto.License, 10));
  1247. };
  1248. /**
  1249. * @param {?proto.License|undefined} value
  1250. * @return {!proto.VideoMetadata} returns this
  1251. */
  1252. proto.VideoMetadata.prototype.setLicense = function(value) {
  1253. return jspb.Message.setWrapperField(this, 10, value);
  1254. };
  1255. /**
  1256. * Clears the message field making it undefined.
  1257. * @return {!proto.VideoMetadata} returns this
  1258. */
  1259. proto.VideoMetadata.prototype.clearLicense = function() {
  1260. return this.setLicense(undefined);
  1261. };
  1262. /**
  1263. * Returns whether this field is set.
  1264. * @return {boolean}
  1265. */
  1266. proto.VideoMetadata.prototype.hasLicense = function() {
  1267. return jspb.Message.getField(this, 10) != null;
  1268. };
  1269. /**
  1270. * optional PublishedBeforeJoystream published_before_joystream = 11;
  1271. * @return {?proto.PublishedBeforeJoystream}
  1272. */
  1273. proto.VideoMetadata.prototype.getPublishedBeforeJoystream = function() {
  1274. return /** @type{?proto.PublishedBeforeJoystream} */ (
  1275. jspb.Message.getWrapperField(this, proto.PublishedBeforeJoystream, 11));
  1276. };
  1277. /**
  1278. * @param {?proto.PublishedBeforeJoystream|undefined} value
  1279. * @return {!proto.VideoMetadata} returns this
  1280. */
  1281. proto.VideoMetadata.prototype.setPublishedBeforeJoystream = function(value) {
  1282. return jspb.Message.setWrapperField(this, 11, value);
  1283. };
  1284. /**
  1285. * Clears the message field making it undefined.
  1286. * @return {!proto.VideoMetadata} returns this
  1287. */
  1288. proto.VideoMetadata.prototype.clearPublishedBeforeJoystream = function() {
  1289. return this.setPublishedBeforeJoystream(undefined);
  1290. };
  1291. /**
  1292. * Returns whether this field is set.
  1293. * @return {boolean}
  1294. */
  1295. proto.VideoMetadata.prototype.hasPublishedBeforeJoystream = function() {
  1296. return jspb.Message.getField(this, 11) != null;
  1297. };
  1298. /**
  1299. * optional bool has_marketing = 12;
  1300. * @return {boolean}
  1301. */
  1302. proto.VideoMetadata.prototype.getHasMarketing = function() {
  1303. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 12, false));
  1304. };
  1305. /**
  1306. * @param {boolean} value
  1307. * @return {!proto.VideoMetadata} returns this
  1308. */
  1309. proto.VideoMetadata.prototype.setHasMarketing = function(value) {
  1310. return jspb.Message.setField(this, 12, value);
  1311. };
  1312. /**
  1313. * Clears the field making it undefined.
  1314. * @return {!proto.VideoMetadata} returns this
  1315. */
  1316. proto.VideoMetadata.prototype.clearHasMarketing = function() {
  1317. return jspb.Message.setField(this, 12, undefined);
  1318. };
  1319. /**
  1320. * Returns whether this field is set.
  1321. * @return {boolean}
  1322. */
  1323. proto.VideoMetadata.prototype.hasHasMarketing = function() {
  1324. return jspb.Message.getField(this, 12) != null;
  1325. };
  1326. /**
  1327. * optional bool is_public = 13;
  1328. * @return {boolean}
  1329. */
  1330. proto.VideoMetadata.prototype.getIsPublic = function() {
  1331. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 13, false));
  1332. };
  1333. /**
  1334. * @param {boolean} value
  1335. * @return {!proto.VideoMetadata} returns this
  1336. */
  1337. proto.VideoMetadata.prototype.setIsPublic = function(value) {
  1338. return jspb.Message.setField(this, 13, value);
  1339. };
  1340. /**
  1341. * Clears the field making it undefined.
  1342. * @return {!proto.VideoMetadata} returns this
  1343. */
  1344. proto.VideoMetadata.prototype.clearIsPublic = function() {
  1345. return jspb.Message.setField(this, 13, undefined);
  1346. };
  1347. /**
  1348. * Returns whether this field is set.
  1349. * @return {boolean}
  1350. */
  1351. proto.VideoMetadata.prototype.hasIsPublic = function() {
  1352. return jspb.Message.getField(this, 13) != null;
  1353. };
  1354. /**
  1355. * optional bool is_explicit = 14;
  1356. * @return {boolean}
  1357. */
  1358. proto.VideoMetadata.prototype.getIsExplicit = function() {
  1359. return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 14, false));
  1360. };
  1361. /**
  1362. * @param {boolean} value
  1363. * @return {!proto.VideoMetadata} returns this
  1364. */
  1365. proto.VideoMetadata.prototype.setIsExplicit = function(value) {
  1366. return jspb.Message.setField(this, 14, value);
  1367. };
  1368. /**
  1369. * Clears the field making it undefined.
  1370. * @return {!proto.VideoMetadata} returns this
  1371. */
  1372. proto.VideoMetadata.prototype.clearIsExplicit = function() {
  1373. return jspb.Message.setField(this, 14, undefined);
  1374. };
  1375. /**
  1376. * Returns whether this field is set.
  1377. * @return {boolean}
  1378. */
  1379. proto.VideoMetadata.prototype.hasIsExplicit = function() {
  1380. return jspb.Message.getField(this, 14) != null;
  1381. };
  1382. /**
  1383. * repeated uint64 persons = 15;
  1384. * @return {!Array<number>}
  1385. */
  1386. proto.VideoMetadata.prototype.getPersonsList = function() {
  1387. return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 15));
  1388. };
  1389. /**
  1390. * @param {!Array<number>} value
  1391. * @return {!proto.VideoMetadata} returns this
  1392. */
  1393. proto.VideoMetadata.prototype.setPersonsList = function(value) {
  1394. return jspb.Message.setField(this, 15, value || []);
  1395. };
  1396. /**
  1397. * @param {number} value
  1398. * @param {number=} opt_index
  1399. * @return {!proto.VideoMetadata} returns this
  1400. */
  1401. proto.VideoMetadata.prototype.addPersons = function(value, opt_index) {
  1402. return jspb.Message.addToRepeatedField(this, 15, value, opt_index);
  1403. };
  1404. /**
  1405. * Clears the list making it empty but non-null.
  1406. * @return {!proto.VideoMetadata} returns this
  1407. */
  1408. proto.VideoMetadata.prototype.clearPersonsList = function() {
  1409. return this.setPersonsList([]);
  1410. };
  1411. /**
  1412. * optional uint64 category = 16;
  1413. * @return {number}
  1414. */
  1415. proto.VideoMetadata.prototype.getCategory = function() {
  1416. return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0));
  1417. };
  1418. /**
  1419. * @param {number} value
  1420. * @return {!proto.VideoMetadata} returns this
  1421. */
  1422. proto.VideoMetadata.prototype.setCategory = function(value) {
  1423. return jspb.Message.setField(this, 16, value);
  1424. };
  1425. /**
  1426. * Clears the field making it undefined.
  1427. * @return {!proto.VideoMetadata} returns this
  1428. */
  1429. proto.VideoMetadata.prototype.clearCategory = function() {
  1430. return jspb.Message.setField(this, 16, undefined);
  1431. };
  1432. /**
  1433. * Returns whether this field is set.
  1434. * @return {boolean}
  1435. */
  1436. proto.VideoMetadata.prototype.hasCategory = function() {
  1437. return jspb.Message.getField(this, 16) != null;
  1438. };
  1439. if (jspb.Message.GENERATE_TO_OBJECT) {
  1440. /**
  1441. * Creates an object representation of this proto.
  1442. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  1443. * Optional fields that are not set will be set to undefined.
  1444. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  1445. * For the list of reserved names please see:
  1446. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  1447. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  1448. * JSPB instance for transitional soy proto support:
  1449. * http://goto/soy-param-migration
  1450. * @return {!Object}
  1451. */
  1452. proto.VideoCategoryMetadata.prototype.toObject = function(opt_includeInstance) {
  1453. return proto.VideoCategoryMetadata.toObject(opt_includeInstance, this);
  1454. };
  1455. /**
  1456. * Static version of the {@see toObject} method.
  1457. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  1458. * the JSPB instance for transitional soy proto support:
  1459. * http://goto/soy-param-migration
  1460. * @param {!proto.VideoCategoryMetadata} msg The msg instance to transform.
  1461. * @return {!Object}
  1462. * @suppress {unusedLocalVariables} f is only used for nested messages
  1463. */
  1464. proto.VideoCategoryMetadata.toObject = function(includeInstance, msg) {
  1465. var f, obj = {
  1466. name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f
  1467. };
  1468. if (includeInstance) {
  1469. obj.$jspbMessageInstance = msg;
  1470. }
  1471. return obj;
  1472. };
  1473. }
  1474. /**
  1475. * Deserializes binary data (in protobuf wire format).
  1476. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  1477. * @return {!proto.VideoCategoryMetadata}
  1478. */
  1479. proto.VideoCategoryMetadata.deserializeBinary = function(bytes) {
  1480. var reader = new jspb.BinaryReader(bytes);
  1481. var msg = new proto.VideoCategoryMetadata;
  1482. return proto.VideoCategoryMetadata.deserializeBinaryFromReader(msg, reader);
  1483. };
  1484. /**
  1485. * Deserializes binary data (in protobuf wire format) from the
  1486. * given reader into the given message object.
  1487. * @param {!proto.VideoCategoryMetadata} msg The message object to deserialize into.
  1488. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  1489. * @return {!proto.VideoCategoryMetadata}
  1490. */
  1491. proto.VideoCategoryMetadata.deserializeBinaryFromReader = function(msg, reader) {
  1492. while (reader.nextField()) {
  1493. if (reader.isEndGroup()) {
  1494. break;
  1495. }
  1496. var field = reader.getFieldNumber();
  1497. switch (field) {
  1498. case 1:
  1499. var value = /** @type {string} */ (reader.readString());
  1500. msg.setName(value);
  1501. break;
  1502. default:
  1503. reader.skipField();
  1504. break;
  1505. }
  1506. }
  1507. return msg;
  1508. };
  1509. /**
  1510. * Serializes the message to binary data (in protobuf wire format).
  1511. * @return {!Uint8Array}
  1512. */
  1513. proto.VideoCategoryMetadata.prototype.serializeBinary = function() {
  1514. var writer = new jspb.BinaryWriter();
  1515. proto.VideoCategoryMetadata.serializeBinaryToWriter(this, writer);
  1516. return writer.getResultBuffer();
  1517. };
  1518. /**
  1519. * Serializes the given message to binary data (in protobuf wire
  1520. * format), writing to the given BinaryWriter.
  1521. * @param {!proto.VideoCategoryMetadata} message
  1522. * @param {!jspb.BinaryWriter} writer
  1523. * @suppress {unusedLocalVariables} f is only used for nested messages
  1524. */
  1525. proto.VideoCategoryMetadata.serializeBinaryToWriter = function(message, writer) {
  1526. var f = undefined;
  1527. f = /** @type {string} */ (jspb.Message.getField(message, 1));
  1528. if (f != null) {
  1529. writer.writeString(
  1530. 1,
  1531. f
  1532. );
  1533. }
  1534. };
  1535. /**
  1536. * optional string name = 1;
  1537. * @return {string}
  1538. */
  1539. proto.VideoCategoryMetadata.prototype.getName = function() {
  1540. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
  1541. };
  1542. /**
  1543. * @param {string} value
  1544. * @return {!proto.VideoCategoryMetadata} returns this
  1545. */
  1546. proto.VideoCategoryMetadata.prototype.setName = function(value) {
  1547. return jspb.Message.setField(this, 1, value);
  1548. };
  1549. /**
  1550. * Clears the field making it undefined.
  1551. * @return {!proto.VideoCategoryMetadata} returns this
  1552. */
  1553. proto.VideoCategoryMetadata.prototype.clearName = function() {
  1554. return jspb.Message.setField(this, 1, undefined);
  1555. };
  1556. /**
  1557. * Returns whether this field is set.
  1558. * @return {boolean}
  1559. */
  1560. proto.VideoCategoryMetadata.prototype.hasName = function() {
  1561. return jspb.Message.getField(this, 1) != null;
  1562. };
  1563. goog.object.extend(exports, proto);