1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846 |
- // source: proto/Video.proto
- /**
- * @fileoverview
- * @enhanceable
- * @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);
|