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.

703 lines (608 loc) 19.3 kB
// source: activity/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); goog.exportSymbol('proto.activity.Playlist', null, global); goog.exportSymbol('proto.activity.PlaylistTrack', 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.Playlist = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.activity.Playlist, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.activity.Playlist.displayName = 'proto.activity.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.activity.PlaylistTrack = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.activity.PlaylistTrack, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.activity.PlaylistTrack.displayName = 'proto.activity.PlaylistTrack'; } 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.Playlist.prototype.toObject = function(opt_includeInstance) { return proto.activity.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.activity.Playlist} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.activity.Playlist.toObject = function(includeInstance, msg) { var f, obj = { playlistId: jspb.Message.getFieldWithDefault(msg, 1, 0), createdBy: jspb.Message.getFieldWithDefault(msg, 2, ""), title: jspb.Message.getFieldWithDefault(msg, 3, ""), description: jspb.Message.getFieldWithDefault(msg, 4, ""), coverImage: jspb.Message.getFieldWithDefault(msg, 5, ""), isOfficial: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), isPublic: jspb.Message.getBooleanFieldWithDefault(msg, 7, 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.activity.Playlist} */ proto.activity.Playlist.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.activity.Playlist; return proto.activity.Playlist.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.activity.Playlist} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.activity.Playlist} */ proto.activity.Playlist.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.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 {boolean} */ (reader.readBool()); msg.setIsOfficial(value); break; case 7: var value = /** @type {boolean} */ (reader.readBool()); msg.setIsPublic(value); break; case 8: 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.activity.Playlist.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.activity.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.activity.Playlist} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.activity.Playlist.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getPlaylistId(); if (f !== 0) { writer.writeInt32( 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.getIsOfficial(); if (f) { writer.writeBool( 6, f ); } f = message.getIsPublic(); if (f) { writer.writeBool( 7, f ); } f = message.getCreatedAt(); if (f != null) { writer.writeMessage( 8, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } }; /** * optional int32 playlist_id = 1; * @return {number} */ proto.activity.Playlist.prototype.getPlaylistId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.activity.Playlist} returns this */ proto.activity.Playlist.prototype.setPlaylistId = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional string created_by = 2; * @return {string} */ proto.activity.Playlist.prototype.getCreatedBy = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.activity.Playlist} returns this */ proto.activity.Playlist.prototype.setCreatedBy = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string title = 3; * @return {string} */ proto.activity.Playlist.prototype.getTitle = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.activity.Playlist} returns this */ proto.activity.Playlist.prototype.setTitle = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * optional string description = 4; * @return {string} */ proto.activity.Playlist.prototype.getDescription = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** * @param {string} value * @return {!proto.activity.Playlist} returns this */ proto.activity.Playlist.prototype.setDescription = function(value) { return jspb.Message.setProto3StringField(this, 4, value); }; /** * optional string cover_image = 5; * @return {string} */ proto.activity.Playlist.prototype.getCoverImage = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** * @param {string} value * @return {!proto.activity.Playlist} returns this */ proto.activity.Playlist.prototype.setCoverImage = function(value) { return jspb.Message.setProto3StringField(this, 5, value); }; /** * optional bool is_official = 6; * @return {boolean} */ proto.activity.Playlist.prototype.getIsOfficial = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); }; /** * @param {boolean} value * @return {!proto.activity.Playlist} returns this */ proto.activity.Playlist.prototype.setIsOfficial = function(value) { return jspb.Message.setProto3BooleanField(this, 6, value); }; /** * optional bool is_public = 7; * @return {boolean} */ proto.activity.Playlist.prototype.getIsPublic = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); }; /** * @param {boolean} value * @return {!proto.activity.Playlist} returns this */ proto.activity.Playlist.prototype.setIsPublic = function(value) { return jspb.Message.setProto3BooleanField(this, 7, value); }; /** * optional google.protobuf.Timestamp created_at = 8; * @return {?proto.google.protobuf.Timestamp} */ proto.activity.Playlist.prototype.getCreatedAt = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 8)); }; /** * @param {?proto.google.protobuf.Timestamp|undefined} value * @return {!proto.activity.Playlist} returns this */ proto.activity.Playlist.prototype.setCreatedAt = function(value) { return jspb.Message.setWrapperField(this, 8, value); }; /** * Clears the message field making it undefined. * @return {!proto.activity.Playlist} returns this */ proto.activity.Playlist.prototype.clearCreatedAt = function() { return this.setCreatedAt(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.activity.Playlist.prototype.hasCreatedAt = 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.PlaylistTrack.prototype.toObject = function(opt_includeInstance) { return proto.activity.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.activity.PlaylistTrack} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.activity.PlaylistTrack.toObject = function(includeInstance, msg) { var f, obj = { entryId: jspb.Message.getFieldWithDefault(msg, 1, 0), playlistId: jspb.Message.getFieldWithDefault(msg, 2, 0), 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.activity.PlaylistTrack} */ proto.activity.PlaylistTrack.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.activity.PlaylistTrack; return proto.activity.PlaylistTrack.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.activity.PlaylistTrack} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.activity.PlaylistTrack} */ proto.activity.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 {number} */ (reader.readInt32()); 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.activity.PlaylistTrack.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.activity.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.activity.PlaylistTrack} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.activity.PlaylistTrack.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getEntryId(); if (f !== 0) { writer.writeInt32( 1, f ); } f = message.getPlaylistId(); if (f !== 0) { writer.writeInt32( 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.activity.PlaylistTrack.prototype.getEntryId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.activity.PlaylistTrack} returns this */ proto.activity.PlaylistTrack.prototype.setEntryId = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional int32 playlist_id = 2; * @return {number} */ proto.activity.PlaylistTrack.prototype.getPlaylistId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value * @return {!proto.activity.PlaylistTrack} returns this */ proto.activity.PlaylistTrack.prototype.setPlaylistId = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; /** * optional int32 track_id = 3; * @return {number} */ proto.activity.PlaylistTrack.prototype.getTrackId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value * @return {!proto.activity.PlaylistTrack} returns this */ proto.activity.PlaylistTrack.prototype.setTrackId = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; /** * optional int32 position = 4; * @return {number} */ proto.activity.PlaylistTrack.prototype.getPosition = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value * @return {!proto.activity.PlaylistTrack} returns this */ proto.activity.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.activity.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.activity.PlaylistTrack} returns this */ proto.activity.PlaylistTrack.prototype.setAddedAt = function(value) { return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. * @return {!proto.activity.PlaylistTrack} returns this */ proto.activity.PlaylistTrack.prototype.clearAddedAt = function() { return this.setAddedAt(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.activity.PlaylistTrack.prototype.hasAddedAt = function() { return jspb.Message.getField(this, 5) != null; }; goog.object.extend(exports, proto.activity);