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,132 lines (977 loc) 31.2 kB
// source: music/playlist.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_artist_pb = require('../music/artist_pb.js'); goog.object.extend(proto, music_artist_pb); goog.exportSymbol('proto.music.Playlist', null, global); goog.exportSymbol('proto.music.PlaylistTrack', null, global); goog.exportSymbol('proto.music.PlaylistTrackWithDetails', 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.Playlist = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.music.Playlist, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.music.Playlist.displayName = 'proto.music.Playlist'; } /** * 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.PlaylistTrack = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.music.PlaylistTrack, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.music.PlaylistTrack.displayName = 'proto.music.PlaylistTrack'; } /** * 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.PlaylistTrackWithDetails = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.music.PlaylistTrackWithDetails, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.music.PlaylistTrackWithDetails.displayName = 'proto.music.PlaylistTrackWithDetails'; } 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.Playlist.prototype.toObject = function(opt_includeInstance) { return proto.music.Playlist.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.Playlist} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.music.Playlist.toObject = function(includeInstance, msg) { var f, obj = { playlistId: jspb.Message.getFieldWithDefault(msg, 1, ""), createdBy: jspb.Message.getFieldWithDefault(msg, 2, ""), title: jspb.Message.getFieldWithDefault(msg, 3, ""), description: jspb.Message.getFieldWithDefault(msg, 4, ""), coverImage: jspb.Message.getFieldWithDefault(msg, 5, ""), imageUrl: jspb.Message.getFieldWithDefault(msg, 6, ""), isOfficial: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), isPublic: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), isFeatured: jspb.Message.getBooleanFieldWithDefault(msg, 9, false), createdAt: (f = msg.getCreatedAt()) && google_protobuf_timestamp_pb.Timestamp.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.Playlist} */ proto.music.Playlist.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.music.Playlist; return proto.music.Playlist.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.music.Playlist} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.music.Playlist} */ proto.music.Playlist.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.setPlaylistId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setCreatedBy(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setTitle(value); break; case 4: var value = /** @type {string} */ (reader.readString()); msg.setDescription(value); break; case 5: var value = /** @type {string} */ (reader.readString()); msg.setCoverImage(value); break; case 6: var value = /** @type {string} */ (reader.readString()); msg.setImageUrl(value); break; case 7: var value = /** @type {boolean} */ (reader.readBool()); msg.setIsOfficial(value); break; case 8: var value = /** @type {boolean} */ (reader.readBool()); msg.setIsPublic(value); break; case 9: var value = /** @type {boolean} */ (reader.readBool()); msg.setIsFeatured(value); break; case 10: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setCreatedAt(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.music.Playlist.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.music.Playlist.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.Playlist} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.music.Playlist.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getPlaylistId(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getCreatedBy(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getTitle(); if (f.length > 0) { writer.writeString( 3, f ); } f = message.getDescription(); if (f.length > 0) { writer.writeString( 4, f ); } f = message.getCoverImage(); if (f.length > 0) { writer.writeString( 5, f ); } f = message.getImageUrl(); if (f.length > 0) { writer.writeString( 6, f ); } f = message.getIsOfficial(); if (f) { writer.writeBool( 7, f ); } f = message.getIsPublic(); if (f) { writer.writeBool( 8, f ); } f = message.getIsFeatured(); if (f) { writer.writeBool( 9, f ); } f = message.getCreatedAt(); if (f != null) { writer.writeMessage( 10, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } }; /** * optional string playlist_id = 1; * @return {string} */ proto.music.Playlist.prototype.getPlaylistId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.music.Playlist} returns this */ proto.music.Playlist.prototype.setPlaylistId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string created_by = 2; * @return {string} */ proto.music.Playlist.prototype.getCreatedBy = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.music.Playlist} returns this */ proto.music.Playlist.prototype.setCreatedBy = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string title = 3; * @return {string} */ proto.music.Playlist.prototype.getTitle = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.music.Playlist} returns this */ proto.music.Playlist.prototype.setTitle = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * optional string description = 4; * @return {string} */ proto.music.Playlist.prototype.getDescription = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** * @param {string} value * @return {!proto.music.Playlist} returns this */ proto.music.Playlist.prototype.setDescription = function(value) { return jspb.Message.setProto3StringField(this, 4, value); }; /** * optional string cover_image = 5; * @return {string} */ proto.music.Playlist.prototype.getCoverImage = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** * @param {string} value * @return {!proto.music.Playlist} returns this */ proto.music.Playlist.prototype.setCoverImage = function(value) { return jspb.Message.setProto3StringField(this, 5, value); }; /** * optional string image_url = 6; * @return {string} */ proto.music.Playlist.prototype.getImageUrl = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; /** * @param {string} value * @return {!proto.music.Playlist} returns this */ proto.music.Playlist.prototype.setImageUrl = function(value) { return jspb.Message.setProto3StringField(this, 6, value); }; /** * optional bool is_official = 7; * @return {boolean} */ proto.music.Playlist.prototype.getIsOfficial = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); }; /** * @param {boolean} value * @return {!proto.music.Playlist} returns this */ proto.music.Playlist.prototype.setIsOfficial = function(value) { return jspb.Message.setProto3BooleanField(this, 7, value); }; /** * optional bool is_public = 8; * @return {boolean} */ proto.music.Playlist.prototype.getIsPublic = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); }; /** * @param {boolean} value * @return {!proto.music.Playlist} returns this */ proto.music.Playlist.prototype.setIsPublic = function(value) { return jspb.Message.setProto3BooleanField(this, 8, value); }; /** * optional bool is_featured = 9; * @return {boolean} */ proto.music.Playlist.prototype.getIsFeatured = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); }; /** * @param {boolean} value * @return {!proto.music.Playlist} returns this */ proto.music.Playlist.prototype.setIsFeatured = function(value) { return jspb.Message.setProto3BooleanField(this, 9, value); }; /** * optional google.protobuf.Timestamp created_at = 10; * @return {?proto.google.protobuf.Timestamp} */ proto.music.Playlist.prototype.getCreatedAt = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 10)); }; /** * @param {?proto.google.protobuf.Timestamp|undefined} value * @return {!proto.music.Playlist} returns this */ proto.music.Playlist.prototype.setCreatedAt = function(value) { return jspb.Message.setWrapperField(this, 10, value); }; /** * Clears the message field making it undefined. * @return {!proto.music.Playlist} returns this */ proto.music.Playlist.prototype.clearCreatedAt = function() { return this.setCreatedAt(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.music.Playlist.prototype.hasCreatedAt = function() { return jspb.Message.getField(this, 10) != 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.PlaylistTrack.prototype.toObject = function(opt_includeInstance) { return proto.music.PlaylistTrack.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.PlaylistTrack} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.music.PlaylistTrack.toObject = function(includeInstance, msg) { var f, obj = { entryId: jspb.Message.getFieldWithDefault(msg, 1, 0), playlistId: jspb.Message.getFieldWithDefault(msg, 2, ""), trackId: jspb.Message.getFieldWithDefault(msg, 3, 0), position: jspb.Message.getFieldWithDefault(msg, 4, 0), addedAt: (f = msg.getAddedAt()) && google_protobuf_timestamp_pb.Timestamp.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.PlaylistTrack} */ proto.music.PlaylistTrack.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.music.PlaylistTrack; return proto.music.PlaylistTrack.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.music.PlaylistTrack} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.music.PlaylistTrack} */ proto.music.PlaylistTrack.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.setEntryId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setPlaylistId(value); break; case 3: var value = /** @type {number} */ (reader.readInt32()); msg.setTrackId(value); break; case 4: var value = /** @type {number} */ (reader.readInt32()); msg.setPosition(value); break; case 5: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setAddedAt(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.music.PlaylistTrack.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.music.PlaylistTrack.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.PlaylistTrack} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.music.PlaylistTrack.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getEntryId(); if (f !== 0) { writer.writeInt32( 1, f ); } f = message.getPlaylistId(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getTrackId(); if (f !== 0) { writer.writeInt32( 3, f ); } f = message.getPosition(); if (f !== 0) { writer.writeInt32( 4, f ); } f = message.getAddedAt(); if (f != null) { writer.writeMessage( 5, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } }; /** * optional int32 entry_id = 1; * @return {number} */ proto.music.PlaylistTrack.prototype.getEntryId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.music.PlaylistTrack} returns this */ proto.music.PlaylistTrack.prototype.setEntryId = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional string playlist_id = 2; * @return {string} */ proto.music.PlaylistTrack.prototype.getPlaylistId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.music.PlaylistTrack} returns this */ proto.music.PlaylistTrack.prototype.setPlaylistId = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional int32 track_id = 3; * @return {number} */ proto.music.PlaylistTrack.prototype.getTrackId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value * @return {!proto.music.PlaylistTrack} returns this */ proto.music.PlaylistTrack.prototype.setTrackId = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; /** * optional int32 position = 4; * @return {number} */ proto.music.PlaylistTrack.prototype.getPosition = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value * @return {!proto.music.PlaylistTrack} returns this */ proto.music.PlaylistTrack.prototype.setPosition = function(value) { return jspb.Message.setProto3IntField(this, 4, value); }; /** * optional google.protobuf.Timestamp added_at = 5; * @return {?proto.google.protobuf.Timestamp} */ proto.music.PlaylistTrack.prototype.getAddedAt = 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.music.PlaylistTrack} returns this */ proto.music.PlaylistTrack.prototype.setAddedAt = function(value) { return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. * @return {!proto.music.PlaylistTrack} returns this */ proto.music.PlaylistTrack.prototype.clearAddedAt = function() { return this.setAddedAt(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.music.PlaylistTrack.prototype.hasAddedAt = function() { return jspb.Message.getField(this, 5) != 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.PlaylistTrackWithDetails.prototype.toObject = function(opt_includeInstance) { return proto.music.PlaylistTrackWithDetails.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.PlaylistTrackWithDetails} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.music.PlaylistTrackWithDetails.toObject = function(includeInstance, msg) { var f, obj = { entryId: jspb.Message.getFieldWithDefault(msg, 1, 0), playlistId: jspb.Message.getFieldWithDefault(msg, 2, ""), position: jspb.Message.getFieldWithDefault(msg, 3, 0), addedAt: (f = msg.getAddedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), track: (f = msg.getTrack()) && music_track_pb.Track.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.music.PlaylistTrackWithDetails} */ proto.music.PlaylistTrackWithDetails.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.music.PlaylistTrackWithDetails; return proto.music.PlaylistTrackWithDetails.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.music.PlaylistTrackWithDetails} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.music.PlaylistTrackWithDetails} */ proto.music.PlaylistTrackWithDetails.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.setEntryId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setPlaylistId(value); break; case 3: var value = /** @type {number} */ (reader.readInt32()); msg.setPosition(value); break; case 4: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setAddedAt(value); break; case 5: var value = new music_track_pb.Track; reader.readMessage(value,music_track_pb.Track.deserializeBinaryFromReader); msg.setTrack(value); break; case 6: 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.PlaylistTrackWithDetails.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.music.PlaylistTrackWithDetails.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.PlaylistTrackWithDetails} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.music.PlaylistTrackWithDetails.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getEntryId(); if (f !== 0) { writer.writeInt32( 1, f ); } f = message.getPlaylistId(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getPosition(); if (f !== 0) { writer.writeInt32( 3, f ); } f = message.getAddedAt(); if (f != null) { writer.writeMessage( 4, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } f = message.getTrack(); if (f != null) { writer.writeMessage( 5, f, music_track_pb.Track.serializeBinaryToWriter ); } f = message.getArtist(); if (f != null) { writer.writeMessage( 6, f, music_artist_pb.Artist.serializeBinaryToWriter ); } }; /** * optional int32 entry_id = 1; * @return {number} */ proto.music.PlaylistTrackWithDetails.prototype.getEntryId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.music.PlaylistTrackWithDetails} returns this */ proto.music.PlaylistTrackWithDetails.prototype.setEntryId = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional string playlist_id = 2; * @return {string} */ proto.music.PlaylistTrackWithDetails.prototype.getPlaylistId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.music.PlaylistTrackWithDetails} returns this */ proto.music.PlaylistTrackWithDetails.prototype.setPlaylistId = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional int32 position = 3; * @return {number} */ proto.music.PlaylistTrackWithDetails.prototype.getPosition = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value * @return {!proto.music.PlaylistTrackWithDetails} returns this */ proto.music.PlaylistTrackWithDetails.prototype.setPosition = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; /** * optional google.protobuf.Timestamp added_at = 4; * @return {?proto.google.protobuf.Timestamp} */ proto.music.PlaylistTrackWithDetails.prototype.getAddedAt = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); }; /** * @param {?proto.google.protobuf.Timestamp|undefined} value * @return {!proto.music.PlaylistTrackWithDetails} returns this */ proto.music.PlaylistTrackWithDetails.prototype.setAddedAt = function(value) { return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. * @return {!proto.music.PlaylistTrackWithDetails} returns this */ proto.music.PlaylistTrackWithDetails.prototype.clearAddedAt = function() { return this.setAddedAt(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.music.PlaylistTrackWithDetails.prototype.hasAddedAt = function() { return jspb.Message.getField(this, 4) != null; }; /** * optional Track track = 5; * @return {?proto.music.Track} */ proto.music.PlaylistTrackWithDetails.prototype.getTrack = function() { return /** @type{?proto.music.Track} */ ( jspb.Message.getWrapperField(this, music_track_pb.Track, 5)); }; /** * @param {?proto.music.Track|undefined} value * @return {!proto.music.PlaylistTrackWithDetails} returns this */ proto.music.PlaylistTrackWithDetails.prototype.setTrack = function(value) { return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. * @return {!proto.music.PlaylistTrackWithDetails} returns this */ proto.music.PlaylistTrackWithDetails.prototype.clearTrack = function() { return this.setTrack(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.music.PlaylistTrackWithDetails.prototype.hasTrack = function() { return jspb.Message.getField(this, 5) != null; }; /** * optional Artist artist = 6; * @return {?proto.music.Artist} */ proto.music.PlaylistTrackWithDetails.prototype.getArtist = function() { return /** @type{?proto.music.Artist} */ ( jspb.Message.getWrapperField(this, music_artist_pb.Artist, 6)); }; /** * @param {?proto.music.Artist|undefined} value * @return {!proto.music.PlaylistTrackWithDetails} returns this */ proto.music.PlaylistTrackWithDetails.prototype.setArtist = function(value) { return jspb.Message.setWrapperField(this, 6, value); }; /** * Clears the message field making it undefined. * @return {!proto.music.PlaylistTrackWithDetails} returns this */ proto.music.PlaylistTrackWithDetails.prototype.clearArtist = function() { return this.setArtist(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.music.PlaylistTrackWithDetails.prototype.hasArtist = function() { return jspb.Message.getField(this, 6) != null; }; goog.object.extend(exports, proto.music);