jarviscrawlercore
Version:
jarvis crawler core
1,307 lines (1,130 loc) • 40.2 kB
JavaScript
// source: investing.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.InvestingAsset', null, global);
goog.exportSymbol('proto.jarviscrawlercore.InvestingAssets', null, global);
goog.exportSymbol('proto.jarviscrawlercore.InvestingHistoricalData', null, global);
goog.exportSymbol('proto.jarviscrawlercore.InvestingMode', null, global);
goog.exportSymbol('proto.jarviscrawlercore.ReplyInvesting', null, global);
goog.exportSymbol('proto.jarviscrawlercore.ReplyInvesting.ReplyCase', null, global);
goog.exportSymbol('proto.jarviscrawlercore.RequestInvesting', 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.InvestingHistoricalData = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.jarviscrawlercore.InvestingHistoricalData, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.jarviscrawlercore.InvestingHistoricalData.displayName = 'proto.jarviscrawlercore.InvestingHistoricalData';
}
/**
* 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.InvestingAsset = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.jarviscrawlercore.InvestingAsset.repeatedFields_, null);
};
goog.inherits(proto.jarviscrawlercore.InvestingAsset, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.jarviscrawlercore.InvestingAsset.displayName = 'proto.jarviscrawlercore.InvestingAsset';
}
/**
* 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.InvestingAssets = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.jarviscrawlercore.InvestingAssets.repeatedFields_, null);
};
goog.inherits(proto.jarviscrawlercore.InvestingAssets, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.jarviscrawlercore.InvestingAssets.displayName = 'proto.jarviscrawlercore.InvestingAssets';
}
/**
* 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.RequestInvesting = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.jarviscrawlercore.RequestInvesting, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.jarviscrawlercore.RequestInvesting.displayName = 'proto.jarviscrawlercore.RequestInvesting';
}
/**
* 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.ReplyInvesting = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.jarviscrawlercore.ReplyInvesting.oneofGroups_);
};
goog.inherits(proto.jarviscrawlercore.ReplyInvesting, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.jarviscrawlercore.ReplyInvesting.displayName = 'proto.jarviscrawlercore.ReplyInvesting';
}
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.InvestingHistoricalData.prototype.toObject = function(opt_includeInstance) {
return proto.jarviscrawlercore.InvestingHistoricalData.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.InvestingHistoricalData} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.jarviscrawlercore.InvestingHistoricalData.toObject = function(includeInstance, msg) {
var f, obj = {
ts: jspb.Message.getFieldWithDefault(msg, 1, 0),
open: jspb.Message.getFieldWithDefault(msg, 2, 0),
close: jspb.Message.getFieldWithDefault(msg, 3, 0),
high: jspb.Message.getFieldWithDefault(msg, 4, 0),
low: jspb.Message.getFieldWithDefault(msg, 5, 0),
volume: jspb.Message.getFieldWithDefault(msg, 6, 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.InvestingHistoricalData}
*/
proto.jarviscrawlercore.InvestingHistoricalData.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.jarviscrawlercore.InvestingHistoricalData;
return proto.jarviscrawlercore.InvestingHistoricalData.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.jarviscrawlercore.InvestingHistoricalData} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.jarviscrawlercore.InvestingHistoricalData}
*/
proto.jarviscrawlercore.InvestingHistoricalData.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readInt64());
msg.setTs(value);
break;
case 2:
var value = /** @type {number} */ (reader.readInt64());
msg.setOpen(value);
break;
case 3:
var value = /** @type {number} */ (reader.readInt64());
msg.setClose(value);
break;
case 4:
var value = /** @type {number} */ (reader.readInt64());
msg.setHigh(value);
break;
case 5:
var value = /** @type {number} */ (reader.readInt64());
msg.setLow(value);
break;
case 6:
var value = /** @type {number} */ (reader.readInt64());
msg.setVolume(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.jarviscrawlercore.InvestingHistoricalData.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.jarviscrawlercore.InvestingHistoricalData.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.InvestingHistoricalData} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.jarviscrawlercore.InvestingHistoricalData.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getTs();
if (f !== 0) {
writer.writeInt64(
1,
f
);
}
f = message.getOpen();
if (f !== 0) {
writer.writeInt64(
2,
f
);
}
f = message.getClose();
if (f !== 0) {
writer.writeInt64(
3,
f
);
}
f = message.getHigh();
if (f !== 0) {
writer.writeInt64(
4,
f
);
}
f = message.getLow();
if (f !== 0) {
writer.writeInt64(
5,
f
);
}
f = message.getVolume();
if (f !== 0) {
writer.writeInt64(
6,
f
);
}
};
/**
* optional int64 ts = 1;
* @return {number}
*/
proto.jarviscrawlercore.InvestingHistoricalData.prototype.getTs = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.jarviscrawlercore.InvestingHistoricalData} returns this
*/
proto.jarviscrawlercore.InvestingHistoricalData.prototype.setTs = function(value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional int64 open = 2;
* @return {number}
*/
proto.jarviscrawlercore.InvestingHistoricalData.prototype.getOpen = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {number} value
* @return {!proto.jarviscrawlercore.InvestingHistoricalData} returns this
*/
proto.jarviscrawlercore.InvestingHistoricalData.prototype.setOpen = function(value) {
return jspb.Message.setProto3IntField(this, 2, value);
};
/**
* optional int64 close = 3;
* @return {number}
*/
proto.jarviscrawlercore.InvestingHistoricalData.prototype.getClose = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/**
* @param {number} value
* @return {!proto.jarviscrawlercore.InvestingHistoricalData} returns this
*/
proto.jarviscrawlercore.InvestingHistoricalData.prototype.setClose = function(value) {
return jspb.Message.setProto3IntField(this, 3, value);
};
/**
* optional int64 high = 4;
* @return {number}
*/
proto.jarviscrawlercore.InvestingHistoricalData.prototype.getHigh = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/**
* @param {number} value
* @return {!proto.jarviscrawlercore.InvestingHistoricalData} returns this
*/
proto.jarviscrawlercore.InvestingHistoricalData.prototype.setHigh = function(value) {
return jspb.Message.setProto3IntField(this, 4, value);
};
/**
* optional int64 low = 5;
* @return {number}
*/
proto.jarviscrawlercore.InvestingHistoricalData.prototype.getLow = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
};
/**
* @param {number} value
* @return {!proto.jarviscrawlercore.InvestingHistoricalData} returns this
*/
proto.jarviscrawlercore.InvestingHistoricalData.prototype.setLow = function(value) {
return jspb.Message.setProto3IntField(this, 5, value);
};
/**
* optional int64 volume = 6;
* @return {number}
*/
proto.jarviscrawlercore.InvestingHistoricalData.prototype.getVolume = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
};
/**
* @param {number} value
* @return {!proto.jarviscrawlercore.InvestingHistoricalData} returns this
*/
proto.jarviscrawlercore.InvestingHistoricalData.prototype.setVolume = function(value) {
return jspb.Message.setProto3IntField(this, 6, value);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.jarviscrawlercore.InvestingAsset.repeatedFields_ = [3];
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.InvestingAsset.prototype.toObject = function(opt_includeInstance) {
return proto.jarviscrawlercore.InvestingAsset.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.InvestingAsset} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.jarviscrawlercore.InvestingAsset.toObject = function(includeInstance, msg) {
var f, obj = {
name: jspb.Message.getFieldWithDefault(msg, 1, ""),
url: jspb.Message.getFieldWithDefault(msg, 2, ""),
dataList: jspb.Message.toObjectList(msg.getDataList(),
proto.jarviscrawlercore.InvestingHistoricalData.toObject, includeInstance),
namecode: jspb.Message.getFieldWithDefault(msg, 4, "")
};
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.InvestingAsset}
*/
proto.jarviscrawlercore.InvestingAsset.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.jarviscrawlercore.InvestingAsset;
return proto.jarviscrawlercore.InvestingAsset.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.jarviscrawlercore.InvestingAsset} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.jarviscrawlercore.InvestingAsset}
*/
proto.jarviscrawlercore.InvestingAsset.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.setName(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setUrl(value);
break;
case 3:
var value = new proto.jarviscrawlercore.InvestingHistoricalData;
reader.readMessage(value,proto.jarviscrawlercore.InvestingHistoricalData.deserializeBinaryFromReader);
msg.addData(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setNamecode(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.jarviscrawlercore.InvestingAsset.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.jarviscrawlercore.InvestingAsset.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.InvestingAsset} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.jarviscrawlercore.InvestingAsset.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getName();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getUrl();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getDataList();
if (f.length > 0) {
writer.writeRepeatedMessage(
3,
f,
proto.jarviscrawlercore.InvestingHistoricalData.serializeBinaryToWriter
);
}
f = message.getNamecode();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
};
/**
* optional string name = 1;
* @return {string}
*/
proto.jarviscrawlercore.InvestingAsset.prototype.getName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.jarviscrawlercore.InvestingAsset} returns this
*/
proto.jarviscrawlercore.InvestingAsset.prototype.setName = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string url = 2;
* @return {string}
*/
proto.jarviscrawlercore.InvestingAsset.prototype.getUrl = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.jarviscrawlercore.InvestingAsset} returns this
*/
proto.jarviscrawlercore.InvestingAsset.prototype.setUrl = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* repeated InvestingHistoricalData data = 3;
* @return {!Array<!proto.jarviscrawlercore.InvestingHistoricalData>}
*/
proto.jarviscrawlercore.InvestingAsset.prototype.getDataList = function() {
return /** @type{!Array<!proto.jarviscrawlercore.InvestingHistoricalData>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.jarviscrawlercore.InvestingHistoricalData, 3));
};
/**
* @param {!Array<!proto.jarviscrawlercore.InvestingHistoricalData>} value
* @return {!proto.jarviscrawlercore.InvestingAsset} returns this
*/
proto.jarviscrawlercore.InvestingAsset.prototype.setDataList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 3, value);
};
/**
* @param {!proto.jarviscrawlercore.InvestingHistoricalData=} opt_value
* @param {number=} opt_index
* @return {!proto.jarviscrawlercore.InvestingHistoricalData}
*/
proto.jarviscrawlercore.InvestingAsset.prototype.addData = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.jarviscrawlercore.InvestingHistoricalData, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.jarviscrawlercore.InvestingAsset} returns this
*/
proto.jarviscrawlercore.InvestingAsset.prototype.clearDataList = function() {
return this.setDataList([]);
};
/**
* optional string nameCode = 4;
* @return {string}
*/
proto.jarviscrawlercore.InvestingAsset.prototype.getNamecode = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.jarviscrawlercore.InvestingAsset} returns this
*/
proto.jarviscrawlercore.InvestingAsset.prototype.setNamecode = function(value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.jarviscrawlercore.InvestingAssets.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.jarviscrawlercore.InvestingAssets.prototype.toObject = function(opt_includeInstance) {
return proto.jarviscrawlercore.InvestingAssets.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.InvestingAssets} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.jarviscrawlercore.InvestingAssets.toObject = function(includeInstance, msg) {
var f, obj = {
assetsList: jspb.Message.toObjectList(msg.getAssetsList(),
proto.jarviscrawlercore.InvestingAsset.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.jarviscrawlercore.InvestingAssets}
*/
proto.jarviscrawlercore.InvestingAssets.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.jarviscrawlercore.InvestingAssets;
return proto.jarviscrawlercore.InvestingAssets.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.jarviscrawlercore.InvestingAssets} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.jarviscrawlercore.InvestingAssets}
*/
proto.jarviscrawlercore.InvestingAssets.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.jarviscrawlercore.InvestingAsset;
reader.readMessage(value,proto.jarviscrawlercore.InvestingAsset.deserializeBinaryFromReader);
msg.addAssets(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.jarviscrawlercore.InvestingAssets.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.jarviscrawlercore.InvestingAssets.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.InvestingAssets} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.jarviscrawlercore.InvestingAssets.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getAssetsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
f,
proto.jarviscrawlercore.InvestingAsset.serializeBinaryToWriter
);
}
};
/**
* repeated InvestingAsset assets = 1;
* @return {!Array<!proto.jarviscrawlercore.InvestingAsset>}
*/
proto.jarviscrawlercore.InvestingAssets.prototype.getAssetsList = function() {
return /** @type{!Array<!proto.jarviscrawlercore.InvestingAsset>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.jarviscrawlercore.InvestingAsset, 1));
};
/**
* @param {!Array<!proto.jarviscrawlercore.InvestingAsset>} value
* @return {!proto.jarviscrawlercore.InvestingAssets} returns this
*/
proto.jarviscrawlercore.InvestingAssets.prototype.setAssetsList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 1, value);
};
/**
* @param {!proto.jarviscrawlercore.InvestingAsset=} opt_value
* @param {number=} opt_index
* @return {!proto.jarviscrawlercore.InvestingAsset}
*/
proto.jarviscrawlercore.InvestingAssets.prototype.addAssets = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.jarviscrawlercore.InvestingAsset, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.jarviscrawlercore.InvestingAssets} returns this
*/
proto.jarviscrawlercore.InvestingAssets.prototype.clearAssetsList = function() {
return this.setAssetsList([]);
};
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.RequestInvesting.prototype.toObject = function(opt_includeInstance) {
return proto.jarviscrawlercore.RequestInvesting.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.RequestInvesting} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.jarviscrawlercore.RequestInvesting.toObject = function(includeInstance, msg) {
var f, obj = {
mode: jspb.Message.getFieldWithDefault(msg, 1, 0),
url: jspb.Message.getFieldWithDefault(msg, 2, ""),
startdata: jspb.Message.getFieldWithDefault(msg, 3, ""),
enddata: jspb.Message.getFieldWithDefault(msg, 4, "")
};
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.RequestInvesting}
*/
proto.jarviscrawlercore.RequestInvesting.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.jarviscrawlercore.RequestInvesting;
return proto.jarviscrawlercore.RequestInvesting.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.jarviscrawlercore.RequestInvesting} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.jarviscrawlercore.RequestInvesting}
*/
proto.jarviscrawlercore.RequestInvesting.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!proto.jarviscrawlercore.InvestingMode} */ (reader.readEnum());
msg.setMode(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setUrl(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setStartdata(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setEnddata(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.jarviscrawlercore.RequestInvesting.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.jarviscrawlercore.RequestInvesting.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.RequestInvesting} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.jarviscrawlercore.RequestInvesting.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getMode();
if (f !== 0.0) {
writer.writeEnum(
1,
f
);
}
f = message.getUrl();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getStartdata();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getEnddata();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
};
/**
* optional InvestingMode mode = 1;
* @return {!proto.jarviscrawlercore.InvestingMode}
*/
proto.jarviscrawlercore.RequestInvesting.prototype.getMode = function() {
return /** @type {!proto.jarviscrawlercore.InvestingMode} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {!proto.jarviscrawlercore.InvestingMode} value
* @return {!proto.jarviscrawlercore.RequestInvesting} returns this
*/
proto.jarviscrawlercore.RequestInvesting.prototype.setMode = function(value) {
return jspb.Message.setProto3EnumField(this, 1, value);
};
/**
* optional string url = 2;
* @return {string}
*/
proto.jarviscrawlercore.RequestInvesting.prototype.getUrl = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.jarviscrawlercore.RequestInvesting} returns this
*/
proto.jarviscrawlercore.RequestInvesting.prototype.setUrl = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string startData = 3;
* @return {string}
*/
proto.jarviscrawlercore.RequestInvesting.prototype.getStartdata = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.jarviscrawlercore.RequestInvesting} returns this
*/
proto.jarviscrawlercore.RequestInvesting.prototype.setStartdata = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional string endData = 4;
* @return {string}
*/
proto.jarviscrawlercore.RequestInvesting.prototype.getEnddata = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.jarviscrawlercore.RequestInvesting} returns this
*/
proto.jarviscrawlercore.RequestInvesting.prototype.setEnddata = function(value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* Oneof group definitions for this message. Each group defines the field
* numbers belonging to that group. When of these fields' value is set, all
* other fields in the group are cleared. During deserialization, if multiple
* fields are encountered for a group, only the last value seen will be kept.
* @private {!Array<!Array<number>>}
* @const
*/
proto.jarviscrawlercore.ReplyInvesting.oneofGroups_ = [[100,101]];
/**
* @enum {number}
*/
proto.jarviscrawlercore.ReplyInvesting.ReplyCase = {
REPLY_NOT_SET: 0,
ASSET: 100,
ASSETS: 101
};
/**
* @return {proto.jarviscrawlercore.ReplyInvesting.ReplyCase}
*/
proto.jarviscrawlercore.ReplyInvesting.prototype.getReplyCase = function() {
return /** @type {proto.jarviscrawlercore.ReplyInvesting.ReplyCase} */(jspb.Message.computeOneofCase(this, proto.jarviscrawlercore.ReplyInvesting.oneofGroups_[0]));
};
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.ReplyInvesting.prototype.toObject = function(opt_includeInstance) {
return proto.jarviscrawlercore.ReplyInvesting.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.ReplyInvesting} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.jarviscrawlercore.ReplyInvesting.toObject = function(includeInstance, msg) {
var f, obj = {
mode: jspb.Message.getFieldWithDefault(msg, 1, 0),
asset: (f = msg.getAsset()) && proto.jarviscrawlercore.InvestingAsset.toObject(includeInstance, f),
assets: (f = msg.getAssets()) && proto.jarviscrawlercore.InvestingAssets.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.jarviscrawlercore.ReplyInvesting}
*/
proto.jarviscrawlercore.ReplyInvesting.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.jarviscrawlercore.ReplyInvesting;
return proto.jarviscrawlercore.ReplyInvesting.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.jarviscrawlercore.ReplyInvesting} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.jarviscrawlercore.ReplyInvesting}
*/
proto.jarviscrawlercore.ReplyInvesting.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!proto.jarviscrawlercore.InvestingMode} */ (reader.readEnum());
msg.setMode(value);
break;
case 100:
var value = new proto.jarviscrawlercore.InvestingAsset;
reader.readMessage(value,proto.jarviscrawlercore.InvestingAsset.deserializeBinaryFromReader);
msg.setAsset(value);
break;
case 101:
var value = new proto.jarviscrawlercore.InvestingAssets;
reader.readMessage(value,proto.jarviscrawlercore.InvestingAssets.deserializeBinaryFromReader);
msg.setAssets(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.jarviscrawlercore.ReplyInvesting.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.jarviscrawlercore.ReplyInvesting.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.ReplyInvesting} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.jarviscrawlercore.ReplyInvesting.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getMode();
if (f !== 0.0) {
writer.writeEnum(
1,
f
);
}
f = message.getAsset();
if (f != null) {
writer.writeMessage(
100,
f,
proto.jarviscrawlercore.InvestingAsset.serializeBinaryToWriter
);
}
f = message.getAssets();
if (f != null) {
writer.writeMessage(
101,
f,
proto.jarviscrawlercore.InvestingAssets.serializeBinaryToWriter
);
}
};
/**
* optional InvestingMode mode = 1;
* @return {!proto.jarviscrawlercore.InvestingMode}
*/
proto.jarviscrawlercore.ReplyInvesting.prototype.getMode = function() {
return /** @type {!proto.jarviscrawlercore.InvestingMode} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {!proto.jarviscrawlercore.InvestingMode} value
* @return {!proto.jarviscrawlercore.ReplyInvesting} returns this
*/
proto.jarviscrawlercore.ReplyInvesting.prototype.setMode = function(value) {
return jspb.Message.setProto3EnumField(this, 1, value);
};
/**
* optional InvestingAsset asset = 100;
* @return {?proto.jarviscrawlercore.InvestingAsset}
*/
proto.jarviscrawlercore.ReplyInvesting.prototype.getAsset = function() {
return /** @type{?proto.jarviscrawlercore.InvestingAsset} */ (
jspb.Message.getWrapperField(this, proto.jarviscrawlercore.InvestingAsset, 100));
};
/**
* @param {?proto.jarviscrawlercore.InvestingAsset|undefined} value
* @return {!proto.jarviscrawlercore.ReplyInvesting} returns this
*/
proto.jarviscrawlercore.ReplyInvesting.prototype.setAsset = function(value) {
return jspb.Message.setOneofWrapperField(this, 100, proto.jarviscrawlercore.ReplyInvesting.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.jarviscrawlercore.ReplyInvesting} returns this
*/
proto.jarviscrawlercore.ReplyInvesting.prototype.clearAsset = function() {
return this.setAsset(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.jarviscrawlercore.ReplyInvesting.prototype.hasAsset = function() {
return jspb.Message.getField(this, 100) != null;
};
/**
* optional InvestingAssets assets = 101;
* @return {?proto.jarviscrawlercore.InvestingAssets}
*/
proto.jarviscrawlercore.ReplyInvesting.prototype.getAssets = function() {
return /** @type{?proto.jarviscrawlercore.InvestingAssets} */ (
jspb.Message.getWrapperField(this, proto.jarviscrawlercore.InvestingAssets, 101));
};
/**
* @param {?proto.jarviscrawlercore.InvestingAssets|undefined} value
* @return {!proto.jarviscrawlercore.ReplyInvesting} returns this
*/
proto.jarviscrawlercore.ReplyInvesting.prototype.setAssets = function(value) {
return jspb.Message.setOneofWrapperField(this, 101, proto.jarviscrawlercore.ReplyInvesting.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.jarviscrawlercore.ReplyInvesting} returns this
*/
proto.jarviscrawlercore.ReplyInvesting.prototype.clearAssets = function() {
return this.setAssets(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.jarviscrawlercore.ReplyInvesting.prototype.hasAssets = function() {
return jspb.Message.getField(this, 101) != null;
};
/**
* @enum {number}
*/
proto.jarviscrawlercore.InvestingMode = {
INVESTINGMODE_ASSETS: 0,
INVESTINGMODE_ASSET: 1,
INVESTINGMODE_HD: 2
};
goog.object.extend(exports, proto.jarviscrawlercore);