UNPKG

echofi-client

Version:

A TypeScript/Node.js client library for EchoFi services with Level 3 Ultimate API and gRPC-Web clients for music streaming, user management, activity tracking, and authentication.

1,637 lines (1,443 loc) 96.9 kB
// source: music/service.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 music_artist_pb = require('../music/artist_pb.js'); goog.object.extend(proto, music_artist_pb); var music_album_pb = require('../music/album_pb.js'); goog.object.extend(proto, music_album_pb); var music_track_pb = require('../music/track_pb.js'); goog.object.extend(proto, music_track_pb); var music_genre_pb = require('../music/genre_pb.js'); goog.object.extend(proto, music_genre_pb); goog.exportSymbol('proto.music.GetAlbumRequest', null, global); goog.exportSymbol('proto.music.GetAlbumResponse', null, global); goog.exportSymbol('proto.music.GetArtistRequest', null, global); goog.exportSymbol('proto.music.GetArtistResponse', null, global); goog.exportSymbol('proto.music.GetGenreRequest', null, global); goog.exportSymbol('proto.music.GetGenreResponse', null, global); goog.exportSymbol('proto.music.GetTrackRequest', null, global); goog.exportSymbol('proto.music.GetTrackResponse', null, global); goog.exportSymbol('proto.music.ListAlbumsRequest', null, global); goog.exportSymbol('proto.music.ListAlbumsResponse', null, global); goog.exportSymbol('proto.music.ListArtistsRequest', null, global); goog.exportSymbol('proto.music.ListArtistsResponse', null, global); goog.exportSymbol('proto.music.ListGenresRequest', null, global); goog.exportSymbol('proto.music.ListGenresResponse', null, global); goog.exportSymbol('proto.music.ListTracksRequest', null, global); goog.exportSymbol('proto.music.ListTracksResponse', 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.music.GetArtistRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.music.GetArtistRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.music.GetArtistRequest.displayName = 'proto.music.GetArtistRequest'; } /** * 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.music.GetArtistResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.music.GetArtistResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.music.GetArtistResponse.displayName = 'proto.music.GetArtistResponse'; } /** * 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.music.ListArtistsRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.music.ListArtistsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.music.ListArtistsRequest.displayName = 'proto.music.ListArtistsRequest'; } /** * 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.music.ListArtistsResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.music.ListArtistsResponse.repeatedFields_, null); }; goog.inherits(proto.music.ListArtistsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.music.ListArtistsResponse.displayName = 'proto.music.ListArtistsResponse'; } /** * 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.music.GetAlbumRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.music.GetAlbumRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.music.GetAlbumRequest.displayName = 'proto.music.GetAlbumRequest'; } /** * 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.music.GetAlbumResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.music.GetAlbumResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.music.GetAlbumResponse.displayName = 'proto.music.GetAlbumResponse'; } /** * 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.music.ListAlbumsRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.music.ListAlbumsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.music.ListAlbumsRequest.displayName = 'proto.music.ListAlbumsRequest'; } /** * 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.music.ListAlbumsResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.music.ListAlbumsResponse.repeatedFields_, null); }; goog.inherits(proto.music.ListAlbumsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.music.ListAlbumsResponse.displayName = 'proto.music.ListAlbumsResponse'; } /** * 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.music.GetTrackRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.music.GetTrackRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.music.GetTrackRequest.displayName = 'proto.music.GetTrackRequest'; } /** * 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.music.GetTrackResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.music.GetTrackResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.music.GetTrackResponse.displayName = 'proto.music.GetTrackResponse'; } /** * 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.music.ListTracksRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.music.ListTracksRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.music.ListTracksRequest.displayName = 'proto.music.ListTracksRequest'; } /** * 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.music.ListTracksResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.music.ListTracksResponse.repeatedFields_, null); }; goog.inherits(proto.music.ListTracksResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.music.ListTracksResponse.displayName = 'proto.music.ListTracksResponse'; } /** * 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.music.GetGenreRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.music.GetGenreRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.music.GetGenreRequest.displayName = 'proto.music.GetGenreRequest'; } /** * 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.music.GetGenreResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.music.GetGenreResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.music.GetGenreResponse.displayName = 'proto.music.GetGenreResponse'; } /** * 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.music.ListGenresRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.music.ListGenresRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.music.ListGenresRequest.displayName = 'proto.music.ListGenresRequest'; } /** * 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.music.ListGenresResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.music.ListGenresResponse.repeatedFields_, null); }; goog.inherits(proto.music.ListGenresResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.music.ListGenresResponse.displayName = 'proto.music.ListGenresResponse'; } 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.music.GetArtistRequest.prototype.toObject = function(opt_includeInstance) { return proto.music.GetArtistRequest.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.music.GetArtistRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.music.GetArtistRequest.toObject = function(includeInstance, msg) { var f, obj = { artistId: jspb.Message.getFieldWithDefault(msg, 1, 0) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.music.GetArtistRequest} */ proto.music.GetArtistRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.music.GetArtistRequest; return proto.music.GetArtistRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.music.GetArtistRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.music.GetArtistRequest} */ proto.music.GetArtistRequest.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.setArtistId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.music.GetArtistRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.music.GetArtistRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.music.GetArtistRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.music.GetArtistRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getArtistId(); if (f !== 0) { writer.writeInt32( 1, f ); } }; /** * optional int32 artist_id = 1; * @return {number} */ proto.music.GetArtistRequest.prototype.getArtistId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.music.GetArtistRequest} returns this */ proto.music.GetArtistRequest.prototype.setArtistId = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; 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.music.GetArtistResponse.prototype.toObject = function(opt_includeInstance) { return proto.music.GetArtistResponse.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.music.GetArtistResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.music.GetArtistResponse.toObject = function(includeInstance, msg) { var f, obj = { 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.music.GetArtistResponse} */ proto.music.GetArtistResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.music.GetArtistResponse; return proto.music.GetArtistResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.music.GetArtistResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.music.GetArtistResponse} */ proto.music.GetArtistResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: 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.music.GetArtistResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.music.GetArtistResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.music.GetArtistResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.music.GetArtistResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getArtist(); if (f != null) { writer.writeMessage( 1, f, music_artist_pb.Artist.serializeBinaryToWriter ); } }; /** * optional Artist artist = 1; * @return {?proto.music.Artist} */ proto.music.GetArtistResponse.prototype.getArtist = function() { return /** @type{?proto.music.Artist} */ ( jspb.Message.getWrapperField(this, music_artist_pb.Artist, 1)); }; /** * @param {?proto.music.Artist|undefined} value * @return {!proto.music.GetArtistResponse} returns this */ proto.music.GetArtistResponse.prototype.setArtist = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.music.GetArtistResponse} returns this */ proto.music.GetArtistResponse.prototype.clearArtist = function() { return this.setArtist(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.music.GetArtistResponse.prototype.hasArtist = function() { return jspb.Message.getField(this, 1) != 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.music.ListArtistsRequest.prototype.toObject = function(opt_includeInstance) { return proto.music.ListArtistsRequest.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.music.ListArtistsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.music.ListArtistsRequest.toObject = function(includeInstance, msg) { var f, obj = { offset: jspb.Message.getFieldWithDefault(msg, 1, 0), limit: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.music.ListArtistsRequest} */ proto.music.ListArtistsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.music.ListArtistsRequest; return proto.music.ListArtistsRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.music.ListArtistsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.music.ListArtistsRequest} */ proto.music.ListArtistsRequest.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.setOffset(value); break; case 2: var value = /** @type {number} */ (reader.readInt32()); msg.setLimit(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.music.ListArtistsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.music.ListArtistsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.music.ListArtistsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.music.ListArtistsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getOffset(); if (f !== 0) { writer.writeInt32( 1, f ); } f = message.getLimit(); if (f !== 0) { writer.writeInt32( 2, f ); } }; /** * optional int32 offset = 1; * @return {number} */ proto.music.ListArtistsRequest.prototype.getOffset = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.music.ListArtistsRequest} returns this */ proto.music.ListArtistsRequest.prototype.setOffset = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional int32 limit = 2; * @return {number} */ proto.music.ListArtistsRequest.prototype.getLimit = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value * @return {!proto.music.ListArtistsRequest} returns this */ proto.music.ListArtistsRequest.prototype.setLimit = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.music.ListArtistsResponse.repeatedFields_ = [1]; 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.music.ListArtistsResponse.prototype.toObject = function(opt_includeInstance) { return proto.music.ListArtistsResponse.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.music.ListArtistsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.music.ListArtistsResponse.toObject = function(includeInstance, msg) { var f, obj = { artistsList: jspb.Message.toObjectList(msg.getArtistsList(), music_artist_pb.Artist.toObject, includeInstance), total: jspb.Message.getFieldWithDefault(msg, 2, 0), offset: jspb.Message.getFieldWithDefault(msg, 3, 0), limit: jspb.Message.getFieldWithDefault(msg, 4, 0) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.music.ListArtistsResponse} */ proto.music.ListArtistsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.music.ListArtistsResponse; return proto.music.ListArtistsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.music.ListArtistsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.music.ListArtistsResponse} */ proto.music.ListArtistsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new music_artist_pb.Artist; reader.readMessage(value,music_artist_pb.Artist.deserializeBinaryFromReader); msg.addArtists(value); break; case 2: var value = /** @type {number} */ (reader.readInt64()); msg.setTotal(value); break; case 3: var value = /** @type {number} */ (reader.readInt32()); msg.setOffset(value); break; case 4: var value = /** @type {number} */ (reader.readInt32()); msg.setLimit(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.music.ListArtistsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.music.ListArtistsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.music.ListArtistsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.music.ListArtistsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getArtistsList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, music_artist_pb.Artist.serializeBinaryToWriter ); } f = message.getTotal(); if (f !== 0) { writer.writeInt64( 2, f ); } f = message.getOffset(); if (f !== 0) { writer.writeInt32( 3, f ); } f = message.getLimit(); if (f !== 0) { writer.writeInt32( 4, f ); } }; /** * repeated Artist artists = 1; * @return {!Array<!proto.music.Artist>} */ proto.music.ListArtistsResponse.prototype.getArtistsList = function() { return /** @type{!Array<!proto.music.Artist>} */ ( jspb.Message.getRepeatedWrapperField(this, music_artist_pb.Artist, 1)); }; /** * @param {!Array<!proto.music.Artist>} value * @return {!proto.music.ListArtistsResponse} returns this */ proto.music.ListArtistsResponse.prototype.setArtistsList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** * @param {!proto.music.Artist=} opt_value * @param {number=} opt_index * @return {!proto.music.Artist} */ proto.music.ListArtistsResponse.prototype.addArtists = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.music.Artist, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.music.ListArtistsResponse} returns this */ proto.music.ListArtistsResponse.prototype.clearArtistsList = function() { return this.setArtistsList([]); }; /** * optional int64 total = 2; * @return {number} */ proto.music.ListArtistsResponse.prototype.getTotal = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value * @return {!proto.music.ListArtistsResponse} returns this */ proto.music.ListArtistsResponse.prototype.setTotal = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; /** * optional int32 offset = 3; * @return {number} */ proto.music.ListArtistsResponse.prototype.getOffset = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value * @return {!proto.music.ListArtistsResponse} returns this */ proto.music.ListArtistsResponse.prototype.setOffset = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; /** * optional int32 limit = 4; * @return {number} */ proto.music.ListArtistsResponse.prototype.getLimit = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value * @return {!proto.music.ListArtistsResponse} returns this */ proto.music.ListArtistsResponse.prototype.setLimit = function(value) { return jspb.Message.setProto3IntField(this, 4, value); }; 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.music.GetAlbumRequest.prototype.toObject = function(opt_includeInstance) { return proto.music.GetAlbumRequest.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.music.GetAlbumRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.music.GetAlbumRequest.toObject = function(includeInstance, msg) { var f, obj = { albumId: jspb.Message.getFieldWithDefault(msg, 1, 0) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.music.GetAlbumRequest} */ proto.music.GetAlbumRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.music.GetAlbumRequest; return proto.music.GetAlbumRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.music.GetAlbumRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.music.GetAlbumRequest} */ proto.music.GetAlbumRequest.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.setAlbumId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.music.GetAlbumRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.music.GetAlbumRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.music.GetAlbumRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.music.GetAlbumRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getAlbumId(); if (f !== 0) { writer.writeInt32( 1, f ); } }; /** * optional int32 album_id = 1; * @return {number} */ proto.music.GetAlbumRequest.prototype.getAlbumId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.music.GetAlbumRequest} returns this */ proto.music.GetAlbumRequest.prototype.setAlbumId = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; 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.music.GetAlbumResponse.prototype.toObject = function(opt_includeInstance) { return proto.music.GetAlbumResponse.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.music.GetAlbumResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.music.GetAlbumResponse.toObject = function(includeInstance, msg) { var f, obj = { 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.music.GetAlbumResponse} */ proto.music.GetAlbumResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.music.GetAlbumResponse; return proto.music.GetAlbumResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.music.GetAlbumResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.music.GetAlbumResponse} */ proto.music.GetAlbumResponse.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; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.music.GetAlbumResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.music.GetAlbumResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.music.GetAlbumResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.music.GetAlbumResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getAlbum(); if (f != null) { writer.writeMessage( 1, f, music_album_pb.Album.serializeBinaryToWriter ); } }; /** * optional Album album = 1; * @return {?proto.music.Album} */ proto.music.GetAlbumResponse.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.music.GetAlbumResponse} returns this */ proto.music.GetAlbumResponse.prototype.setAlbum = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.music.GetAlbumResponse} returns this */ proto.music.GetAlbumResponse.prototype.clearAlbum = function() { return this.setAlbum(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.music.GetAlbumResponse.prototype.hasAlbum = function() { return jspb.Message.getField(this, 1) != 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.music.ListAlbumsRequest.prototype.toObject = function(opt_includeInstance) { return proto.music.ListAlbumsRequest.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.music.ListAlbumsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.music.ListAlbumsRequest.toObject = function(includeInstance, msg) { var f, obj = { offset: jspb.Message.getFieldWithDefault(msg, 1, 0), limit: jspb.Message.getFieldWithDefault(msg, 2, 0), artistId: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.music.ListAlbumsRequest} */ proto.music.ListAlbumsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.music.ListAlbumsRequest; return proto.music.ListAlbumsRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.music.ListAlbumsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.music.ListAlbumsRequest} */ proto.music.ListAlbumsRequest.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.setOffset(value); break; case 2: var value = /** @type {number} */ (reader.readInt32()); msg.setLimit(value); break; case 3: var value = /** @type {number} */ (reader.readInt32()); msg.setArtistId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.music.ListAlbumsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.music.ListAlbumsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.music.ListAlbumsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.music.ListAlbumsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getOffset(); if (f !== 0) { writer.writeInt32( 1, f ); } f = message.getLimit(); if (f !== 0) { writer.writeInt32( 2, f ); } f = /** @type {number} */ (jspb.Message.getField(message, 3)); if (f != null) { writer.writeInt32( 3, f ); } }; /** * optional int32 offset = 1; * @return {number} */ proto.music.ListAlbumsRequest.prototype.getOffset = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.music.ListAlbumsRequest} returns this */ proto.music.ListAlbumsRequest.prototype.setOffset = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional int32 limit = 2; * @return {number} */ proto.music.ListAlbumsRequest.prototype.getLimit = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value * @return {!proto.music.ListAlbumsRequest} returns this */ proto.music.ListAlbumsRequest.prototype.setLimit = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; /** * optional int32 artist_id = 3; * @return {number} */ proto.music.ListAlbumsRequest.prototype.getArtistId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value * @return {!proto.music.ListAlbumsRequest} returns this */ proto.music.ListAlbumsRequest.prototype.setArtistId = function(value) { return jspb.Message.setField(this, 3, value); }; /** * Clears the field making it undefined. * @return {!proto.music.ListAlbumsRequest} returns this */ proto.music.ListAlbumsRequest.prototype.clearArtistId = function() { return jspb.Message.setField(this, 3, undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.music.ListAlbumsRequest.prototype.hasArtistId = function() { return jspb.Message.getField(this, 3) != null; }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.music.ListAlbumsResponse.repeatedFields_ = [1]; 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.music.ListAlbumsResponse.prototype.toObject = function(opt_includeInstance) { return proto.music.ListAlbumsResponse.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.music.ListAlbumsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.music.ListAlbumsResponse.toObject = function(includeInstance, msg) { var f, obj = { albumsList: jspb.Message.toObjectList(msg.getAlbumsList(), music_album_pb.Album.toObject, includeInstance), total: jspb.Message.getFieldWithDefault(msg, 2, 0), offset: jspb.Message.getFieldWithDefault(msg, 3, 0), limit: jspb.Message.getFieldWithDefault(msg, 4, 0) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.music.ListAlbumsResponse} */ proto.music.ListAlbumsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.music.ListAlbumsResponse; return proto.music.ListAlbumsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.music.ListAlbumsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.music.ListAlbumsResponse} */ proto.music.ListAlbumsResponse.