jarviscrawlercore
Version:
jarvis crawler core
1,695 lines (1,486 loc) • 98.3 kB
JavaScript
// source: jd.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!
/* eslint-disable */
// @ts-nocheck
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
goog.exportSymbol('proto.jarviscrawlercore.JDActive', null, global);
goog.exportSymbol('proto.jarviscrawlercore.JDCommentsInfo', null, global);
goog.exportSymbol('proto.jarviscrawlercore.JDCommentsType', null, global);
goog.exportSymbol('proto.jarviscrawlercore.JDMode', null, global);
goog.exportSymbol('proto.jarviscrawlercore.JDNormalPrice', null, global);
goog.exportSymbol('proto.jarviscrawlercore.JDPingou', null, global);
goog.exportSymbol('proto.jarviscrawlercore.JDProduct', null, global);
goog.exportSymbol('proto.jarviscrawlercore.JDPromotional', null, global);
goog.exportSymbol('proto.jarviscrawlercore.JDSKUInfo', null, global);
goog.exportSymbol('proto.jarviscrawlercore.JDShangou', null, global);
goog.exportSymbol('proto.jarviscrawlercore.ReplyJD', null, global);
goog.exportSymbol('proto.jarviscrawlercore.ReplyJD.ReplyCase', null, global);
goog.exportSymbol('proto.jarviscrawlercore.RequestJD', 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.jarviscrawlercore.JDPingou = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.jarviscrawlercore.JDPingou, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.jarviscrawlercore.JDPingou.displayName = 'proto.jarviscrawlercore.JDPingou';
}
/**
* 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.jarviscrawlercore.JDShangou = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.jarviscrawlercore.JDShangou, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.jarviscrawlercore.JDShangou.displayName = 'proto.jarviscrawlercore.JDShangou';
}
/**
* 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.jarviscrawlercore.JDPromotional = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.jarviscrawlercore.JDPromotional, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.jarviscrawlercore.JDPromotional.displayName = 'proto.jarviscrawlercore.JDPromotional';
}
/**
* 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.jarviscrawlercore.JDNormalPrice = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.jarviscrawlercore.JDNormalPrice.repeatedFields_, null);
};
goog.inherits(proto.jarviscrawlercore.JDNormalPrice, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.jarviscrawlercore.JDNormalPrice.displayName = 'proto.jarviscrawlercore.JDNormalPrice';
}
/**
* 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.jarviscrawlercore.JDSKUInfo = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.jarviscrawlercore.JDSKUInfo, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.jarviscrawlercore.JDSKUInfo.displayName = 'proto.jarviscrawlercore.JDSKUInfo';
}
/**
* 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.jarviscrawlercore.JDCommentsType = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.jarviscrawlercore.JDCommentsType, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.jarviscrawlercore.JDCommentsType.displayName = 'proto.jarviscrawlercore.JDCommentsType';
}
/**
* 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.jarviscrawlercore.JDCommentsInfo = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.jarviscrawlercore.JDCommentsInfo.repeatedFields_, null);
};
goog.inherits(proto.jarviscrawlercore.JDCommentsInfo, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.jarviscrawlercore.JDCommentsInfo.displayName = 'proto.jarviscrawlercore.JDCommentsInfo';
}
/**
* 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.jarviscrawlercore.JDActive = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.jarviscrawlercore.JDActive.repeatedFields_, null);
};
goog.inherits(proto.jarviscrawlercore.JDActive, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.jarviscrawlercore.JDActive.displayName = 'proto.jarviscrawlercore.JDActive';
}
/**
* 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.jarviscrawlercore.JDProduct = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.jarviscrawlercore.JDProduct.repeatedFields_, null);
};
goog.inherits(proto.jarviscrawlercore.JDProduct, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.jarviscrawlercore.JDProduct.displayName = 'proto.jarviscrawlercore.JDProduct';
}
/**
* 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.jarviscrawlercore.RequestJD = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.jarviscrawlercore.RequestJD, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.jarviscrawlercore.RequestJD.displayName = 'proto.jarviscrawlercore.RequestJD';
}
/**
* 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.jarviscrawlercore.ReplyJD = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.jarviscrawlercore.ReplyJD.oneofGroups_);
};
goog.inherits(proto.jarviscrawlercore.ReplyJD, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.jarviscrawlercore.ReplyJD.displayName = 'proto.jarviscrawlercore.ReplyJD';
}
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.jarviscrawlercore.JDPingou.prototype.toObject = function(opt_includeInstance) {
return proto.jarviscrawlercore.JDPingou.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.jarviscrawlercore.JDPingou} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.jarviscrawlercore.JDPingou.toObject = function(includeInstance, msg) {
var f, obj = {
preorders: jspb.Message.getFieldWithDefault(msg, 1, 0),
strlasttime: jspb.Message.getFieldWithDefault(msg, 2, ""),
scheduledprice: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0),
price: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.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.jarviscrawlercore.JDPingou}
*/
proto.jarviscrawlercore.JDPingou.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.jarviscrawlercore.JDPingou;
return proto.jarviscrawlercore.JDPingou.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.jarviscrawlercore.JDPingou} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.jarviscrawlercore.JDPingou}
*/
proto.jarviscrawlercore.JDPingou.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.setPreorders(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setStrlasttime(value);
break;
case 3:
var value = /** @type {number} */ (reader.readFloat());
msg.setScheduledprice(value);
break;
case 4:
var value = /** @type {number} */ (reader.readFloat());
msg.setPrice(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.jarviscrawlercore.JDPingou.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.jarviscrawlercore.JDPingou.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.jarviscrawlercore.JDPingou} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.jarviscrawlercore.JDPingou.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getPreorders();
if (f !== 0) {
writer.writeInt32(
1,
f
);
}
f = message.getStrlasttime();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getScheduledprice();
if (f !== 0.0) {
writer.writeFloat(
3,
f
);
}
f = message.getPrice();
if (f !== 0.0) {
writer.writeFloat(
4,
f
);
}
};
/**
* optional int32 preOrders = 1;
* @return {number}
*/
proto.jarviscrawlercore.JDPingou.prototype.getPreorders = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.jarviscrawlercore.JDPingou} returns this
*/
proto.jarviscrawlercore.JDPingou.prototype.setPreorders = function(value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional string strLastTime = 2;
* @return {string}
*/
proto.jarviscrawlercore.JDPingou.prototype.getStrlasttime = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.jarviscrawlercore.JDPingou} returns this
*/
proto.jarviscrawlercore.JDPingou.prototype.setStrlasttime = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional float scheduledPrice = 3;
* @return {number}
*/
proto.jarviscrawlercore.JDPingou.prototype.getScheduledprice = function() {
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0));
};
/**
* @param {number} value
* @return {!proto.jarviscrawlercore.JDPingou} returns this
*/
proto.jarviscrawlercore.JDPingou.prototype.setScheduledprice = function(value) {
return jspb.Message.setProto3FloatField(this, 3, value);
};
/**
* optional float price = 4;
* @return {number}
*/
proto.jarviscrawlercore.JDPingou.prototype.getPrice = function() {
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0));
};
/**
* @param {number} value
* @return {!proto.jarviscrawlercore.JDPingou} returns this
*/
proto.jarviscrawlercore.JDPingou.prototype.setPrice = function(value) {
return jspb.Message.setProto3FloatField(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.jarviscrawlercore.JDShangou.prototype.toObject = function(opt_includeInstance) {
return proto.jarviscrawlercore.JDShangou.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.jarviscrawlercore.JDShangou} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.jarviscrawlercore.JDShangou.toObject = function(includeInstance, msg) {
var f, obj = {
oldprice: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0),
price: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0),
strlasttime: 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.jarviscrawlercore.JDShangou}
*/
proto.jarviscrawlercore.JDShangou.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.jarviscrawlercore.JDShangou;
return proto.jarviscrawlercore.JDShangou.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.jarviscrawlercore.JDShangou} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.jarviscrawlercore.JDShangou}
*/
proto.jarviscrawlercore.JDShangou.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readFloat());
msg.setOldprice(value);
break;
case 2:
var value = /** @type {number} */ (reader.readFloat());
msg.setPrice(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setStrlasttime(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.jarviscrawlercore.JDShangou.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.jarviscrawlercore.JDShangou.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.jarviscrawlercore.JDShangou} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.jarviscrawlercore.JDShangou.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getOldprice();
if (f !== 0.0) {
writer.writeFloat(
1,
f
);
}
f = message.getPrice();
if (f !== 0.0) {
writer.writeFloat(
2,
f
);
}
f = message.getStrlasttime();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
};
/**
* optional float oldPrice = 1;
* @return {number}
*/
proto.jarviscrawlercore.JDShangou.prototype.getOldprice = function() {
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0));
};
/**
* @param {number} value
* @return {!proto.jarviscrawlercore.JDShangou} returns this
*/
proto.jarviscrawlercore.JDShangou.prototype.setOldprice = function(value) {
return jspb.Message.setProto3FloatField(this, 1, value);
};
/**
* optional float price = 2;
* @return {number}
*/
proto.jarviscrawlercore.JDShangou.prototype.getPrice = function() {
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0));
};
/**
* @param {number} value
* @return {!proto.jarviscrawlercore.JDShangou} returns this
*/
proto.jarviscrawlercore.JDShangou.prototype.setPrice = function(value) {
return jspb.Message.setProto3FloatField(this, 2, value);
};
/**
* optional string strLastTime = 3;
* @return {string}
*/
proto.jarviscrawlercore.JDShangou.prototype.getStrlasttime = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.jarviscrawlercore.JDShangou} returns this
*/
proto.jarviscrawlercore.JDShangou.prototype.setStrlasttime = function(value) {
return jspb.Message.setProto3StringField(this, 3, 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.jarviscrawlercore.JDPromotional.prototype.toObject = function(opt_includeInstance) {
return proto.jarviscrawlercore.JDPromotional.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.jarviscrawlercore.JDPromotional} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.jarviscrawlercore.JDPromotional.toObject = function(includeInstance, msg) {
var f, obj = {
title: jspb.Message.getFieldWithDefault(msg, 1, ""),
info: jspb.Message.getFieldWithDefault(msg, 2, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.jarviscrawlercore.JDPromotional}
*/
proto.jarviscrawlercore.JDPromotional.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.jarviscrawlercore.JDPromotional;
return proto.jarviscrawlercore.JDPromotional.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.jarviscrawlercore.JDPromotional} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.jarviscrawlercore.JDPromotional}
*/
proto.jarviscrawlercore.JDPromotional.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.setTitle(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setInfo(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.jarviscrawlercore.JDPromotional.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.jarviscrawlercore.JDPromotional.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.jarviscrawlercore.JDPromotional} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.jarviscrawlercore.JDPromotional.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getTitle();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getInfo();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* optional string title = 1;
* @return {string}
*/
proto.jarviscrawlercore.JDPromotional.prototype.getTitle = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.jarviscrawlercore.JDPromotional} returns this
*/
proto.jarviscrawlercore.JDPromotional.prototype.setTitle = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string info = 2;
* @return {string}
*/
proto.jarviscrawlercore.JDPromotional.prototype.getInfo = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.jarviscrawlercore.JDPromotional} returns this
*/
proto.jarviscrawlercore.JDPromotional.prototype.setInfo = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.jarviscrawlercore.JDNormalPrice.repeatedFields_ = [3,4];
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.jarviscrawlercore.JDNormalPrice.prototype.toObject = function(opt_includeInstance) {
return proto.jarviscrawlercore.JDNormalPrice.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.jarviscrawlercore.JDNormalPrice} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.jarviscrawlercore.JDNormalPrice.toObject = function(includeInstance, msg) {
var f, obj = {
oldprice: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0),
price: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0),
promotionalsList: jspb.Message.toObjectList(msg.getPromotionalsList(),
proto.jarviscrawlercore.JDPromotional.toObject, includeInstance),
couponsList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : 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.jarviscrawlercore.JDNormalPrice}
*/
proto.jarviscrawlercore.JDNormalPrice.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.jarviscrawlercore.JDNormalPrice;
return proto.jarviscrawlercore.JDNormalPrice.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.jarviscrawlercore.JDNormalPrice} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.jarviscrawlercore.JDNormalPrice}
*/
proto.jarviscrawlercore.JDNormalPrice.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readFloat());
msg.setOldprice(value);
break;
case 2:
var value = /** @type {number} */ (reader.readFloat());
msg.setPrice(value);
break;
case 3:
var value = new proto.jarviscrawlercore.JDPromotional;
reader.readMessage(value,proto.jarviscrawlercore.JDPromotional.deserializeBinaryFromReader);
msg.addPromotionals(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.addCoupons(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.jarviscrawlercore.JDNormalPrice.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.jarviscrawlercore.JDNormalPrice.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.jarviscrawlercore.JDNormalPrice} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.jarviscrawlercore.JDNormalPrice.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getOldprice();
if (f !== 0.0) {
writer.writeFloat(
1,
f
);
}
f = message.getPrice();
if (f !== 0.0) {
writer.writeFloat(
2,
f
);
}
f = message.getPromotionalsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
3,
f,
proto.jarviscrawlercore.JDPromotional.serializeBinaryToWriter
);
}
f = message.getCouponsList();
if (f.length > 0) {
writer.writeRepeatedString(
4,
f
);
}
};
/**
* optional float oldPrice = 1;
* @return {number}
*/
proto.jarviscrawlercore.JDNormalPrice.prototype.getOldprice = function() {
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0));
};
/**
* @param {number} value
* @return {!proto.jarviscrawlercore.JDNormalPrice} returns this
*/
proto.jarviscrawlercore.JDNormalPrice.prototype.setOldprice = function(value) {
return jspb.Message.setProto3FloatField(this, 1, value);
};
/**
* optional float price = 2;
* @return {number}
*/
proto.jarviscrawlercore.JDNormalPrice.prototype.getPrice = function() {
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0));
};
/**
* @param {number} value
* @return {!proto.jarviscrawlercore.JDNormalPrice} returns this
*/
proto.jarviscrawlercore.JDNormalPrice.prototype.setPrice = function(value) {
return jspb.Message.setProto3FloatField(this, 2, value);
};
/**
* repeated JDPromotional promotionals = 3;
* @return {!Array<!proto.jarviscrawlercore.JDPromotional>}
*/
proto.jarviscrawlercore.JDNormalPrice.prototype.getPromotionalsList = function() {
return /** @type{!Array<!proto.jarviscrawlercore.JDPromotional>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.jarviscrawlercore.JDPromotional, 3));
};
/**
* @param {!Array<!proto.jarviscrawlercore.JDPromotional>} value
* @return {!proto.jarviscrawlercore.JDNormalPrice} returns this
*/
proto.jarviscrawlercore.JDNormalPrice.prototype.setPromotionalsList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 3, value);
};
/**
* @param {!proto.jarviscrawlercore.JDPromotional=} opt_value
* @param {number=} opt_index
* @return {!proto.jarviscrawlercore.JDPromotional}
*/
proto.jarviscrawlercore.JDNormalPrice.prototype.addPromotionals = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.jarviscrawlercore.JDPromotional, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.jarviscrawlercore.JDNormalPrice} returns this
*/
proto.jarviscrawlercore.JDNormalPrice.prototype.clearPromotionalsList = function() {
return this.setPromotionalsList([]);
};
/**
* repeated string coupons = 4;
* @return {!Array<string>}
*/
proto.jarviscrawlercore.JDNormalPrice.prototype.getCouponsList = function() {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 4));
};
/**
* @param {!Array<string>} value
* @return {!proto.jarviscrawlercore.JDNormalPrice} returns this
*/
proto.jarviscrawlercore.JDNormalPrice.prototype.setCouponsList = function(value) {
return jspb.Message.setField(this, 4, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.jarviscrawlercore.JDNormalPrice} returns this
*/
proto.jarviscrawlercore.JDNormalPrice.prototype.addCoupons = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 4, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.jarviscrawlercore.JDNormalPrice} returns this
*/
proto.jarviscrawlercore.JDNormalPrice.prototype.clearCouponsList = function() {
return this.setCouponsList([]);
};
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.jarviscrawlercore.JDSKUInfo.prototype.toObject = function(opt_includeInstance) {
return proto.jarviscrawlercore.JDSKUInfo.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.jarviscrawlercore.JDSKUInfo} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.jarviscrawlercore.JDSKUInfo.toObject = function(includeInstance, msg) {
var f, obj = {
skuid: jspb.Message.getFieldWithDefault(msg, 1, ""),
type: jspb.Message.getFieldWithDefault(msg, 2, ""),
color: jspb.Message.getFieldWithDefault(msg, 3, ""),
series: jspb.Message.getFieldWithDefault(msg, 4, ""),
variety: jspb.Message.getFieldWithDefault(msg, 5, ""),
size: jspb.Message.getFieldWithDefault(msg, 6, ""),
model: jspb.Message.getFieldWithDefault(msg, 7, ""),
purchase: jspb.Message.getFieldWithDefault(msg, 8, ""),
disabled: jspb.Message.getBooleanFieldWithDefault(msg, 9, false),
selected: jspb.Message.getBooleanFieldWithDefault(msg, 10, false),
category: jspb.Message.getFieldWithDefault(msg, 11, ""),
producttype: jspb.Message.getFieldWithDefault(msg, 12, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.jarviscrawlercore.JDSKUInfo}
*/
proto.jarviscrawlercore.JDSKUInfo.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.jarviscrawlercore.JDSKUInfo;
return proto.jarviscrawlercore.JDSKUInfo.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.jarviscrawlercore.JDSKUInfo} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.jarviscrawlercore.JDSKUInfo}
*/
proto.jarviscrawlercore.JDSKUInfo.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.setSkuid(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setType(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setColor(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setSeries(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setVariety(value);
break;
case 6:
var value = /** @type {string} */ (reader.readString());
msg.setSize(value);
break;
case 7:
var value = /** @type {string} */ (reader.readString());
msg.setModel(value);
break;
case 8:
var value = /** @type {string} */ (reader.readString());
msg.setPurchase(value);
break;
case 9:
var value = /** @type {boolean} */ (reader.readBool());
msg.setDisabled(value);
break;
case 10:
var value = /** @type {boolean} */ (reader.readBool());
msg.setSelected(value);
break;
case 11:
var value = /** @type {string} */ (reader.readString());
msg.setCategory(value);
break;
case 12:
var value = /** @type {string} */ (reader.readString());
msg.setProducttype(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.jarviscrawlercore.JDSKUInfo.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.jarviscrawlercore.JDSKUInfo.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.jarviscrawlercore.JDSKUInfo} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.jarviscrawlercore.JDSKUInfo.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSkuid();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getType();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getColor();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getSeries();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
f = message.getVariety();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
f = message.getSize();
if (f.length > 0) {
writer.writeString(
6,
f
);
}
f = message.getModel();
if (f.length > 0) {
writer.writeString(
7,
f
);
}
f = message.getPurchase();
if (f.length > 0) {
writer.writeString(
8,
f
);
}
f = message.getDisabled();
if (f) {
writer.writeBool(
9,
f
);
}
f = message.getSelected();
if (f) {
writer.writeBool(
10,
f
);
}
f = message.getCategory();
if (f.length > 0) {
writer.writeString(
11,
f
);
}
f = message.getProducttype();
if (f.length > 0) {
writer.writeString(
12,
f
);
}
};
/**
* optional string skuID = 1;
* @return {string}
*/
proto.jarviscrawlercore.JDSKUInfo.prototype.getSkuid = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.jarviscrawlercore.JDSKUInfo} returns this
*/
proto.jarviscrawlercore.JDSKUInfo.prototype.setSkuid = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string type = 2;
* @return {string}
*/
proto.jarviscrawlercore.JDSKUInfo.prototype.getType = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.jarviscrawlercore.JDSKUInfo} returns this
*/
proto.jarviscrawlercore.JDSKUInfo.prototype.setType = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string color = 3;
* @return {string}
*/
proto.jarviscrawlercore.JDSKUInfo.prototype.getColor = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.jarviscrawlercore.JDSKUInfo} returns this
*/
proto.jarviscrawlercore.JDSKUInfo.prototype.setColor = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional string series = 4;
* @return {string}
*/
proto.jarviscrawlercore.JDSKUInfo.prototype.getSeries = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.jarviscrawlercore.JDSKUInfo} returns this
*/
proto.jarviscrawlercore.JDSKUInfo.prototype.setSeries = function(value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* optional string variety = 5;
* @return {string}
*/
proto.jarviscrawlercore.JDSKUInfo.prototype.getVariety = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/**
* @param {string} value
* @return {!proto.jarviscrawlercore.JDSKUInfo} returns this
*/
proto.jarviscrawlercore.JDSKUInfo.prototype.setVariety = function(value) {
return jspb.Message.setProto3StringField(this, 5, value);
};
/**
* optional string size = 6;
* @return {string}
*/
proto.jarviscrawlercore.JDSKUInfo.prototype.getSize = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};
/**
* @param {string} value
* @return {!proto.jarviscrawlercore.JDSKUInfo} returns this
*/
proto.jarviscrawlercore.JDSKUInfo.prototype.setSize = function(value) {
return jspb.Message.setProto3StringField(this, 6, value);
};
/**
* optional string model = 7;
* @return {string}
*/
proto.jarviscrawlercore.JDSKUInfo.prototype.getModel = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
};
/**
* @param {string} value
* @return {!proto.jarviscrawlercore.JDSKUInfo} returns this
*/
proto.jarviscrawlercore.JDSKUInfo.prototype.setModel = function(value) {
return jspb.Message.setProto3StringField(this, 7, value);
};
/**
* optional string purchase = 8;
* @return {string}
*/
proto.jarviscrawlercore.JDSKUInfo.prototype.getPurchase = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
};
/**
* @param {string} value
* @return {!proto.jarviscrawlercore.JDSKUInfo} returns this
*/
proto.jarviscrawlercore.JDSKUInfo.prototype.setPurchase = function(value) {
return jspb.Message.setProto3StringField(this, 8, value);
};
/**
* optional bool disabled = 9;
* @return {boolean}
*/
proto.jarviscrawlercore.JDSKUInfo.prototype.getDisabled = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false));
};
/**
* @param {boolean} value
* @return {!proto.jarviscrawlercore.JDSKUInfo} returns this
*/
proto.jarviscrawlercore.JDSKUInfo.prototype.setDisabled = function(value) {
return jspb.Message.setProto3BooleanField(this, 9, value);
};
/**
* optional bool selected = 10;
* @return {boolean}
*/
proto.jarviscrawlercore.JDSKUInfo.prototype.getSelected = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false));
};
/**
* @param {boolean} value
* @return {!proto.jarviscrawlercore.JDSKUInfo} returns this
*/
proto.jarviscrawlercore.JDSKUInfo.prototype.setSelected = function(value) {
return jspb.Message.setProto3BooleanField(this, 10, value);
};
/**
* optional string category = 11;
* @return {string}
*/
proto.jarviscrawlercore.JDSKUInfo.prototype.getCategory = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, ""));
};
/**
* @param {string} value
* @return {!proto.jarviscrawlercore.JDSKUInfo} returns this
*/
proto.jarviscrawlercore.JDSKUInfo.prototype.setCategory = function(value) {
return jspb.Message.setProto3StringField(this, 11, value);
};
/**
* optional string productType = 12;
* @return {string}
*/
proto.jarviscrawlercore.JDSKUInfo.prototype.getProducttype = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, ""));
};
/**
* @param {string} value
* @return {!proto.jarviscrawlercore.JDSKUInfo} returns this
*/
proto.jarviscrawlercore.JDSKUInfo.prototype.setProducttype = function(value) {
return jspb.Message.setProto3StringField(this, 12, 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.jarviscrawlercore.JDCommentsType.prototype.toObject = function(opt_includeInstance) {
return proto.jarviscrawlercore.JDCommentsType.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.jarviscrawlercore.JDCommentsType} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.jarviscrawlercore.JDCommentsType.toObject = function(includeInstance, msg) {
var f, obj = {
type: jspb.Message.getFieldWithDefault(msg, 1, ""),
nums: 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.jarviscrawlercore.JDCommentsType}
*/
proto.jarviscrawlercore.JDCommentsType.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.jarviscrawlercore.JDCommentsType;
return proto.jarviscrawlercore.JDCommentsType.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.jarviscrawlercore.JDCommentsType} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.jarviscrawlercore.JDCommentsType}
*/
proto.jarviscrawlercore.JDCommentsType.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.setType(value);
break;
case 2:
var value = /** @type {number} */ (reader.readInt32());
msg.setNums(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.jarviscrawlercore.JDCommentsType.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.jarviscrawlercore.JDCommentsType.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.jarviscrawlercore.JDCommentsType} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.jarviscrawlercore.JDCommentsType.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getType();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getNums();
if (f !== 0) {
writer.writeInt32(
2,
f
);
}
};
/**
* optional string type = 1;
* @return {string}
*/
proto.jarviscrawlercore.JDCommentsType.prototype.getType = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.ja