12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847 |
- // source: proto/Video.proto
- /**
- * @fileoverview
- * @enhanceable
- * @suppress {missingRequire} reports error on implicit type usages.
- * @suppress {messageConventions} JS Compiler reports an error if a variable or
- * field starts with 'MSG_' and isn't a translatable message.
- * @public
- */
- // GENERATED CODE -- DO NOT EDIT!
- /* eslint-disable */
- // @ts-nocheck
- var jspb = require('google-protobuf');
- var goog = jspb;
- var global = Function('return this')();
- goog.exportSymbol('proto.License', null, global);
- goog.exportSymbol('proto.MediaType', null, global);
- goog.exportSymbol('proto.PublishedBeforeJoystream', null, global);
- goog.exportSymbol('proto.VideoCategoryMetadata', null, global);
- goog.exportSymbol('proto.VideoMetadata', null, global);
- /**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
- proto.PublishedBeforeJoystream = function(opt_data) {
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
- };
- goog.inherits(proto.PublishedBeforeJoystream, jspb.Message);
- if (goog.DEBUG && !COMPILED) {
- /**
- * @public
- * @override
- */
- proto.PublishedBeforeJoystream.displayName = 'proto.PublishedBeforeJoystream';
- }
- /**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
- proto.License = function(opt_data) {
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
- };
- goog.inherits(proto.License, jspb.Message);
- if (goog.DEBUG && !COMPILED) {
- /**
- * @public
- * @override
- */
- proto.License.displayName = 'proto.License';
- }
- /**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
- proto.MediaType = function(opt_data) {
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
- };
- goog.inherits(proto.MediaType, jspb.Message);
- if (goog.DEBUG && !COMPILED) {
- /**
- * @public
- * @override
- */
- proto.MediaType.displayName = 'proto.MediaType';
- }
- /**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
- proto.VideoMetadata = function(opt_data) {
- jspb.Message.initialize(this, opt_data, 0, -1, proto.VideoMetadata.repeatedFields_, null);
- };
- goog.inherits(proto.VideoMetadata, jspb.Message);
- if (goog.DEBUG && !COMPILED) {
- /**
- * @public
- * @override
- */
- proto.VideoMetadata.displayName = 'proto.VideoMetadata';
- }
- /**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
- proto.VideoCategoryMetadata = function(opt_data) {
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
- };
- goog.inherits(proto.VideoCategoryMetadata, jspb.Message);
- if (goog.DEBUG && !COMPILED) {
- /**
- * @public
- * @override
- */
- proto.VideoCategoryMetadata.displayName = 'proto.VideoCategoryMetadata';
- }
- if (jspb.Message.GENERATE_TO_OBJECT) {
- /**
- * Creates an object representation of this proto.
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
- * Optional fields that are not set will be set to undefined.
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
- * For the list of reserved names please see:
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
- * JSPB instance for transitional soy proto support:
- * http://goto/soy-param-migration
- * @return {!Object}
- */
- proto.PublishedBeforeJoystream.prototype.toObject = function(opt_includeInstance) {
- return proto.PublishedBeforeJoystream.toObject(opt_includeInstance, this);
- };
- /**
- * Static version of the {@see toObject} method.
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
- * the JSPB instance for transitional soy proto support:
- * http://goto/soy-param-migration
- * @param {!proto.PublishedBeforeJoystream} msg The msg instance to transform.
- * @return {!Object}
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
- proto.PublishedBeforeJoystream.toObject = function(includeInstance, msg) {
- var f, obj = {
- isPublished: (f = jspb.Message.getBooleanField(msg, 1)) == null ? undefined : f,
- date: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f
- };
- if (includeInstance) {
- obj.$jspbMessageInstance = msg;
- }
- return obj;
- };
- }
- /**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.PublishedBeforeJoystream}
- */
- proto.PublishedBeforeJoystream.deserializeBinary = function(bytes) {
- var reader = new jspb.BinaryReader(bytes);
- var msg = new proto.PublishedBeforeJoystream;
- return proto.PublishedBeforeJoystream.deserializeBinaryFromReader(msg, reader);
- };
- /**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.PublishedBeforeJoystream} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.PublishedBeforeJoystream}
- */
- proto.PublishedBeforeJoystream.deserializeBinaryFromReader = function(msg, reader) {
- while (reader.nextField()) {
- if (reader.isEndGroup()) {
- break;
- }
- var field = reader.getFieldNumber();
- switch (field) {
- case 1:
- var value = /** @type {boolean} */ (reader.readBool());
- msg.setIsPublished(value);
- break;
- case 2:
- var value = /** @type {string} */ (reader.readString());
- msg.setDate(value);
- break;
- default:
- reader.skipField();
- break;
- }
- }
- return msg;
- };
- /**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
- proto.PublishedBeforeJoystream.prototype.serializeBinary = function() {
- var writer = new jspb.BinaryWriter();
- proto.PublishedBeforeJoystream.serializeBinaryToWriter(this, writer);
- return writer.getResultBuffer();
- };
- /**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.PublishedBeforeJoystream} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
- proto.PublishedBeforeJoystream.serializeBinaryToWriter = function(message, writer) {
- var f = undefined;
- f = /** @type {boolean} */ (jspb.Message.getField(message, 1));
- if (f != null) {
- writer.writeBool(
- 1,
- f
- );
- }
- f = /** @type {string} */ (jspb.Message.getField(message, 2));
- if (f != null) {
- writer.writeString(
- 2,
- f
- );
- }
- };
- /**
- * optional bool is_published = 1;
- * @return {boolean}
- */
- proto.PublishedBeforeJoystream.prototype.getIsPublished = function() {
- return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));
- };
- /**
- * @param {boolean} value
- * @return {!proto.PublishedBeforeJoystream} returns this
- */
- proto.PublishedBeforeJoystream.prototype.setIsPublished = function(value) {
- return jspb.Message.setField(this, 1, value);
- };
- /**
- * Clears the field making it undefined.
- * @return {!proto.PublishedBeforeJoystream} returns this
- */
- proto.PublishedBeforeJoystream.prototype.clearIsPublished = function() {
- return jspb.Message.setField(this, 1, undefined);
- };
- /**
- * Returns whether this field is set.
- * @return {boolean}
- */
- proto.PublishedBeforeJoystream.prototype.hasIsPublished = function() {
- return jspb.Message.getField(this, 1) != null;
- };
- /**
- * optional string date = 2;
- * @return {string}
- */
- proto.PublishedBeforeJoystream.prototype.getDate = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
- };
- /**
- * @param {string} value
- * @return {!proto.PublishedBeforeJoystream} returns this
- */
- proto.PublishedBeforeJoystream.prototype.setDate = function(value) {
- return jspb.Message.setField(this, 2, value);
- };
- /**
- * Clears the field making it undefined.
- * @return {!proto.PublishedBeforeJoystream} returns this
- */
- proto.PublishedBeforeJoystream.prototype.clearDate = function() {
- return jspb.Message.setField(this, 2, undefined);
- };
- /**
- * Returns whether this field is set.
- * @return {boolean}
- */
- proto.PublishedBeforeJoystream.prototype.hasDate = function() {
- return jspb.Message.getField(this, 2) != null;
- };
- if (jspb.Message.GENERATE_TO_OBJECT) {
- /**
- * Creates an object representation of this proto.
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
- * Optional fields that are not set will be set to undefined.
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
- * For the list of reserved names please see:
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
- * JSPB instance for transitional soy proto support:
- * http://goto/soy-param-migration
- * @return {!Object}
- */
- proto.License.prototype.toObject = function(opt_includeInstance) {
- return proto.License.toObject(opt_includeInstance, this);
- };
- /**
- * Static version of the {@see toObject} method.
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
- * the JSPB instance for transitional soy proto support:
- * http://goto/soy-param-migration
- * @param {!proto.License} msg The msg instance to transform.
- * @return {!Object}
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
- proto.License.toObject = function(includeInstance, msg) {
- var f, obj = {
- code: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f,
- attribution: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f,
- customText: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f
- };
- if (includeInstance) {
- obj.$jspbMessageInstance = msg;
- }
- return obj;
- };
- }
- /**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.License}
- */
- proto.License.deserializeBinary = function(bytes) {
- var reader = new jspb.BinaryReader(bytes);
- var msg = new proto.License;
- return proto.License.deserializeBinaryFromReader(msg, reader);
- };
- /**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.License} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.License}
- */
- proto.License.deserializeBinaryFromReader = function(msg, reader) {
- while (reader.nextField()) {
- if (reader.isEndGroup()) {
- break;
- }
- var field = reader.getFieldNumber();
- switch (field) {
- case 1:
- var value = /** @type {number} */ (reader.readUint32());
- msg.setCode(value);
- break;
- case 2:
- var value = /** @type {string} */ (reader.readString());
- msg.setAttribution(value);
- break;
- case 3:
- var value = /** @type {string} */ (reader.readString());
- msg.setCustomText(value);
- break;
- default:
- reader.skipField();
- break;
- }
- }
- return msg;
- };
- /**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
- proto.License.prototype.serializeBinary = function() {
- var writer = new jspb.BinaryWriter();
- proto.License.serializeBinaryToWriter(this, writer);
- return writer.getResultBuffer();
- };
- /**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.License} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
- proto.License.serializeBinaryToWriter = function(message, writer) {
- var f = undefined;
- f = /** @type {number} */ (jspb.Message.getField(message, 1));
- if (f != null) {
- writer.writeUint32(
- 1,
- f
- );
- }
- f = /** @type {string} */ (jspb.Message.getField(message, 2));
- if (f != null) {
- writer.writeString(
- 2,
- f
- );
- }
- f = /** @type {string} */ (jspb.Message.getField(message, 3));
- if (f != null) {
- writer.writeString(
- 3,
- f
- );
- }
- };
- /**
- * optional uint32 code = 1;
- * @return {number}
- */
- proto.License.prototype.getCode = function() {
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
- };
- /**
- * @param {number} value
- * @return {!proto.License} returns this
- */
- proto.License.prototype.setCode = function(value) {
- return jspb.Message.setField(this, 1, value);
- };
- /**
- * Clears the field making it undefined.
- * @return {!proto.License} returns this
- */
- proto.License.prototype.clearCode = function() {
- return jspb.Message.setField(this, 1, undefined);
- };
- /**
- * Returns whether this field is set.
- * @return {boolean}
- */
- proto.License.prototype.hasCode = function() {
- return jspb.Message.getField(this, 1) != null;
- };
- /**
- * optional string attribution = 2;
- * @return {string}
- */
- proto.License.prototype.getAttribution = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
- };
- /**
- * @param {string} value
- * @return {!proto.License} returns this
- */
- proto.License.prototype.setAttribution = function(value) {
- return jspb.Message.setField(this, 2, value);
- };
- /**
- * Clears the field making it undefined.
- * @return {!proto.License} returns this
- */
- proto.License.prototype.clearAttribution = function() {
- return jspb.Message.setField(this, 2, undefined);
- };
- /**
- * Returns whether this field is set.
- * @return {boolean}
- */
- proto.License.prototype.hasAttribution = function() {
- return jspb.Message.getField(this, 2) != null;
- };
- /**
- * optional string custom_text = 3;
- * @return {string}
- */
- proto.License.prototype.getCustomText = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
- };
- /**
- * @param {string} value
- * @return {!proto.License} returns this
- */
- proto.License.prototype.setCustomText = function(value) {
- return jspb.Message.setField(this, 3, value);
- };
- /**
- * Clears the field making it undefined.
- * @return {!proto.License} returns this
- */
- proto.License.prototype.clearCustomText = function() {
- return jspb.Message.setField(this, 3, undefined);
- };
- /**
- * Returns whether this field is set.
- * @return {boolean}
- */
- proto.License.prototype.hasCustomText = function() {
- return jspb.Message.getField(this, 3) != null;
- };
- if (jspb.Message.GENERATE_TO_OBJECT) {
- /**
- * Creates an object representation of this proto.
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
- * Optional fields that are not set will be set to undefined.
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
- * For the list of reserved names please see:
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
- * JSPB instance for transitional soy proto support:
- * http://goto/soy-param-migration
- * @return {!Object}
- */
- proto.MediaType.prototype.toObject = function(opt_includeInstance) {
- return proto.MediaType.toObject(opt_includeInstance, this);
- };
- /**
- * Static version of the {@see toObject} method.
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
- * the JSPB instance for transitional soy proto support:
- * http://goto/soy-param-migration
- * @param {!proto.MediaType} msg The msg instance to transform.
- * @return {!Object}
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
- proto.MediaType.toObject = function(includeInstance, msg) {
- var f, obj = {
- codecName: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f,
- container: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f,
- mimeMediaType: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f
- };
- if (includeInstance) {
- obj.$jspbMessageInstance = msg;
- }
- return obj;
- };
- }
- /**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.MediaType}
- */
- proto.MediaType.deserializeBinary = function(bytes) {
- var reader = new jspb.BinaryReader(bytes);
- var msg = new proto.MediaType;
- return proto.MediaType.deserializeBinaryFromReader(msg, reader);
- };
- /**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.MediaType} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.MediaType}
- */
- proto.MediaType.deserializeBinaryFromReader = function(msg, reader) {
- while (reader.nextField()) {
- if (reader.isEndGroup()) {
- break;
- }
- var field = reader.getFieldNumber();
- switch (field) {
- case 1:
- var value = /** @type {string} */ (reader.readString());
- msg.setCodecName(value);
- break;
- case 2:
- var value = /** @type {string} */ (reader.readString());
- msg.setContainer(value);
- break;
- case 3:
- var value = /** @type {string} */ (reader.readString());
- msg.setMimeMediaType(value);
- break;
- default:
- reader.skipField();
- break;
- }
- }
- return msg;
- };
- /**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
- proto.MediaType.prototype.serializeBinary = function() {
- var writer = new jspb.BinaryWriter();
- proto.MediaType.serializeBinaryToWriter(this, writer);
- return writer.getResultBuffer();
- };
- /**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.MediaType} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
- proto.MediaType.serializeBinaryToWriter = function(message, writer) {
- var f = undefined;
- f = /** @type {string} */ (jspb.Message.getField(message, 1));
- if (f != null) {
- writer.writeString(
- 1,
- f
- );
- }
- f = /** @type {string} */ (jspb.Message.getField(message, 2));
- if (f != null) {
- writer.writeString(
- 2,
- f
- );
- }
- f = /** @type {string} */ (jspb.Message.getField(message, 3));
- if (f != null) {
- writer.writeString(
- 3,
- f
- );
- }
- };
- /**
- * optional string codec_name = 1;
- * @return {string}
- */
- proto.MediaType.prototype.getCodecName = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
- };
- /**
- * @param {string} value
- * @return {!proto.MediaType} returns this
- */
- proto.MediaType.prototype.setCodecName = function(value) {
- return jspb.Message.setField(this, 1, value);
- };
- /**
- * Clears the field making it undefined.
- * @return {!proto.MediaType} returns this
- */
- proto.MediaType.prototype.clearCodecName = function() {
- return jspb.Message.setField(this, 1, undefined);
- };
- /**
- * Returns whether this field is set.
- * @return {boolean}
- */
- proto.MediaType.prototype.hasCodecName = function() {
- return jspb.Message.getField(this, 1) != null;
- };
- /**
- * optional string container = 2;
- * @return {string}
- */
- proto.MediaType.prototype.getContainer = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
- };
- /**
- * @param {string} value
- * @return {!proto.MediaType} returns this
- */
- proto.MediaType.prototype.setContainer = function(value) {
- return jspb.Message.setField(this, 2, value);
- };
- /**
- * Clears the field making it undefined.
- * @return {!proto.MediaType} returns this
- */
- proto.MediaType.prototype.clearContainer = function() {
- return jspb.Message.setField(this, 2, undefined);
- };
- /**
- * Returns whether this field is set.
- * @return {boolean}
- */
- proto.MediaType.prototype.hasContainer = function() {
- return jspb.Message.getField(this, 2) != null;
- };
- /**
- * optional string mime_media_type = 3;
- * @return {string}
- */
- proto.MediaType.prototype.getMimeMediaType = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
- };
- /**
- * @param {string} value
- * @return {!proto.MediaType} returns this
- */
- proto.MediaType.prototype.setMimeMediaType = function(value) {
- return jspb.Message.setField(this, 3, value);
- };
- /**
- * Clears the field making it undefined.
- * @return {!proto.MediaType} returns this
- */
- proto.MediaType.prototype.clearMimeMediaType = function() {
- return jspb.Message.setField(this, 3, undefined);
- };
- /**
- * Returns whether this field is set.
- * @return {boolean}
- */
- proto.MediaType.prototype.hasMimeMediaType = function() {
- return jspb.Message.getField(this, 3) != null;
- };
- /**
- * List of repeated fields within this message type.
- * @private {!Array<number>}
- * @const
- */
- proto.VideoMetadata.repeatedFields_ = [15];
- if (jspb.Message.GENERATE_TO_OBJECT) {
- /**
- * Creates an object representation of this proto.
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
- * Optional fields that are not set will be set to undefined.
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
- * For the list of reserved names please see:
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
- * JSPB instance for transitional soy proto support:
- * http://goto/soy-param-migration
- * @return {!Object}
- */
- proto.VideoMetadata.prototype.toObject = function(opt_includeInstance) {
- return proto.VideoMetadata.toObject(opt_includeInstance, this);
- };
- /**
- * Static version of the {@see toObject} method.
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
- * the JSPB instance for transitional soy proto support:
- * http://goto/soy-param-migration
- * @param {!proto.VideoMetadata} msg The msg instance to transform.
- * @return {!Object}
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
- proto.VideoMetadata.toObject = function(includeInstance, msg) {
- var f, obj = {
- title: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f,
- description: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f,
- video: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f,
- thumbnailPhoto: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f,
- duration: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f,
- mediaPixelHeight: (f = jspb.Message.getField(msg, 6)) == null ? undefined : f,
- mediaPixelWidth: (f = jspb.Message.getField(msg, 7)) == null ? undefined : f,
- mediaType: (f = msg.getMediaType()) && proto.MediaType.toObject(includeInstance, f),
- language: (f = jspb.Message.getField(msg, 9)) == null ? undefined : f,
- license: (f = msg.getLicense()) && proto.License.toObject(includeInstance, f),
- publishedBeforeJoystream: (f = msg.getPublishedBeforeJoystream()) && proto.PublishedBeforeJoystream.toObject(includeInstance, f),
- hasMarketing: (f = jspb.Message.getBooleanField(msg, 12)) == null ? undefined : f,
- isPublic: (f = jspb.Message.getBooleanField(msg, 13)) == null ? undefined : f,
- isExplicit: (f = jspb.Message.getBooleanField(msg, 14)) == null ? undefined : f,
- personsList: (f = jspb.Message.getRepeatedField(msg, 15)) == null ? undefined : f,
- category: (f = jspb.Message.getField(msg, 16)) == null ? undefined : f
- };
- if (includeInstance) {
- obj.$jspbMessageInstance = msg;
- }
- return obj;
- };
- }
- /**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.VideoMetadata}
- */
- proto.VideoMetadata.deserializeBinary = function(bytes) {
- var reader = new jspb.BinaryReader(bytes);
- var msg = new proto.VideoMetadata;
- return proto.VideoMetadata.deserializeBinaryFromReader(msg, reader);
- };
- /**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.VideoMetadata} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.VideoMetadata}
- */
- proto.VideoMetadata.deserializeBinaryFromReader = function(msg, reader) {
- while (reader.nextField()) {
- if (reader.isEndGroup()) {
- break;
- }
- var field = reader.getFieldNumber();
- switch (field) {
- case 1:
- var value = /** @type {string} */ (reader.readString());
- msg.setTitle(value);
- break;
- case 2:
- var value = /** @type {string} */ (reader.readString());
- msg.setDescription(value);
- break;
- case 3:
- var value = /** @type {number} */ (reader.readUint32());
- msg.setVideo(value);
- break;
- case 4:
- var value = /** @type {number} */ (reader.readUint32());
- msg.setThumbnailPhoto(value);
- break;
- case 5:
- var value = /** @type {number} */ (reader.readUint32());
- msg.setDuration(value);
- break;
- case 6:
- var value = /** @type {number} */ (reader.readUint32());
- msg.setMediaPixelHeight(value);
- break;
- case 7:
- var value = /** @type {number} */ (reader.readUint32());
- msg.setMediaPixelWidth(value);
- break;
- case 8:
- var value = new proto.MediaType;
- reader.readMessage(value,proto.MediaType.deserializeBinaryFromReader);
- msg.setMediaType(value);
- break;
- case 9:
- var value = /** @type {string} */ (reader.readString());
- msg.setLanguage(value);
- break;
- case 10:
- var value = new proto.License;
- reader.readMessage(value,proto.License.deserializeBinaryFromReader);
- msg.setLicense(value);
- break;
- case 11:
- var value = new proto.PublishedBeforeJoystream;
- reader.readMessage(value,proto.PublishedBeforeJoystream.deserializeBinaryFromReader);
- msg.setPublishedBeforeJoystream(value);
- break;
- case 12:
- var value = /** @type {boolean} */ (reader.readBool());
- msg.setHasMarketing(value);
- break;
- case 13:
- var value = /** @type {boolean} */ (reader.readBool());
- msg.setIsPublic(value);
- break;
- case 14:
- var value = /** @type {boolean} */ (reader.readBool());
- msg.setIsExplicit(value);
- break;
- case 15:
- var values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedUint64() : [reader.readUint64()]);
- for (var i = 0; i < values.length; i++) {
- msg.addPersons(values[i]);
- }
- break;
- case 16:
- var value = /** @type {number} */ (reader.readUint64());
- msg.setCategory(value);
- break;
- default:
- reader.skipField();
- break;
- }
- }
- return msg;
- };
- /**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
- proto.VideoMetadata.prototype.serializeBinary = function() {
- var writer = new jspb.BinaryWriter();
- proto.VideoMetadata.serializeBinaryToWriter(this, writer);
- return writer.getResultBuffer();
- };
- /**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.VideoMetadata} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
- proto.VideoMetadata.serializeBinaryToWriter = function(message, writer) {
- var f = undefined;
- f = /** @type {string} */ (jspb.Message.getField(message, 1));
- if (f != null) {
- writer.writeString(
- 1,
- f
- );
- }
- f = /** @type {string} */ (jspb.Message.getField(message, 2));
- if (f != null) {
- writer.writeString(
- 2,
- f
- );
- }
- f = /** @type {number} */ (jspb.Message.getField(message, 3));
- if (f != null) {
- writer.writeUint32(
- 3,
- f
- );
- }
- f = /** @type {number} */ (jspb.Message.getField(message, 4));
- if (f != null) {
- writer.writeUint32(
- 4,
- f
- );
- }
- f = /** @type {number} */ (jspb.Message.getField(message, 5));
- if (f != null) {
- writer.writeUint32(
- 5,
- f
- );
- }
- f = /** @type {number} */ (jspb.Message.getField(message, 6));
- if (f != null) {
- writer.writeUint32(
- 6,
- f
- );
- }
- f = /** @type {number} */ (jspb.Message.getField(message, 7));
- if (f != null) {
- writer.writeUint32(
- 7,
- f
- );
- }
- f = message.getMediaType();
- if (f != null) {
- writer.writeMessage(
- 8,
- f,
- proto.MediaType.serializeBinaryToWriter
- );
- }
- f = /** @type {string} */ (jspb.Message.getField(message, 9));
- if (f != null) {
- writer.writeString(
- 9,
- f
- );
- }
- f = message.getLicense();
- if (f != null) {
- writer.writeMessage(
- 10,
- f,
- proto.License.serializeBinaryToWriter
- );
- }
- f = message.getPublishedBeforeJoystream();
- if (f != null) {
- writer.writeMessage(
- 11,
- f,
- proto.PublishedBeforeJoystream.serializeBinaryToWriter
- );
- }
- f = /** @type {boolean} */ (jspb.Message.getField(message, 12));
- if (f != null) {
- writer.writeBool(
- 12,
- f
- );
- }
- f = /** @type {boolean} */ (jspb.Message.getField(message, 13));
- if (f != null) {
- writer.writeBool(
- 13,
- f
- );
- }
- f = /** @type {boolean} */ (jspb.Message.getField(message, 14));
- if (f != null) {
- writer.writeBool(
- 14,
- f
- );
- }
- f = message.getPersonsList();
- if (f.length > 0) {
- writer.writePackedUint64(
- 15,
- f
- );
- }
- f = /** @type {number} */ (jspb.Message.getField(message, 16));
- if (f != null) {
- writer.writeUint64(
- 16,
- f
- );
- }
- };
- /**
- * optional string title = 1;
- * @return {string}
- */
- proto.VideoMetadata.prototype.getTitle = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
- };
- /**
- * @param {string} value
- * @return {!proto.VideoMetadata} returns this
- */
- proto.VideoMetadata.prototype.setTitle = function(value) {
- return jspb.Message.setField(this, 1, value);
- };
- /**
- * Clears the field making it undefined.
- * @return {!proto.VideoMetadata} returns this
- */
- proto.VideoMetadata.prototype.clearTitle = function() {
- return jspb.Message.setField(this, 1, undefined);
- };
- /**
- * Returns whether this field is set.
- * @return {boolean}
- */
- proto.VideoMetadata.prototype.hasTitle = function() {
- return jspb.Message.getField(this, 1) != null;
- };
- /**
- * optional string description = 2;
- * @return {string}
- */
- proto.VideoMetadata.prototype.getDescription = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
- };
- /**
- * @param {string} value
- * @return {!proto.VideoMetadata} returns this
- */
- proto.VideoMetadata.prototype.setDescription = function(value) {
- return jspb.Message.setField(this, 2, value);
- };
- /**
- * Clears the field making it undefined.
- * @return {!proto.VideoMetadata} returns this
- */
- proto.VideoMetadata.prototype.clearDescription = function() {
- return jspb.Message.setField(this, 2, undefined);
- };
- /**
- * Returns whether this field is set.
- * @return {boolean}
- */
- proto.VideoMetadata.prototype.hasDescription = function() {
- return jspb.Message.getField(this, 2) != null;
- };
- /**
- * optional uint32 video = 3;
- * @return {number}
- */
- proto.VideoMetadata.prototype.getVideo = function() {
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
- };
- /**
- * @param {number} value
- * @return {!proto.VideoMetadata} returns this
- */
- proto.VideoMetadata.prototype.setVideo = function(value) {
- return jspb.Message.setField(this, 3, value);
- };
- /**
- * Clears the field making it undefined.
- * @return {!proto.VideoMetadata} returns this
- */
- proto.VideoMetadata.prototype.clearVideo = function() {
- return jspb.Message.setField(this, 3, undefined);
- };
- /**
- * Returns whether this field is set.
- * @return {boolean}
- */
- proto.VideoMetadata.prototype.hasVideo = function() {
- return jspb.Message.getField(this, 3) != null;
- };
- /**
- * optional uint32 thumbnail_photo = 4;
- * @return {number}
- */
- proto.VideoMetadata.prototype.getThumbnailPhoto = function() {
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
- };
- /**
- * @param {number} value
- * @return {!proto.VideoMetadata} returns this
- */
- proto.VideoMetadata.prototype.setThumbnailPhoto = function(value) {
- return jspb.Message.setField(this, 4, value);
- };
- /**
- * Clears the field making it undefined.
- * @return {!proto.VideoMetadata} returns this
- */
- proto.VideoMetadata.prototype.clearThumbnailPhoto = function() {
- return jspb.Message.setField(this, 4, undefined);
- };
- /**
- * Returns whether this field is set.
- * @return {boolean}
- */
- proto.VideoMetadata.prototype.hasThumbnailPhoto = function() {
- return jspb.Message.getField(this, 4) != null;
- };
- /**
- * optional uint32 duration = 5;
- * @return {number}
- */
- proto.VideoMetadata.prototype.getDuration = function() {
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
- };
- /**
- * @param {number} value
- * @return {!proto.VideoMetadata} returns this
- */
- proto.VideoMetadata.prototype.setDuration = function(value) {
- return jspb.Message.setField(this, 5, value);
- };
- /**
- * Clears the field making it undefined.
- * @return {!proto.VideoMetadata} returns this
- */
- proto.VideoMetadata.prototype.clearDuration = function() {
- return jspb.Message.setField(this, 5, undefined);
- };
- /**
- * Returns whether this field is set.
- * @return {boolean}
- */
- proto.VideoMetadata.prototype.hasDuration = function() {
- return jspb.Message.getField(this, 5) != null;
- };
- /**
- * optional uint32 media_pixel_height = 6;
- * @return {number}
- */
- proto.VideoMetadata.prototype.getMediaPixelHeight = function() {
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
- };
- /**
- * @param {number} value
- * @return {!proto.VideoMetadata} returns this
- */
- proto.VideoMetadata.prototype.setMediaPixelHeight = function(value) {
- return jspb.Message.setField(this, 6, value);
- };
- /**
- * Clears the field making it undefined.
- * @return {!proto.VideoMetadata} returns this
- */
- proto.VideoMetadata.prototype.clearMediaPixelHeight = function() {
- return jspb.Message.setField(this, 6, undefined);
- };
- /**
- * Returns whether this field is set.
- * @return {boolean}
- */
- proto.VideoMetadata.prototype.hasMediaPixelHeight = function() {
- return jspb.Message.getField(this, 6) != null;
- };
- /**
- * optional uint32 media_pixel_width = 7;
- * @return {number}
- */
- proto.VideoMetadata.prototype.getMediaPixelWidth = function() {
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
- };
- /**
- * @param {number} value
- * @return {!proto.VideoMetadata} returns this
- */
- proto.VideoMetadata.prototype.setMediaPixelWidth = function(value) {
- return jspb.Message.setField(this, 7, value);
- };
- /**
- * Clears the field making it undefined.
- * @return {!proto.VideoMetadata} returns this
- */
- proto.VideoMetadata.prototype.clearMediaPixelWidth = function() {
- return jspb.Message.setField(this, 7, undefined);
- };
- /**
- * Returns whether this field is set.
- * @return {boolean}
- */
- proto.VideoMetadata.prototype.hasMediaPixelWidth = function() {
- return jspb.Message.getField(this, 7) != null;
- };
- /**
- * optional MediaType media_type = 8;
- * @return {?proto.MediaType}
- */
- proto.VideoMetadata.prototype.getMediaType = function() {
- return /** @type{?proto.MediaType} */ (
- jspb.Message.getWrapperField(this, proto.MediaType, 8));
- };
- /**
- * @param {?proto.MediaType|undefined} value
- * @return {!proto.VideoMetadata} returns this
- */
- proto.VideoMetadata.prototype.setMediaType = function(value) {
- return jspb.Message.setWrapperField(this, 8, value);
- };
- /**
- * Clears the message field making it undefined.
- * @return {!proto.VideoMetadata} returns this
- */
- proto.VideoMetadata.prototype.clearMediaType = function() {
- return this.setMediaType(undefined);
- };
- /**
- * Returns whether this field is set.
- * @return {boolean}
- */
- proto.VideoMetadata.prototype.hasMediaType = function() {
- return jspb.Message.getField(this, 8) != null;
- };
- /**
- * optional string language = 9;
- * @return {string}
- */
- proto.VideoMetadata.prototype.getLanguage = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
- };
- /**
- * @param {string} value
- * @return {!proto.VideoMetadata} returns this
- */
- proto.VideoMetadata.prototype.setLanguage = function(value) {
- return jspb.Message.setField(this, 9, value);
- };
- /**
- * Clears the field making it undefined.
- * @return {!proto.VideoMetadata} returns this
- */
- proto.VideoMetadata.prototype.clearLanguage = function() {
- return jspb.Message.setField(this, 9, undefined);
- };
- /**
- * Returns whether this field is set.
- * @return {boolean}
- */
- proto.VideoMetadata.prototype.hasLanguage = function() {
- return jspb.Message.getField(this, 9) != null;
- };
- /**
- * optional License license = 10;
- * @return {?proto.License}
- */
- proto.VideoMetadata.prototype.getLicense = function() {
- return /** @type{?proto.License} */ (
- jspb.Message.getWrapperField(this, proto.License, 10));
- };
- /**
- * @param {?proto.License|undefined} value
- * @return {!proto.VideoMetadata} returns this
- */
- proto.VideoMetadata.prototype.setLicense = function(value) {
- return jspb.Message.setWrapperField(this, 10, value);
- };
- /**
- * Clears the message field making it undefined.
- * @return {!proto.VideoMetadata} returns this
- */
- proto.VideoMetadata.prototype.clearLicense = function() {
- return this.setLicense(undefined);
- };
- /**
- * Returns whether this field is set.
- * @return {boolean}
- */
- proto.VideoMetadata.prototype.hasLicense = function() {
- return jspb.Message.getField(this, 10) != null;
- };
- /**
- * optional PublishedBeforeJoystream published_before_joystream = 11;
- * @return {?proto.PublishedBeforeJoystream}
- */
- proto.VideoMetadata.prototype.getPublishedBeforeJoystream = function() {
- return /** @type{?proto.PublishedBeforeJoystream} */ (
- jspb.Message.getWrapperField(this, proto.PublishedBeforeJoystream, 11));
- };
- /**
- * @param {?proto.PublishedBeforeJoystream|undefined} value
- * @return {!proto.VideoMetadata} returns this
- */
- proto.VideoMetadata.prototype.setPublishedBeforeJoystream = function(value) {
- return jspb.Message.setWrapperField(this, 11, value);
- };
- /**
- * Clears the message field making it undefined.
- * @return {!proto.VideoMetadata} returns this
- */
- proto.VideoMetadata.prototype.clearPublishedBeforeJoystream = function() {
- return this.setPublishedBeforeJoystream(undefined);
- };
- /**
- * Returns whether this field is set.
- * @return {boolean}
- */
- proto.VideoMetadata.prototype.hasPublishedBeforeJoystream = function() {
- return jspb.Message.getField(this, 11) != null;
- };
- /**
- * optional bool has_marketing = 12;
- * @return {boolean}
- */
- proto.VideoMetadata.prototype.getHasMarketing = function() {
- return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 12, false));
- };
- /**
- * @param {boolean} value
- * @return {!proto.VideoMetadata} returns this
- */
- proto.VideoMetadata.prototype.setHasMarketing = function(value) {
- return jspb.Message.setField(this, 12, value);
- };
- /**
- * Clears the field making it undefined.
- * @return {!proto.VideoMetadata} returns this
- */
- proto.VideoMetadata.prototype.clearHasMarketing = function() {
- return jspb.Message.setField(this, 12, undefined);
- };
- /**
- * Returns whether this field is set.
- * @return {boolean}
- */
- proto.VideoMetadata.prototype.hasHasMarketing = function() {
- return jspb.Message.getField(this, 12) != null;
- };
- /**
- * optional bool is_public = 13;
- * @return {boolean}
- */
- proto.VideoMetadata.prototype.getIsPublic = function() {
- return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 13, false));
- };
- /**
- * @param {boolean} value
- * @return {!proto.VideoMetadata} returns this
- */
- proto.VideoMetadata.prototype.setIsPublic = function(value) {
- return jspb.Message.setField(this, 13, value);
- };
- /**
- * Clears the field making it undefined.
- * @return {!proto.VideoMetadata} returns this
- */
- proto.VideoMetadata.prototype.clearIsPublic = function() {
- return jspb.Message.setField(this, 13, undefined);
- };
- /**
- * Returns whether this field is set.
- * @return {boolean}
- */
- proto.VideoMetadata.prototype.hasIsPublic = function() {
- return jspb.Message.getField(this, 13) != null;
- };
- /**
- * optional bool is_explicit = 14;
- * @return {boolean}
- */
- proto.VideoMetadata.prototype.getIsExplicit = function() {
- return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 14, false));
- };
- /**
- * @param {boolean} value
- * @return {!proto.VideoMetadata} returns this
- */
- proto.VideoMetadata.prototype.setIsExplicit = function(value) {
- return jspb.Message.setField(this, 14, value);
- };
- /**
- * Clears the field making it undefined.
- * @return {!proto.VideoMetadata} returns this
- */
- proto.VideoMetadata.prototype.clearIsExplicit = function() {
- return jspb.Message.setField(this, 14, undefined);
- };
- /**
- * Returns whether this field is set.
- * @return {boolean}
- */
- proto.VideoMetadata.prototype.hasIsExplicit = function() {
- return jspb.Message.getField(this, 14) != null;
- };
- /**
- * repeated uint64 persons = 15;
- * @return {!Array<number>}
- */
- proto.VideoMetadata.prototype.getPersonsList = function() {
- return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 15));
- };
- /**
- * @param {!Array<number>} value
- * @return {!proto.VideoMetadata} returns this
- */
- proto.VideoMetadata.prototype.setPersonsList = function(value) {
- return jspb.Message.setField(this, 15, value || []);
- };
- /**
- * @param {number} value
- * @param {number=} opt_index
- * @return {!proto.VideoMetadata} returns this
- */
- proto.VideoMetadata.prototype.addPersons = function(value, opt_index) {
- return jspb.Message.addToRepeatedField(this, 15, value, opt_index);
- };
- /**
- * Clears the list making it empty but non-null.
- * @return {!proto.VideoMetadata} returns this
- */
- proto.VideoMetadata.prototype.clearPersonsList = function() {
- return this.setPersonsList([]);
- };
- /**
- * optional uint64 category = 16;
- * @return {number}
- */
- proto.VideoMetadata.prototype.getCategory = function() {
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0));
- };
- /**
- * @param {number} value
- * @return {!proto.VideoMetadata} returns this
- */
- proto.VideoMetadata.prototype.setCategory = function(value) {
- return jspb.Message.setField(this, 16, value);
- };
- /**
- * Clears the field making it undefined.
- * @return {!proto.VideoMetadata} returns this
- */
- proto.VideoMetadata.prototype.clearCategory = function() {
- return jspb.Message.setField(this, 16, undefined);
- };
- /**
- * Returns whether this field is set.
- * @return {boolean}
- */
- proto.VideoMetadata.prototype.hasCategory = function() {
- return jspb.Message.getField(this, 16) != null;
- };
- if (jspb.Message.GENERATE_TO_OBJECT) {
- /**
- * Creates an object representation of this proto.
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
- * Optional fields that are not set will be set to undefined.
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
- * For the list of reserved names please see:
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
- * JSPB instance for transitional soy proto support:
- * http://goto/soy-param-migration
- * @return {!Object}
- */
- proto.VideoCategoryMetadata.prototype.toObject = function(opt_includeInstance) {
- return proto.VideoCategoryMetadata.toObject(opt_includeInstance, this);
- };
- /**
- * Static version of the {@see toObject} method.
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
- * the JSPB instance for transitional soy proto support:
- * http://goto/soy-param-migration
- * @param {!proto.VideoCategoryMetadata} msg The msg instance to transform.
- * @return {!Object}
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
- proto.VideoCategoryMetadata.toObject = function(includeInstance, msg) {
- var f, obj = {
- name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f
- };
- if (includeInstance) {
- obj.$jspbMessageInstance = msg;
- }
- return obj;
- };
- }
- /**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.VideoCategoryMetadata}
- */
- proto.VideoCategoryMetadata.deserializeBinary = function(bytes) {
- var reader = new jspb.BinaryReader(bytes);
- var msg = new proto.VideoCategoryMetadata;
- return proto.VideoCategoryMetadata.deserializeBinaryFromReader(msg, reader);
- };
- /**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.VideoCategoryMetadata} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.VideoCategoryMetadata}
- */
- proto.VideoCategoryMetadata.deserializeBinaryFromReader = function(msg, reader) {
- while (reader.nextField()) {
- if (reader.isEndGroup()) {
- break;
- }
- var field = reader.getFieldNumber();
- switch (field) {
- case 1:
- var value = /** @type {string} */ (reader.readString());
- msg.setName(value);
- break;
- default:
- reader.skipField();
- break;
- }
- }
- return msg;
- };
- /**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
- proto.VideoCategoryMetadata.prototype.serializeBinary = function() {
- var writer = new jspb.BinaryWriter();
- proto.VideoCategoryMetadata.serializeBinaryToWriter(this, writer);
- return writer.getResultBuffer();
- };
- /**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.VideoCategoryMetadata} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
- proto.VideoCategoryMetadata.serializeBinaryToWriter = function(message, writer) {
- var f = undefined;
- f = /** @type {string} */ (jspb.Message.getField(message, 1));
- if (f != null) {
- writer.writeString(
- 1,
- f
- );
- }
- };
- /**
- * optional string name = 1;
- * @return {string}
- */
- proto.VideoCategoryMetadata.prototype.getName = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
- };
- /**
- * @param {string} value
- * @return {!proto.VideoCategoryMetadata} returns this
- */
- proto.VideoCategoryMetadata.prototype.setName = function(value) {
- return jspb.Message.setField(this, 1, value);
- };
- /**
- * Clears the field making it undefined.
- * @return {!proto.VideoCategoryMetadata} returns this
- */
- proto.VideoCategoryMetadata.prototype.clearName = function() {
- return jspb.Message.setField(this, 1, undefined);
- };
- /**
- * Returns whether this field is set.
- * @return {boolean}
- */
- proto.VideoCategoryMetadata.prototype.hasName = function() {
- return jspb.Message.getField(this, 1) != null;
- };
- goog.object.extend(exports, proto);
|