123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740 |
- // 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, null, 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;
- };
- 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
- };
- 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;
- 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
- );
- }
- };
- /**
- * 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;
- };
- 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);
|