Spaces:
Running
Running
Download proto/_canvas_pb.cjs from veltrixcode/jsondb: direct link, hf CLI and curl.
- Browser
- Download file 30.9 kB
-
https://huggingface.co/spaces/veltrixcode/jsondb/resolve/main/proto/_canvas_pb.cjs
- Command line
-
hf download hf://spaces/veltrixcode/jsondb/proto/_canvas_pb.cjs
-
curl -L -o _canvas_pb.cjs https://huggingface.co/spaces/veltrixcode/jsondb/resolve/main/proto/_canvas_pb.cjs
30.9 kB
// source: _canvas.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
goog.exportSymbol('proto.CanvasRequest', null, global);
goog.exportSymbol('proto.CanvasRequest.Track', null, global);
goog.exportSymbol('proto.CanvasResponse', null, global);
goog.exportSymbol('proto.CanvasResponse.Canvas', null, global);
goog.exportSymbol('proto.CanvasResponse.Canvas.Artist', 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.CanvasRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.CanvasRequest.repeatedFields_, null);
};
goog.inherits(proto.CanvasRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.CanvasRequest.displayName = 'proto.CanvasRequest';
}
/**
* 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.CanvasRequest.Track = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.CanvasRequest.Track, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.CanvasRequest.Track.displayName = 'proto.CanvasRequest.Track';
}
/**
* 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.CanvasResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.CanvasResponse.repeatedFields_, null);
};
goog.inherits(proto.CanvasResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.CanvasResponse.displayName = 'proto.CanvasResponse';
}
/**
* 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.CanvasResponse.Canvas = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.CanvasResponse.Canvas, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.CanvasResponse.Canvas.displayName = 'proto.CanvasResponse.Canvas';
}
/**
* 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.CanvasResponse.Canvas.Artist = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.CanvasResponse.Canvas.Artist, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.CanvasResponse.Canvas.Artist.displayName = 'proto.CanvasResponse.Canvas.Artist';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.CanvasRequest.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.CanvasRequest.prototype.toObject = function(opt_includeInstance) {
return proto.CanvasRequest.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.CanvasRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.CanvasRequest.toObject = function(includeInstance, msg) {
var f, obj = {
tracksList: jspb.Message.toObjectList(msg.getTracksList(),
proto.CanvasRequest.Track.toObject, includeInstance)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.CanvasRequest}
*/
proto.CanvasRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.CanvasRequest;
return proto.CanvasRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.CanvasRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.CanvasRequest}
*/
proto.CanvasRequest.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.CanvasRequest.Track;
reader.readMessage(value,proto.CanvasRequest.Track.deserializeBinaryFromReader);
msg.addTracks(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.CanvasRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.CanvasRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.CanvasRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.CanvasRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getTracksList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
f,
proto.CanvasRequest.Track.serializeBinaryToWriter
);
}
};
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.CanvasRequest.Track.prototype.toObject = function(opt_includeInstance) {
return proto.CanvasRequest.Track.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.CanvasRequest.Track} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.CanvasRequest.Track.toObject = function(includeInstance, msg) {
var f, obj = {
trackUri: jspb.Message.getFieldWithDefault(msg, 1, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.CanvasRequest.Track}
*/
proto.CanvasRequest.Track.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.CanvasRequest.Track;
return proto.CanvasRequest.Track.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.CanvasRequest.Track} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.CanvasRequest.Track}
*/
proto.CanvasRequest.Track.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.setTrackUri(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.CanvasRequest.Track.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.CanvasRequest.Track.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.CanvasRequest.Track} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.CanvasRequest.Track.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getTrackUri();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
};
/**
* optional string track_uri = 1;
* @return {string}
*/
proto.CanvasRequest.Track.prototype.getTrackUri = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.CanvasRequest.Track} returns this
*/
proto.CanvasRequest.Track.prototype.setTrackUri = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* repeated Track tracks = 1;
* @return {!Array<!proto.CanvasRequest.Track>}
*/
proto.CanvasRequest.prototype.getTracksList = function() {
return /** @type{!Array<!proto.CanvasRequest.Track>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.CanvasRequest.Track, 1));
};
/**
* @param {!Array<!proto.CanvasRequest.Track>} value
* @return {!proto.CanvasRequest} returns this
*/
proto.CanvasRequest.prototype.setTracksList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 1, value);
};
/**
* @param {!proto.CanvasRequest.Track=} opt_value
* @param {number=} opt_index
* @return {!proto.CanvasRequest.Track}
*/
proto.CanvasRequest.prototype.addTracks = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.CanvasRequest.Track, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.CanvasRequest} returns this
*/
proto.CanvasRequest.prototype.clearTracksList = function() {
return this.setTracksList([]);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.CanvasResponse.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.CanvasResponse.prototype.toObject = function(opt_includeInstance) {
return proto.CanvasResponse.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.CanvasResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.CanvasResponse.toObject = function(includeInstance, msg) {
var f, obj = {
canvasesList: jspb.Message.toObjectList(msg.getCanvasesList(),
proto.CanvasResponse.Canvas.toObject, includeInstance)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.CanvasResponse}
*/
proto.CanvasResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.CanvasResponse;
return proto.CanvasResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.CanvasResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.CanvasResponse}
*/
proto.CanvasResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.CanvasResponse.Canvas;
reader.readMessage(value,proto.CanvasResponse.Canvas.deserializeBinaryFromReader);
msg.addCanvases(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.CanvasResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.CanvasResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.CanvasResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.CanvasResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getCanvasesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
f,
proto.CanvasResponse.Canvas.serializeBinaryToWriter
);
}
};
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.CanvasResponse.Canvas.prototype.toObject = function(opt_includeInstance) {
return proto.CanvasResponse.Canvas.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.CanvasResponse.Canvas} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.CanvasResponse.Canvas.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
canvasUrl: jspb.Message.getFieldWithDefault(msg, 2, ""),
trackUri: jspb.Message.getFieldWithDefault(msg, 5, ""),
artist: (f = msg.getArtist()) && proto.CanvasResponse.Canvas.Artist.toObject(includeInstance, f),
otherId: jspb.Message.getFieldWithDefault(msg, 9, ""),
canvasUri: jspb.Message.getFieldWithDefault(msg, 11, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.CanvasResponse.Canvas}
*/
proto.CanvasResponse.Canvas.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.CanvasResponse.Canvas;
return proto.CanvasResponse.Canvas.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.CanvasResponse.Canvas} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.CanvasResponse.Canvas}
*/
proto.CanvasResponse.Canvas.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.setId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setCanvasUrl(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setTrackUri(value);
break;
case 6:
var value = new proto.CanvasResponse.Canvas.Artist;
reader.readMessage(value,proto.CanvasResponse.Canvas.Artist.deserializeBinaryFromReader);
msg.setArtist(value);
break;
case 9:
var value = /** @type {string} */ (reader.readString());
msg.setOtherId(value);
break;
case 11:
var value = /** @type {string} */ (reader.readString());
msg.setCanvasUri(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.CanvasResponse.Canvas.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.CanvasResponse.Canvas.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.CanvasResponse.Canvas} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.CanvasResponse.Canvas.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getCanvasUrl();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getTrackUri();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
f = message.getArtist();
if (f != null) {
writer.writeMessage(
6,
f,
proto.CanvasResponse.Canvas.Artist.serializeBinaryToWriter
);
}
f = message.getOtherId();
if (f.length > 0) {
writer.writeString(
9,
f
);
}
f = message.getCanvasUri();
if (f.length > 0) {
writer.writeString(
11,
f
);
}
};
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.CanvasResponse.Canvas.Artist.prototype.toObject = function(opt_includeInstance) {
return proto.CanvasResponse.Canvas.Artist.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.CanvasResponse.Canvas.Artist} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.CanvasResponse.Canvas.Artist.toObject = function(includeInstance, msg) {
var f, obj = {
artistUri: jspb.Message.getFieldWithDefault(msg, 1, ""),
artistName: jspb.Message.getFieldWithDefault(msg, 2, ""),
artistImgUrl: jspb.Message.getFieldWithDefault(msg, 3, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.CanvasResponse.Canvas.Artist}
*/
proto.CanvasResponse.Canvas.Artist.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.CanvasResponse.Canvas.Artist;
return proto.CanvasResponse.Canvas.Artist.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.CanvasResponse.Canvas.Artist} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.CanvasResponse.Canvas.Artist}
*/
proto.CanvasResponse.Canvas.Artist.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.setArtistUri(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setArtistName(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setArtistImgUrl(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.CanvasResponse.Canvas.Artist.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.CanvasResponse.Canvas.Artist.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.CanvasResponse.Canvas.Artist} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.CanvasResponse.Canvas.Artist.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getArtistUri();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getArtistName();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getArtistImgUrl();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
};
/**
* optional string artist_uri = 1;
* @return {string}
*/
proto.CanvasResponse.Canvas.Artist.prototype.getArtistUri = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.CanvasResponse.Canvas.Artist} returns this
*/
proto.CanvasResponse.Canvas.Artist.prototype.setArtistUri = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string artist_name = 2;
* @return {string}
*/
proto.CanvasResponse.Canvas.Artist.prototype.getArtistName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.CanvasResponse.Canvas.Artist} returns this
*/
proto.CanvasResponse.Canvas.Artist.prototype.setArtistName = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string artist_img_url = 3;
* @return {string}
*/
proto.CanvasResponse.Canvas.Artist.prototype.getArtistImgUrl = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.CanvasResponse.Canvas.Artist} returns this
*/
proto.CanvasResponse.Canvas.Artist.prototype.setArtistImgUrl = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional string id = 1;
* @return {string}
*/
proto.CanvasResponse.Canvas.prototype.getId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.CanvasResponse.Canvas} returns this
*/
proto.CanvasResponse.Canvas.prototype.setId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string canvas_url = 2;
* @return {string}
*/
proto.CanvasResponse.Canvas.prototype.getCanvasUrl = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.CanvasResponse.Canvas} returns this
*/
proto.CanvasResponse.Canvas.prototype.setCanvasUrl = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string track_uri = 5;
* @return {string}
*/
proto.CanvasResponse.Canvas.prototype.getTrackUri = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/**
* @param {string} value
* @return {!proto.CanvasResponse.Canvas} returns this
*/
proto.CanvasResponse.Canvas.prototype.setTrackUri = function(value) {
return jspb.Message.setProto3StringField(this, 5, value);
};
/**
* optional Artist artist = 6;
* @return {?proto.CanvasResponse.Canvas.Artist}
*/
proto.CanvasResponse.Canvas.prototype.getArtist = function() {
return /** @type{?proto.CanvasResponse.Canvas.Artist} */ (
jspb.Message.getWrapperField(this, proto.CanvasResponse.Canvas.Artist, 6));
};
/**
* @param {?proto.CanvasResponse.Canvas.Artist|undefined} value
* @return {!proto.CanvasResponse.Canvas} returns this
*/
proto.CanvasResponse.Canvas.prototype.setArtist = function(value) {
return jspb.Message.setWrapperField(this, 6, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.CanvasResponse.Canvas} returns this
*/
proto.CanvasResponse.Canvas.prototype.clearArtist = function() {
return this.setArtist(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.CanvasResponse.Canvas.prototype.hasArtist = function() {
return jspb.Message.getField(this, 6) != null;
};
/**
* optional string other_id = 9;
* @return {string}
*/
proto.CanvasResponse.Canvas.prototype.getOtherId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
};
/**
* @param {string} value
* @return {!proto.CanvasResponse.Canvas} returns this
*/
proto.CanvasResponse.Canvas.prototype.setOtherId = function(value) {
return jspb.Message.setProto3StringField(this, 9, value);
};
/**
* optional string canvas_uri = 11;
* @return {string}
*/
proto.CanvasResponse.Canvas.prototype.getCanvasUri = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, ""));
};
/**
* @param {string} value
* @return {!proto.CanvasResponse.Canvas} returns this
*/
proto.CanvasResponse.Canvas.prototype.setCanvasUri = function(value) {
return jspb.Message.setProto3StringField(this, 11, value);
};
/**
* repeated Canvas canvases = 1;
* @return {!Array<!proto.CanvasResponse.Canvas>}
*/
proto.CanvasResponse.prototype.getCanvasesList = function() {
return /** @type{!Array<!proto.CanvasResponse.Canvas>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.CanvasResponse.Canvas, 1));
};
/**
* @param {!Array<!proto.CanvasResponse.Canvas>} value
* @return {!proto.CanvasResponse} returns this
*/
proto.CanvasResponse.prototype.setCanvasesList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 1, value);
};
/**
* @param {!proto.CanvasResponse.Canvas=} opt_value
* @param {number=} opt_index
* @return {!proto.CanvasResponse.Canvas}
*/
proto.CanvasResponse.prototype.addCanvases = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.CanvasResponse.Canvas, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.CanvasResponse} returns this
*/
proto.CanvasResponse.prototype.clearCanvasesList = function() {
return this.setCanvasesList([]);
};
goog.object.extend(exports, proto);
// source: _canvas.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
goog.exportSymbol('proto.CanvasRequest', null, global);
goog.exportSymbol('proto.CanvasRequest.Track', null, global);
goog.exportSymbol('proto.CanvasResponse', null, global);
goog.exportSymbol('proto.CanvasResponse.Canvas', null, global);
goog.exportSymbol('proto.CanvasResponse.Canvas.Artist', 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.CanvasRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.CanvasRequest.repeatedFields_, null);
};
goog.inherits(proto.CanvasRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.CanvasRequest.displayName = 'proto.CanvasRequest';
}
/**
* 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.CanvasRequest.Track = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.CanvasRequest.Track, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.CanvasRequest.Track.displayName = 'proto.CanvasRequest.Track';
}
/**
* 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.CanvasResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.CanvasResponse.repeatedFields_, null);
};
goog.inherits(proto.CanvasResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.CanvasResponse.displayName = 'proto.CanvasResponse';
}
/**
* 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.CanvasResponse.Canvas = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.CanvasResponse.Canvas, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override