Video_pb.js 47 KB

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