UNPKG

echofi-client

Version:

A comprehensive TypeScript/JavaScript client library for EchoFi services with automatic gRPC-Web code generation, unified service access, and real-time WebSocket communication.

1,006 lines (864 loc) 29.1 kB
// source: activity/user_favorite.proto /** * @fileoverview * @enhanceable * @suppress {missingRequire} reports error on implicit type usages. * @suppress {messageConventions} JS Compiler reports an error if a variable or * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! /* eslint-disable */ // @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = (function() { if (this) { return this; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } if (typeof self !== 'undefined') { return self; } return Function('return this')(); }.call(null)); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); goog.object.extend(proto, google_protobuf_timestamp_pb); var music_track_pb = require('../music/track_pb.js'); goog.object.extend(proto, music_track_pb); var music_album_pb = require('../music/album_pb.js'); goog.object.extend(proto, music_album_pb); var music_artist_pb = require('../music/artist_pb.js'); goog.object.extend(proto, music_artist_pb); goog.exportSymbol('proto.activity.AlbumWithArtist', null, global); goog.exportSymbol('proto.activity.TrackWithArtist', null, global); goog.exportSymbol('proto.activity.UserFavorite', null, global); goog.exportSymbol('proto.activity.UserFavorite.ItemMetadataCase', 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.activity.UserFavorite = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.activity.UserFavorite.oneofGroups_); }; goog.inherits(proto.activity.UserFavorite, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.activity.UserFavorite.displayName = 'proto.activity.UserFavorite'; } /** * 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.activity.TrackWithArtist = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.activity.TrackWithArtist, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.activity.TrackWithArtist.displayName = 'proto.activity.TrackWithArtist'; } /** * 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.activity.AlbumWithArtist = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.activity.AlbumWithArtist, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.activity.AlbumWithArtist.displayName = 'proto.activity.AlbumWithArtist'; } /** * Oneof group definitions for this message. Each group defines the field * numbers belonging to that group. When of these fields' value is set, all * other fields in the group are cleared. During deserialization, if multiple * fields are encountered for a group, only the last value seen will be kept. * @private {!Array<!Array<number>>} * @const */ proto.activity.UserFavorite.oneofGroups_ = [[6,7,8]]; /** * @enum {number} */ proto.activity.UserFavorite.ItemMetadataCase = { ITEM_METADATA_NOT_SET: 0, TRACK: 6, ALBUM: 7, ARTIST: 8 }; /** * @return {proto.activity.UserFavorite.ItemMetadataCase} */ proto.activity.UserFavorite.prototype.getItemMetadataCase = function() { return /** @type {proto.activity.UserFavorite.ItemMetadataCase} */(jspb.Message.computeOneofCase(this, proto.activity.UserFavorite.oneofGroups_[0])); }; 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.activity.UserFavorite.prototype.toObject = function(opt_includeInstance) { return proto.activity.UserFavorite.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.activity.UserFavorite} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.activity.UserFavorite.toObject = function(includeInstance, msg) { var f, obj = { favoriteId: jspb.Message.getFieldWithDefault(msg, 1, 0), userId: jspb.Message.getFieldWithDefault(msg, 2, ""), itemType: jspb.Message.getFieldWithDefault(msg, 3, ""), itemId: jspb.Message.getFieldWithDefault(msg, 4, 0), dateAdded: (f = msg.getDateAdded()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), track: (f = msg.getTrack()) && proto.activity.TrackWithArtist.toObject(includeInstance, f), album: (f = msg.getAlbum()) && proto.activity.AlbumWithArtist.toObject(includeInstance, f), artist: (f = msg.getArtist()) && music_artist_pb.Artist.toObject(includeInstance, 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.activity.UserFavorite} */ proto.activity.UserFavorite.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.activity.UserFavorite; return proto.activity.UserFavorite.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.activity.UserFavorite} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.activity.UserFavorite} */ proto.activity.UserFavorite.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readInt32()); msg.setFavoriteId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setUserId(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setItemType(value); break; case 4: var value = /** @type {number} */ (reader.readInt32()); msg.setItemId(value); break; case 5: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setDateAdded(value); break; case 6: var value = new proto.activity.TrackWithArtist; reader.readMessage(value,proto.activity.TrackWithArtist.deserializeBinaryFromReader); msg.setTrack(value); break; case 7: var value = new proto.activity.AlbumWithArtist; reader.readMessage(value,proto.activity.AlbumWithArtist.deserializeBinaryFromReader); msg.setAlbum(value); break; case 8: var value = new music_artist_pb.Artist; reader.readMessage(value,music_artist_pb.Artist.deserializeBinaryFromReader); msg.setArtist(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.activity.UserFavorite.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.activity.UserFavorite.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.activity.UserFavorite} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.activity.UserFavorite.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getFavoriteId(); if (f !== 0) { writer.writeInt32( 1, f ); } f = message.getUserId(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getItemType(); if (f.length > 0) { writer.writeString( 3, f ); } f = message.getItemId(); if (f !== 0) { writer.writeInt32( 4, f ); } f = message.getDateAdded(); if (f != null) { writer.writeMessage( 5, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } f = message.getTrack(); if (f != null) { writer.writeMessage( 6, f, proto.activity.TrackWithArtist.serializeBinaryToWriter ); } f = message.getAlbum(); if (f != null) { writer.writeMessage( 7, f, proto.activity.AlbumWithArtist.serializeBinaryToWriter ); } f = message.getArtist(); if (f != null) { writer.writeMessage( 8, f, music_artist_pb.Artist.serializeBinaryToWriter ); } }; /** * optional int32 favorite_id = 1; * @return {number} */ proto.activity.UserFavorite.prototype.getFavoriteId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.activity.UserFavorite} returns this */ proto.activity.UserFavorite.prototype.setFavoriteId = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional string user_id = 2; * @return {string} */ proto.activity.UserFavorite.prototype.getUserId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.activity.UserFavorite} returns this */ proto.activity.UserFavorite.prototype.setUserId = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string item_type = 3; * @return {string} */ proto.activity.UserFavorite.prototype.getItemType = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.activity.UserFavorite} returns this */ proto.activity.UserFavorite.prototype.setItemType = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * optional int32 item_id = 4; * @return {number} */ proto.activity.UserFavorite.prototype.getItemId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value * @return {!proto.activity.UserFavorite} returns this */ proto.activity.UserFavorite.prototype.setItemId = function(value) { return jspb.Message.setProto3IntField(this, 4, value); }; /** * optional google.protobuf.Timestamp date_added = 5; * @return {?proto.google.protobuf.Timestamp} */ proto.activity.UserFavorite.prototype.getDateAdded = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); }; /** * @param {?proto.google.protobuf.Timestamp|undefined} value * @return {!proto.activity.UserFavorite} returns this */ proto.activity.UserFavorite.prototype.setDateAdded = function(value) { return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. * @return {!proto.activity.UserFavorite} returns this */ proto.activity.UserFavorite.prototype.clearDateAdded = function() { return this.setDateAdded(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.activity.UserFavorite.prototype.hasDateAdded = function() { return jspb.Message.getField(this, 5) != null; }; /** * optional TrackWithArtist track = 6; * @return {?proto.activity.TrackWithArtist} */ proto.activity.UserFavorite.prototype.getTrack = function() { return /** @type{?proto.activity.TrackWithArtist} */ ( jspb.Message.getWrapperField(this, proto.activity.TrackWithArtist, 6)); }; /** * @param {?proto.activity.TrackWithArtist|undefined} value * @return {!proto.activity.UserFavorite} returns this */ proto.activity.UserFavorite.prototype.setTrack = function(value) { return jspb.Message.setOneofWrapperField(this, 6, proto.activity.UserFavorite.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.activity.UserFavorite} returns this */ proto.activity.UserFavorite.prototype.clearTrack = function() { return this.setTrack(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.activity.UserFavorite.prototype.hasTrack = function() { return jspb.Message.getField(this, 6) != null; }; /** * optional AlbumWithArtist album = 7; * @return {?proto.activity.AlbumWithArtist} */ proto.activity.UserFavorite.prototype.getAlbum = function() { return /** @type{?proto.activity.AlbumWithArtist} */ ( jspb.Message.getWrapperField(this, proto.activity.AlbumWithArtist, 7)); }; /** * @param {?proto.activity.AlbumWithArtist|undefined} value * @return {!proto.activity.UserFavorite} returns this */ proto.activity.UserFavorite.prototype.setAlbum = function(value) { return jspb.Message.setOneofWrapperField(this, 7, proto.activity.UserFavorite.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.activity.UserFavorite} returns this */ proto.activity.UserFavorite.prototype.clearAlbum = function() { return this.setAlbum(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.activity.UserFavorite.prototype.hasAlbum = function() { return jspb.Message.getField(this, 7) != null; }; /** * optional music.Artist artist = 8; * @return {?proto.music.Artist} */ proto.activity.UserFavorite.prototype.getArtist = function() { return /** @type{?proto.music.Artist} */ ( jspb.Message.getWrapperField(this, music_artist_pb.Artist, 8)); }; /** * @param {?proto.music.Artist|undefined} value * @return {!proto.activity.UserFavorite} returns this */ proto.activity.UserFavorite.prototype.setArtist = function(value) { return jspb.Message.setOneofWrapperField(this, 8, proto.activity.UserFavorite.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.activity.UserFavorite} returns this */ proto.activity.UserFavorite.prototype.clearArtist = function() { return this.setArtist(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.activity.UserFavorite.prototype.hasArtist = function() { return jspb.Message.getField(this, 8) != 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.activity.TrackWithArtist.prototype.toObject = function(opt_includeInstance) { return proto.activity.TrackWithArtist.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.activity.TrackWithArtist} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.activity.TrackWithArtist.toObject = function(includeInstance, msg) { var f, obj = { track: (f = msg.getTrack()) && music_track_pb.Track.toObject(includeInstance, f), artist: (f = msg.getArtist()) && music_artist_pb.Artist.toObject(includeInstance, f), album: (f = msg.getAlbum()) && music_album_pb.Album.toObject(includeInstance, 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.activity.TrackWithArtist} */ proto.activity.TrackWithArtist.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.activity.TrackWithArtist; return proto.activity.TrackWithArtist.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.activity.TrackWithArtist} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.activity.TrackWithArtist} */ proto.activity.TrackWithArtist.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new music_track_pb.Track; reader.readMessage(value,music_track_pb.Track.deserializeBinaryFromReader); msg.setTrack(value); break; case 2: var value = new music_artist_pb.Artist; reader.readMessage(value,music_artist_pb.Artist.deserializeBinaryFromReader); msg.setArtist(value); break; case 3: var value = new music_album_pb.Album; reader.readMessage(value,music_album_pb.Album.deserializeBinaryFromReader); msg.setAlbum(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.activity.TrackWithArtist.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.activity.TrackWithArtist.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.activity.TrackWithArtist} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.activity.TrackWithArtist.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getTrack(); if (f != null) { writer.writeMessage( 1, f, music_track_pb.Track.serializeBinaryToWriter ); } f = message.getArtist(); if (f != null) { writer.writeMessage( 2, f, music_artist_pb.Artist.serializeBinaryToWriter ); } f = message.getAlbum(); if (f != null) { writer.writeMessage( 3, f, music_album_pb.Album.serializeBinaryToWriter ); } }; /** * optional music.Track track = 1; * @return {?proto.music.Track} */ proto.activity.TrackWithArtist.prototype.getTrack = function() { return /** @type{?proto.music.Track} */ ( jspb.Message.getWrapperField(this, music_track_pb.Track, 1)); }; /** * @param {?proto.music.Track|undefined} value * @return {!proto.activity.TrackWithArtist} returns this */ proto.activity.TrackWithArtist.prototype.setTrack = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.activity.TrackWithArtist} returns this */ proto.activity.TrackWithArtist.prototype.clearTrack = function() { return this.setTrack(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.activity.TrackWithArtist.prototype.hasTrack = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional music.Artist artist = 2; * @return {?proto.music.Artist} */ proto.activity.TrackWithArtist.prototype.getArtist = function() { return /** @type{?proto.music.Artist} */ ( jspb.Message.getWrapperField(this, music_artist_pb.Artist, 2)); }; /** * @param {?proto.music.Artist|undefined} value * @return {!proto.activity.TrackWithArtist} returns this */ proto.activity.TrackWithArtist.prototype.setArtist = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.activity.TrackWithArtist} returns this */ proto.activity.TrackWithArtist.prototype.clearArtist = function() { return this.setArtist(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.activity.TrackWithArtist.prototype.hasArtist = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional music.Album album = 3; * @return {?proto.music.Album} */ proto.activity.TrackWithArtist.prototype.getAlbum = function() { return /** @type{?proto.music.Album} */ ( jspb.Message.getWrapperField(this, music_album_pb.Album, 3)); }; /** * @param {?proto.music.Album|undefined} value * @return {!proto.activity.TrackWithArtist} returns this */ proto.activity.TrackWithArtist.prototype.setAlbum = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. * @return {!proto.activity.TrackWithArtist} returns this */ proto.activity.TrackWithArtist.prototype.clearAlbum = function() { return this.setAlbum(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.activity.TrackWithArtist.prototype.hasAlbum = 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.activity.AlbumWithArtist.prototype.toObject = function(opt_includeInstance) { return proto.activity.AlbumWithArtist.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.activity.AlbumWithArtist} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.activity.AlbumWithArtist.toObject = function(includeInstance, msg) { var f, obj = { album: (f = msg.getAlbum()) && music_album_pb.Album.toObject(includeInstance, f), artist: (f = msg.getArtist()) && music_artist_pb.Artist.toObject(includeInstance, 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.activity.AlbumWithArtist} */ proto.activity.AlbumWithArtist.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.activity.AlbumWithArtist; return proto.activity.AlbumWithArtist.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.activity.AlbumWithArtist} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.activity.AlbumWithArtist} */ proto.activity.AlbumWithArtist.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new music_album_pb.Album; reader.readMessage(value,music_album_pb.Album.deserializeBinaryFromReader); msg.setAlbum(value); break; case 2: var value = new music_artist_pb.Artist; reader.readMessage(value,music_artist_pb.Artist.deserializeBinaryFromReader); msg.setArtist(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.activity.AlbumWithArtist.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.activity.AlbumWithArtist.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.activity.AlbumWithArtist} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.activity.AlbumWithArtist.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getAlbum(); if (f != null) { writer.writeMessage( 1, f, music_album_pb.Album.serializeBinaryToWriter ); } f = message.getArtist(); if (f != null) { writer.writeMessage( 2, f, music_artist_pb.Artist.serializeBinaryToWriter ); } }; /** * optional music.Album album = 1; * @return {?proto.music.Album} */ proto.activity.AlbumWithArtist.prototype.getAlbum = function() { return /** @type{?proto.music.Album} */ ( jspb.Message.getWrapperField(this, music_album_pb.Album, 1)); }; /** * @param {?proto.music.Album|undefined} value * @return {!proto.activity.AlbumWithArtist} returns this */ proto.activity.AlbumWithArtist.prototype.setAlbum = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.activity.AlbumWithArtist} returns this */ proto.activity.AlbumWithArtist.prototype.clearAlbum = function() { return this.setAlbum(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.activity.AlbumWithArtist.prototype.hasAlbum = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional music.Artist artist = 2; * @return {?proto.music.Artist} */ proto.activity.AlbumWithArtist.prototype.getArtist = function() { return /** @type{?proto.music.Artist} */ ( jspb.Message.getWrapperField(this, music_artist_pb.Artist, 2)); }; /** * @param {?proto.music.Artist|undefined} value * @return {!proto.activity.AlbumWithArtist} returns this */ proto.activity.AlbumWithArtist.prototype.setArtist = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.activity.AlbumWithArtist} returns this */ proto.activity.AlbumWithArtist.prototype.clearArtist = function() { return this.setArtist(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.activity.AlbumWithArtist.prototype.hasArtist = function() { return jspb.Message.getField(this, 2) != null; }; goog.object.extend(exports, proto.activity);