From d8d4361756161ee696d88f94d2dc404324472190 Mon Sep 17 00:00:00 2001 From: fish <920886811@163.com> Date: Thu, 18 Aug 2022 17:10:35 +0800 Subject: [PATCH] feat: add score --- js/protos/score/score_pb.js | 7689 ++++++++++++++++++++++++++++ protos/score/score.pb.go | 9670 +++++++++++++++++++++++++++++++++++ protos/score/score.proto | 313 ++ utils/grpc/client.go | 3 + utils/grpc/score.go | 19 + utils/grpc/setup_server.go | 5 + 6 files changed, 17699 insertions(+) create mode 100644 js/protos/score/score_pb.js create mode 100644 protos/score/score.pb.go create mode 100644 protos/score/score.proto create mode 100644 utils/grpc/score.go diff --git a/js/protos/score/score_pb.js b/js/protos/score/score_pb.js new file mode 100644 index 0000000..f544fa1 --- /dev/null +++ b/js/protos/score/score_pb.js @@ -0,0 +1,7689 @@ +// source: protos/score/score.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')(); + +var github_com_tron$us_protobuf_gogoproto_gogo_pb = require('../../github.com/tron-us/protobuf/gogoproto/gogo_pb.js'); +goog.object.extend(proto, github_com_tron$us_protobuf_gogoproto_gogo_pb); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +goog.exportSymbol('proto.score.Host', null, global); +goog.exportSymbol('proto.score.HostsData', null, global); +goog.exportSymbol('proto.score.HostsReq', null, global); +goog.exportSymbol('proto.score.HostsReq.Mode', null, global); +goog.exportSymbol('proto.score.HostsResp', null, global); +goog.exportSymbol('proto.score.Location', null, global); +goog.exportSymbol('proto.score.Node', null, global); +goog.exportSymbol('proto.score.Node.ExperimentalFlags', null, global); +goog.exportSymbol('proto.score.Node.Geo', null, global); +goog.exportSymbol('proto.score.Node.Settings', null, global); +goog.exportSymbol('proto.score.NodeRole', null, global); +goog.exportSymbol('proto.score.NodesReq', null, global); +goog.exportSymbol('proto.score.ResponseCode', null, global); +goog.exportSymbol('proto.score.RolesHostsReq', null, global); +goog.exportSymbol('proto.score.SettingsData', null, global); +goog.exportSymbol('proto.score.SettingsReq', null, global); +goog.exportSymbol('proto.score.SettingsResp', null, global); +goog.exportSymbol('proto.score.StatsReq', null, global); +goog.exportSymbol('proto.score.StatsResp', null, global); +goog.exportSymbol('proto.score.StorageStat', null, global); +goog.exportSymbol('proto.score.StorageStat.Host', null, global); +goog.exportSymbol('proto.score.StorageStat.HostStats', null, global); +goog.exportSymbol('proto.score.StorageStat.Renter', 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.score.NodesReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.score.NodesReq.repeatedFields_, null); +}; +goog.inherits(proto.score.NodesReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.score.NodesReq.displayName = 'proto.score.NodesReq'; +} +/** + * 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.score.SettingsReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.score.SettingsReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.score.SettingsReq.displayName = 'proto.score.SettingsReq'; +} +/** + * 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.score.SettingsResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.score.SettingsResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.score.SettingsResp.displayName = 'proto.score.SettingsResp'; +} +/** + * 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.score.SettingsData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.score.SettingsData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.score.SettingsData.displayName = 'proto.score.SettingsData'; +} +/** + * 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.score.HostsReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.score.HostsReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.score.HostsReq.displayName = 'proto.score.HostsReq'; +} +/** + * 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.score.RolesHostsReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.score.RolesHostsReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.score.RolesHostsReq.displayName = 'proto.score.RolesHostsReq'; +} +/** + * 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.score.HostsResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.score.HostsResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.score.HostsResp.displayName = 'proto.score.HostsResp'; +} +/** + * 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.score.StatsReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.score.StatsReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.score.StatsReq.displayName = 'proto.score.StatsReq'; +} +/** + * 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.score.StatsResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.score.StatsResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.score.StatsResp.displayName = 'proto.score.StatsResp'; +} +/** + * 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.score.Host = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.score.Host.repeatedFields_, null); +}; +goog.inherits(proto.score.Host, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.score.Host.displayName = 'proto.score.Host'; +} +/** + * 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.score.HostsData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.score.HostsData.repeatedFields_, null); +}; +goog.inherits(proto.score.HostsData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.score.HostsData.displayName = 'proto.score.HostsData'; +} +/** + * 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.score.Location = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.score.Location, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.score.Location.displayName = 'proto.score.Location'; +} +/** + * 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.score.StorageStat = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.score.StorageStat, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.score.StorageStat.displayName = 'proto.score.StorageStat'; +} +/** + * 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.score.StorageStat.HostStats = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.score.StorageStat.HostStats, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.score.StorageStat.HostStats.displayName = 'proto.score.StorageStat.HostStats'; +} +/** + * 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.score.StorageStat.Host = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.score.StorageStat.Host, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.score.StorageStat.Host.displayName = 'proto.score.StorageStat.Host'; +} +/** + * 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.score.StorageStat.Renter = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.score.StorageStat.Renter, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.score.StorageStat.Renter.displayName = 'proto.score.StorageStat.Renter'; +} +/** + * 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.score.Node = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.score.Node, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.score.Node.displayName = 'proto.score.Node'; +} +/** + * 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.score.Node.Settings = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.score.Node.Settings.repeatedFields_, null); +}; +goog.inherits(proto.score.Node.Settings, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.score.Node.Settings.displayName = 'proto.score.Node.Settings'; +} +/** + * 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.score.Node.Geo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.score.Node.Geo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.score.Node.Geo.displayName = 'proto.score.Node.Geo'; +} +/** + * 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.score.Node.ExperimentalFlags = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.score.Node.ExperimentalFlags, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.score.Node.ExperimentalFlags.displayName = 'proto.score.Node.ExperimentalFlags'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.score.NodesReq.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_, 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.score.NodesReq.prototype.toObject = function(opt_includeInstance) { + return proto.score.NodesReq.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.score.NodesReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.NodesReq.toObject = function(includeInstance, msg) { + var f, obj = { + nodeIdList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, + requesterId: jspb.Message.getFieldWithDefault(msg, 2, ""), + signature: msg.getSignature_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.score.NodesReq} + */ +proto.score.NodesReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.score.NodesReq; + return proto.score.NodesReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.score.NodesReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.score.NodesReq} + */ +proto.score.NodesReq.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.addNodeId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setRequesterId(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSignature(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.score.NodesReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.score.NodesReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.score.NodesReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.NodesReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNodeIdList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } + f = message.getRequesterId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSignature_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * repeated string node_id = 1; + * @return {!Array} + */ +proto.score.NodesReq.prototype.getNodeIdList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.score.NodesReq} returns this + */ +proto.score.NodesReq.prototype.setNodeIdList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.score.NodesReq} returns this + */ +proto.score.NodesReq.prototype.addNodeId = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.score.NodesReq} returns this + */ +proto.score.NodesReq.prototype.clearNodeIdList = function() { + return this.setNodeIdList([]); +}; + + +/** + * optional string requester_id = 2; + * @return {string} + */ +proto.score.NodesReq.prototype.getRequesterId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.NodesReq} returns this + */ +proto.score.NodesReq.prototype.setRequesterId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bytes signature = 3; + * @return {!(string|Uint8Array)} + */ +proto.score.NodesReq.prototype.getSignature = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes signature = 3; + * This is a type-conversion wrapper around `getSignature()` + * @return {string} + */ +proto.score.NodesReq.prototype.getSignature_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSignature())); +}; + + +/** + * optional bytes signature = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignature()` + * @return {!Uint8Array} + */ +proto.score.NodesReq.prototype.getSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignature())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.score.NodesReq} returns this + */ +proto.score.NodesReq.prototype.setSignature = function(value) { + return jspb.Message.setProto3BytesField(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_, 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.score.SettingsReq.prototype.toObject = function(opt_includeInstance) { + return proto.score.SettingsReq.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.score.SettingsReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.SettingsReq.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + respSize: 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.score.SettingsReq} + */ +proto.score.SettingsReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.score.SettingsReq; + return proto.score.SettingsReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.score.SettingsReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.score.SettingsReq} + */ +proto.score.SettingsReq.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 {number} */ (reader.readInt32()); + msg.setRespSize(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.score.SettingsReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.score.SettingsReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.score.SettingsReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.SettingsReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRespSize(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.score.SettingsReq.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.SettingsReq} returns this + */ +proto.score.SettingsReq.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int32 resp_size = 2; + * @return {number} + */ +proto.score.SettingsReq.prototype.getRespSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.SettingsReq} returns this + */ +proto.score.SettingsReq.prototype.setRespSize = function(value) { + return jspb.Message.setProto3IntField(this, 2, 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_, 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.score.SettingsResp.prototype.toObject = function(opt_includeInstance) { + return proto.score.SettingsResp.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.score.SettingsResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.SettingsResp.toObject = function(includeInstance, msg) { + var f, obj = { + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + message: jspb.Message.getFieldWithDefault(msg, 2, ""), + responseTime: (f = msg.getResponseTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + settingsData: (f = msg.getSettingsData()) && proto.score.SettingsData.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.score.SettingsResp} + */ +proto.score.SettingsResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.score.SettingsResp; + return proto.score.SettingsResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.score.SettingsResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.score.SettingsResp} + */ +proto.score.SettingsResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.score.ResponseCode} */ (reader.readEnum()); + msg.setCode(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + case 3: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setResponseTime(value); + break; + case 4: + var value = new proto.score.SettingsData; + reader.readMessage(value,proto.score.SettingsData.deserializeBinaryFromReader); + msg.setSettingsData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.score.SettingsResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.score.SettingsResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.score.SettingsResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.SettingsResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCode(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getResponseTime(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getSettingsData(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.score.SettingsData.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ResponseCode code = 1; + * @return {!proto.score.ResponseCode} + */ +proto.score.SettingsResp.prototype.getCode = function() { + return /** @type {!proto.score.ResponseCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.score.ResponseCode} value + * @return {!proto.score.SettingsResp} returns this + */ +proto.score.SettingsResp.prototype.setCode = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string message = 2; + * @return {string} + */ +proto.score.SettingsResp.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.SettingsResp} returns this + */ +proto.score.SettingsResp.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional google.protobuf.Timestamp response_time = 3; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.score.SettingsResp.prototype.getResponseTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.score.SettingsResp} returns this +*/ +proto.score.SettingsResp.prototype.setResponseTime = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.score.SettingsResp} returns this + */ +proto.score.SettingsResp.prototype.clearResponseTime = function() { + return this.setResponseTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.score.SettingsResp.prototype.hasResponseTime = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional SettingsData settings_data = 4; + * @return {?proto.score.SettingsData} + */ +proto.score.SettingsResp.prototype.getSettingsData = function() { + return /** @type{?proto.score.SettingsData} */ ( + jspb.Message.getWrapperField(this, proto.score.SettingsData, 4)); +}; + + +/** + * @param {?proto.score.SettingsData|undefined} value + * @return {!proto.score.SettingsResp} returns this +*/ +proto.score.SettingsResp.prototype.setSettingsData = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.score.SettingsResp} returns this + */ +proto.score.SettingsResp.prototype.clearSettingsData = function() { + return this.setSettingsData(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.score.SettingsResp.prototype.hasSettingsData = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, 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.score.SettingsData.prototype.toObject = function(opt_includeInstance) { + return proto.score.SettingsData.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.score.SettingsData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.SettingsData.toObject = function(includeInstance, msg) { + var f, obj = { + storagePriceAsk: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0), + bandwidthPriceAsk: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), + storageTimeMin: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0), + bandwidthLimit: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0), + collateralStake: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 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.score.SettingsData} + */ +proto.score.SettingsData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.score.SettingsData; + return proto.score.SettingsData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.score.SettingsData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.score.SettingsData} + */ +proto.score.SettingsData.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readDouble()); + msg.setStoragePriceAsk(value); + break; + case 2: + var value = /** @type {number} */ (reader.readDouble()); + msg.setBandwidthPriceAsk(value); + break; + case 3: + var value = /** @type {number} */ (reader.readDouble()); + msg.setStorageTimeMin(value); + break; + case 4: + var value = /** @type {number} */ (reader.readDouble()); + msg.setBandwidthLimit(value); + break; + case 5: + var value = /** @type {number} */ (reader.readDouble()); + msg.setCollateralStake(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.score.SettingsData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.score.SettingsData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.score.SettingsData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.SettingsData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStoragePriceAsk(); + if (f !== 0.0) { + writer.writeDouble( + 1, + f + ); + } + f = message.getBandwidthPriceAsk(); + if (f !== 0.0) { + writer.writeDouble( + 2, + f + ); + } + f = message.getStorageTimeMin(); + if (f !== 0.0) { + writer.writeDouble( + 3, + f + ); + } + f = message.getBandwidthLimit(); + if (f !== 0.0) { + writer.writeDouble( + 4, + f + ); + } + f = message.getCollateralStake(); + if (f !== 0.0) { + writer.writeDouble( + 5, + f + ); + } +}; + + +/** + * optional double storage_price_ask = 1; + * @return {number} + */ +proto.score.SettingsData.prototype.getStoragePriceAsk = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.SettingsData} returns this + */ +proto.score.SettingsData.prototype.setStoragePriceAsk = function(value) { + return jspb.Message.setProto3FloatField(this, 1, value); +}; + + +/** + * optional double bandwidth_price_ask = 2; + * @return {number} + */ +proto.score.SettingsData.prototype.getBandwidthPriceAsk = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.SettingsData} returns this + */ +proto.score.SettingsData.prototype.setBandwidthPriceAsk = function(value) { + return jspb.Message.setProto3FloatField(this, 2, value); +}; + + +/** + * optional double storage_time_min = 3; + * @return {number} + */ +proto.score.SettingsData.prototype.getStorageTimeMin = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.SettingsData} returns this + */ +proto.score.SettingsData.prototype.setStorageTimeMin = function(value) { + return jspb.Message.setProto3FloatField(this, 3, value); +}; + + +/** + * optional double bandwidth_limit = 4; + * @return {number} + */ +proto.score.SettingsData.prototype.getBandwidthLimit = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.SettingsData} returns this + */ +proto.score.SettingsData.prototype.setBandwidthLimit = function(value) { + return jspb.Message.setProto3FloatField(this, 4, value); +}; + + +/** + * optional double collateral_stake = 5; + * @return {number} + */ +proto.score.SettingsData.prototype.getCollateralStake = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.SettingsData} returns this + */ +proto.score.SettingsData.prototype.setCollateralStake = function(value) { + return jspb.Message.setProto3FloatField(this, 5, 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_, 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.score.HostsReq.prototype.toObject = function(opt_includeInstance) { + return proto.score.HostsReq.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.score.HostsReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.HostsReq.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + respSize: jspb.Message.getFieldWithDefault(msg, 2, 0), + mode: jspb.Message.getFieldWithDefault(msg, 3, 0), + version: 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.score.HostsReq} + */ +proto.score.HostsReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.score.HostsReq; + return proto.score.HostsReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.score.HostsReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.score.HostsReq} + */ +proto.score.HostsReq.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 {number} */ (reader.readInt32()); + msg.setRespSize(value); + break; + case 3: + var value = /** @type {!proto.score.HostsReq.Mode} */ (reader.readEnum()); + msg.setMode(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.score.HostsReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.score.HostsReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.score.HostsReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.HostsReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRespSize(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getMode(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.score.HostsReq.Mode = { + SCORE: 0, + GEO: 1, + REP: 2, + PRICE: 3, + SPEED: 4, + TESTNET: 5 +}; + +/** + * optional string id = 1; + * @return {string} + */ +proto.score.HostsReq.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.HostsReq} returns this + */ +proto.score.HostsReq.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int32 resp_size = 2; + * @return {number} + */ +proto.score.HostsReq.prototype.getRespSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.HostsReq} returns this + */ +proto.score.HostsReq.prototype.setRespSize = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional Mode mode = 3; + * @return {!proto.score.HostsReq.Mode} + */ +proto.score.HostsReq.prototype.getMode = function() { + return /** @type {!proto.score.HostsReq.Mode} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.score.HostsReq.Mode} value + * @return {!proto.score.HostsReq} returns this + */ +proto.score.HostsReq.prototype.setMode = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + +/** + * optional string version = 4; + * @return {string} + */ +proto.score.HostsReq.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.HostsReq} returns this + */ +proto.score.HostsReq.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(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_, 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.score.RolesHostsReq.prototype.toObject = function(opt_includeInstance) { + return proto.score.RolesHostsReq.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.score.RolesHostsReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.RolesHostsReq.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + respSize: jspb.Message.getFieldWithDefault(msg, 2, 0), + role: jspb.Message.getFieldWithDefault(msg, 3, 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.score.RolesHostsReq} + */ +proto.score.RolesHostsReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.score.RolesHostsReq; + return proto.score.RolesHostsReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.score.RolesHostsReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.score.RolesHostsReq} + */ +proto.score.RolesHostsReq.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 {number} */ (reader.readInt32()); + msg.setRespSize(value); + break; + case 3: + var value = /** @type {!proto.score.NodeRole} */ (reader.readEnum()); + msg.setRole(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.score.RolesHostsReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.score.RolesHostsReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.score.RolesHostsReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.RolesHostsReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRespSize(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getRole(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.score.RolesHostsReq.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.RolesHostsReq} returns this + */ +proto.score.RolesHostsReq.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int32 resp_size = 2; + * @return {number} + */ +proto.score.RolesHostsReq.prototype.getRespSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.RolesHostsReq} returns this + */ +proto.score.RolesHostsReq.prototype.setRespSize = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional NodeRole role = 3; + * @return {!proto.score.NodeRole} + */ +proto.score.RolesHostsReq.prototype.getRole = function() { + return /** @type {!proto.score.NodeRole} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.score.NodeRole} value + * @return {!proto.score.RolesHostsReq} returns this + */ +proto.score.RolesHostsReq.prototype.setRole = function(value) { + return jspb.Message.setProto3EnumField(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_, 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.score.HostsResp.prototype.toObject = function(opt_includeInstance) { + return proto.score.HostsResp.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.score.HostsResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.HostsResp.toObject = function(includeInstance, msg) { + var f, obj = { + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + message: jspb.Message.getFieldWithDefault(msg, 2, ""), + hosts: (f = msg.getHosts()) && proto.score.HostsData.toObject(includeInstance, f), + respSize: jspb.Message.getFieldWithDefault(msg, 4, 0), + mode: jspb.Message.getFieldWithDefault(msg, 5, ""), + responseTime: (f = msg.getResponseTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.score.HostsResp} + */ +proto.score.HostsResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.score.HostsResp; + return proto.score.HostsResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.score.HostsResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.score.HostsResp} + */ +proto.score.HostsResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.score.ResponseCode} */ (reader.readEnum()); + msg.setCode(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + case 3: + var value = new proto.score.HostsData; + reader.readMessage(value,proto.score.HostsData.deserializeBinaryFromReader); + msg.setHosts(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setRespSize(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setMode(value); + break; + case 6: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setResponseTime(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.score.HostsResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.score.HostsResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.score.HostsResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.HostsResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCode(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getHosts(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.score.HostsData.serializeBinaryToWriter + ); + } + f = message.getRespSize(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } + f = message.getMode(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getResponseTime(); + if (f != null) { + writer.writeMessage( + 6, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ResponseCode code = 1; + * @return {!proto.score.ResponseCode} + */ +proto.score.HostsResp.prototype.getCode = function() { + return /** @type {!proto.score.ResponseCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.score.ResponseCode} value + * @return {!proto.score.HostsResp} returns this + */ +proto.score.HostsResp.prototype.setCode = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string message = 2; + * @return {string} + */ +proto.score.HostsResp.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.HostsResp} returns this + */ +proto.score.HostsResp.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional HostsData hosts = 3; + * @return {?proto.score.HostsData} + */ +proto.score.HostsResp.prototype.getHosts = function() { + return /** @type{?proto.score.HostsData} */ ( + jspb.Message.getWrapperField(this, proto.score.HostsData, 3)); +}; + + +/** + * @param {?proto.score.HostsData|undefined} value + * @return {!proto.score.HostsResp} returns this +*/ +proto.score.HostsResp.prototype.setHosts = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.score.HostsResp} returns this + */ +proto.score.HostsResp.prototype.clearHosts = function() { + return this.setHosts(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.score.HostsResp.prototype.hasHosts = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional int32 resp_size = 4; + * @return {number} + */ +proto.score.HostsResp.prototype.getRespSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.HostsResp} returns this + */ +proto.score.HostsResp.prototype.setRespSize = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional string mode = 5; + * @return {string} + */ +proto.score.HostsResp.prototype.getMode = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.HostsResp} returns this + */ +proto.score.HostsResp.prototype.setMode = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional google.protobuf.Timestamp response_time = 6; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.score.HostsResp.prototype.getResponseTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.score.HostsResp} returns this +*/ +proto.score.HostsResp.prototype.setResponseTime = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.score.HostsResp} returns this + */ +proto.score.HostsResp.prototype.clearResponseTime = function() { + return this.setResponseTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.score.HostsResp.prototype.hasResponseTime = function() { + return jspb.Message.getField(this, 6) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, 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.score.StatsReq.prototype.toObject = function(opt_includeInstance) { + return proto.score.StatsReq.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.score.StatsReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.StatsReq.toObject = function(includeInstance, msg) { + var f, obj = { + id: 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.score.StatsReq} + */ +proto.score.StatsReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.score.StatsReq; + return proto.score.StatsReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.score.StatsReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.score.StatsReq} + */ +proto.score.StatsReq.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.score.StatsReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.score.StatsReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.score.StatsReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.StatsReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.score.StatsReq.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.StatsReq} returns this + */ +proto.score.StatsReq.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, 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_, 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.score.StatsResp.prototype.toObject = function(opt_includeInstance) { + return proto.score.StatsResp.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.score.StatsResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.StatsResp.toObject = function(includeInstance, msg) { + var f, obj = { + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + message: jspb.Message.getFieldWithDefault(msg, 2, ""), + responseTime: (f = msg.getResponseTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + stats: (f = msg.getStats()) && proto.score.StorageStat.HostStats.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.score.StatsResp} + */ +proto.score.StatsResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.score.StatsResp; + return proto.score.StatsResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.score.StatsResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.score.StatsResp} + */ +proto.score.StatsResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.score.ResponseCode} */ (reader.readEnum()); + msg.setCode(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + case 3: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setResponseTime(value); + break; + case 4: + var value = new proto.score.StorageStat.HostStats; + reader.readMessage(value,proto.score.StorageStat.HostStats.deserializeBinaryFromReader); + msg.setStats(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.score.StatsResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.score.StatsResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.score.StatsResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.StatsResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCode(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getResponseTime(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getStats(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.score.StorageStat.HostStats.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ResponseCode code = 1; + * @return {!proto.score.ResponseCode} + */ +proto.score.StatsResp.prototype.getCode = function() { + return /** @type {!proto.score.ResponseCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.score.ResponseCode} value + * @return {!proto.score.StatsResp} returns this + */ +proto.score.StatsResp.prototype.setCode = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string message = 2; + * @return {string} + */ +proto.score.StatsResp.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.StatsResp} returns this + */ +proto.score.StatsResp.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional google.protobuf.Timestamp response_time = 3; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.score.StatsResp.prototype.getResponseTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.score.StatsResp} returns this +*/ +proto.score.StatsResp.prototype.setResponseTime = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.score.StatsResp} returns this + */ +proto.score.StatsResp.prototype.clearResponseTime = function() { + return this.setResponseTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.score.StatsResp.prototype.hasResponseTime = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional StorageStat.HostStats stats = 4; + * @return {?proto.score.StorageStat.HostStats} + */ +proto.score.StatsResp.prototype.getStats = function() { + return /** @type{?proto.score.StorageStat.HostStats} */ ( + jspb.Message.getWrapperField(this, proto.score.StorageStat.HostStats, 4)); +}; + + +/** + * @param {?proto.score.StorageStat.HostStats|undefined} value + * @return {!proto.score.StatsResp} returns this +*/ +proto.score.StatsResp.prototype.setStats = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.score.StatsResp} returns this + */ +proto.score.StatsResp.prototype.clearStats = function() { + return this.setStats(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.score.StatsResp.prototype.hasStats = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.score.Host.repeatedFields_ = [35]; + + + +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_, 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.score.Host.prototype.toObject = function(opt_includeInstance) { + return proto.score.Host.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.score.Host} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.Host.toObject = function(includeInstance, msg) { + var f, obj = { + nodeId: jspb.Message.getFieldWithDefault(msg, 1, ""), + createTimestamp: (f = msg.getCreateTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + updateTimestamp: (f = msg.getUpdateTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + region: jspb.Message.getFieldWithDefault(msg, 4, ""), + btfsVersion: jspb.Message.getFieldWithDefault(msg, 5, ""), + score: jspb.Message.getFloatingPointFieldWithDefault(msg, 6, 0.0), + heartBeats: jspb.Message.getFieldWithDefault(msg, 7, 0), + uptime: jspb.Message.getFloatingPointFieldWithDefault(msg, 8, 0.0), + age: jspb.Message.getFieldWithDefault(msg, 9, 0), + reputation: jspb.Message.getFloatingPointFieldWithDefault(msg, 10, 0.0), + uploadAverage: jspb.Message.getFloatingPointFieldWithDefault(msg, 11, 0.0), + uploadVariance: jspb.Message.getFloatingPointFieldWithDefault(msg, 12, 0.0), + downloadAverage: jspb.Message.getFloatingPointFieldWithDefault(msg, 13, 0.0), + downloadVariance: jspb.Message.getFloatingPointFieldWithDefault(msg, 14, 0.0), + location: (f = msg.getLocation()) && proto.score.Location.toObject(includeInstance, f), + storageVolumeCap: jspb.Message.getFloatingPointFieldWithDefault(msg, 16, 0.0), + storageVolumeLeft: jspb.Message.getFloatingPointFieldWithDefault(msg, 17, 0.0), + storageTimeMin: jspb.Message.getFieldWithDefault(msg, 18, 0), + storagePriceAsk: jspb.Message.getFieldWithDefault(msg, 19, 0), + storagePriceEst: jspb.Message.getFieldWithDefault(msg, 20, 0), + bandwidthLimit: jspb.Message.getFloatingPointFieldWithDefault(msg, 21, 0.0), + bandwidthPriceAsk: jspb.Message.getFieldWithDefault(msg, 22, 0), + bandwidthPriceEst: jspb.Message.getFieldWithDefault(msg, 23, 0), + collateralStake: jspb.Message.getFieldWithDefault(msg, 24, 0), + collateralLost: jspb.Message.getFieldWithDefault(msg, 25, 0), + collateralBurn: jspb.Message.getFieldWithDefault(msg, 26, 0), + countryShort: jspb.Message.getFieldWithDefault(msg, 27, ""), + flg: (f = msg.getFlg()) && proto.score.Node.ExperimentalFlags.toObject(includeInstance, f), + discovery: jspb.Message.getFloatingPointFieldWithDefault(msg, 29, 0.0), + uptimeScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 30, 0.0), + ageScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 31, 0.0), + versionScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 32, 0.0), + uploadSpeedScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 33, 0.0), + downloadSpeedScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 34, 0.0), + rolesList: (f = jspb.Message.getRepeatedField(msg, 35)) == 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.score.Host} + */ +proto.score.Host.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.score.Host; + return proto.score.Host.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.score.Host} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.score.Host} + */ +proto.score.Host.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.setNodeId(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setCreateTimestamp(value); + break; + case 3: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setUpdateTimestamp(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setRegion(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setBtfsVersion(value); + break; + case 6: + var value = /** @type {number} */ (reader.readFloat()); + msg.setScore(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHeartBeats(value); + break; + case 8: + var value = /** @type {number} */ (reader.readFloat()); + msg.setUptime(value); + break; + case 9: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAge(value); + break; + case 10: + var value = /** @type {number} */ (reader.readFloat()); + msg.setReputation(value); + break; + case 11: + var value = /** @type {number} */ (reader.readFloat()); + msg.setUploadAverage(value); + break; + case 12: + var value = /** @type {number} */ (reader.readFloat()); + msg.setUploadVariance(value); + break; + case 13: + var value = /** @type {number} */ (reader.readFloat()); + msg.setDownloadAverage(value); + break; + case 14: + var value = /** @type {number} */ (reader.readFloat()); + msg.setDownloadVariance(value); + break; + case 15: + var value = new proto.score.Location; + reader.readMessage(value,proto.score.Location.deserializeBinaryFromReader); + msg.setLocation(value); + break; + case 16: + var value = /** @type {number} */ (reader.readFloat()); + msg.setStorageVolumeCap(value); + break; + case 17: + var value = /** @type {number} */ (reader.readFloat()); + msg.setStorageVolumeLeft(value); + break; + case 18: + var value = /** @type {number} */ (reader.readUint64()); + msg.setStorageTimeMin(value); + break; + case 19: + var value = /** @type {number} */ (reader.readUint64()); + msg.setStoragePriceAsk(value); + break; + case 20: + var value = /** @type {number} */ (reader.readUint64()); + msg.setStoragePriceEst(value); + break; + case 21: + var value = /** @type {number} */ (reader.readDouble()); + msg.setBandwidthLimit(value); + break; + case 22: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBandwidthPriceAsk(value); + break; + case 23: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBandwidthPriceEst(value); + break; + case 24: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCollateralStake(value); + break; + case 25: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCollateralLost(value); + break; + case 26: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCollateralBurn(value); + break; + case 27: + var value = /** @type {string} */ (reader.readString()); + msg.setCountryShort(value); + break; + case 28: + var value = new proto.score.Node.ExperimentalFlags; + reader.readMessage(value,proto.score.Node.ExperimentalFlags.deserializeBinaryFromReader); + msg.setFlg(value); + break; + case 29: + var value = /** @type {number} */ (reader.readFloat()); + msg.setDiscovery(value); + break; + case 30: + var value = /** @type {number} */ (reader.readFloat()); + msg.setUptimeScore(value); + break; + case 31: + var value = /** @type {number} */ (reader.readFloat()); + msg.setAgeScore(value); + break; + case 32: + var value = /** @type {number} */ (reader.readFloat()); + msg.setVersionScore(value); + break; + case 33: + var value = /** @type {number} */ (reader.readFloat()); + msg.setUploadSpeedScore(value); + break; + case 34: + var value = /** @type {number} */ (reader.readFloat()); + msg.setDownloadSpeedScore(value); + break; + case 35: + var value = /** @type {!Array} */ (reader.readPackedEnum()); + msg.setRolesList(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.score.Host.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.score.Host.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.score.Host} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.Host.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNodeId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCreateTimestamp(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getUpdateTimestamp(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getRegion(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getBtfsVersion(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getScore(); + if (f !== 0.0) { + writer.writeFloat( + 6, + f + ); + } + f = message.getHeartBeats(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } + f = message.getUptime(); + if (f !== 0.0) { + writer.writeFloat( + 8, + f + ); + } + f = message.getAge(); + if (f !== 0) { + writer.writeUint64( + 9, + f + ); + } + f = message.getReputation(); + if (f !== 0.0) { + writer.writeFloat( + 10, + f + ); + } + f = message.getUploadAverage(); + if (f !== 0.0) { + writer.writeFloat( + 11, + f + ); + } + f = message.getUploadVariance(); + if (f !== 0.0) { + writer.writeFloat( + 12, + f + ); + } + f = message.getDownloadAverage(); + if (f !== 0.0) { + writer.writeFloat( + 13, + f + ); + } + f = message.getDownloadVariance(); + if (f !== 0.0) { + writer.writeFloat( + 14, + f + ); + } + f = message.getLocation(); + if (f != null) { + writer.writeMessage( + 15, + f, + proto.score.Location.serializeBinaryToWriter + ); + } + f = message.getStorageVolumeCap(); + if (f !== 0.0) { + writer.writeFloat( + 16, + f + ); + } + f = message.getStorageVolumeLeft(); + if (f !== 0.0) { + writer.writeFloat( + 17, + f + ); + } + f = message.getStorageTimeMin(); + if (f !== 0) { + writer.writeUint64( + 18, + f + ); + } + f = message.getStoragePriceAsk(); + if (f !== 0) { + writer.writeUint64( + 19, + f + ); + } + f = message.getStoragePriceEst(); + if (f !== 0) { + writer.writeUint64( + 20, + f + ); + } + f = message.getBandwidthLimit(); + if (f !== 0.0) { + writer.writeDouble( + 21, + f + ); + } + f = message.getBandwidthPriceAsk(); + if (f !== 0) { + writer.writeUint64( + 22, + f + ); + } + f = message.getBandwidthPriceEst(); + if (f !== 0) { + writer.writeUint64( + 23, + f + ); + } + f = message.getCollateralStake(); + if (f !== 0) { + writer.writeUint64( + 24, + f + ); + } + f = message.getCollateralLost(); + if (f !== 0) { + writer.writeUint64( + 25, + f + ); + } + f = message.getCollateralBurn(); + if (f !== 0) { + writer.writeUint64( + 26, + f + ); + } + f = message.getCountryShort(); + if (f.length > 0) { + writer.writeString( + 27, + f + ); + } + f = message.getFlg(); + if (f != null) { + writer.writeMessage( + 28, + f, + proto.score.Node.ExperimentalFlags.serializeBinaryToWriter + ); + } + f = message.getDiscovery(); + if (f !== 0.0) { + writer.writeFloat( + 29, + f + ); + } + f = message.getUptimeScore(); + if (f !== 0.0) { + writer.writeFloat( + 30, + f + ); + } + f = message.getAgeScore(); + if (f !== 0.0) { + writer.writeFloat( + 31, + f + ); + } + f = message.getVersionScore(); + if (f !== 0.0) { + writer.writeFloat( + 32, + f + ); + } + f = message.getUploadSpeedScore(); + if (f !== 0.0) { + writer.writeFloat( + 33, + f + ); + } + f = message.getDownloadSpeedScore(); + if (f !== 0.0) { + writer.writeFloat( + 34, + f + ); + } + f = message.getRolesList(); + if (f.length > 0) { + writer.writePackedEnum( + 35, + f + ); + } +}; + + +/** + * optional string node_id = 1; + * @return {string} + */ +proto.score.Host.prototype.getNodeId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.setNodeId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Timestamp create_timestamp = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.score.Host.prototype.getCreateTimestamp = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.score.Host} returns this +*/ +proto.score.Host.prototype.setCreateTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.clearCreateTimestamp = function() { + return this.setCreateTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.score.Host.prototype.hasCreateTimestamp = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional google.protobuf.Timestamp update_timestamp = 3; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.score.Host.prototype.getUpdateTimestamp = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.score.Host} returns this +*/ +proto.score.Host.prototype.setUpdateTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.clearUpdateTimestamp = function() { + return this.setUpdateTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.score.Host.prototype.hasUpdateTimestamp = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string region = 4; + * @return {string} + */ +proto.score.Host.prototype.getRegion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.setRegion = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string btfs_version = 5; + * @return {string} + */ +proto.score.Host.prototype.getBtfsVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.setBtfsVersion = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional float score = 6; + * @return {number} + */ +proto.score.Host.prototype.getScore = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 6, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.setScore = function(value) { + return jspb.Message.setProto3FloatField(this, 6, value); +}; + + +/** + * optional uint64 heart_beats = 7; + * @return {number} + */ +proto.score.Host.prototype.getHeartBeats = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.setHeartBeats = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional float uptime = 8; + * @return {number} + */ +proto.score.Host.prototype.getUptime = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 8, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.setUptime = function(value) { + return jspb.Message.setProto3FloatField(this, 8, value); +}; + + +/** + * optional uint64 age = 9; + * @return {number} + */ +proto.score.Host.prototype.getAge = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.setAge = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); +}; + + +/** + * optional float reputation = 10; + * @return {number} + */ +proto.score.Host.prototype.getReputation = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 10, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.setReputation = function(value) { + return jspb.Message.setProto3FloatField(this, 10, value); +}; + + +/** + * optional float upload_average = 11; + * @return {number} + */ +proto.score.Host.prototype.getUploadAverage = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 11, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.setUploadAverage = function(value) { + return jspb.Message.setProto3FloatField(this, 11, value); +}; + + +/** + * optional float upload_variance = 12; + * @return {number} + */ +proto.score.Host.prototype.getUploadVariance = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 12, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.setUploadVariance = function(value) { + return jspb.Message.setProto3FloatField(this, 12, value); +}; + + +/** + * optional float download_average = 13; + * @return {number} + */ +proto.score.Host.prototype.getDownloadAverage = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 13, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.setDownloadAverage = function(value) { + return jspb.Message.setProto3FloatField(this, 13, value); +}; + + +/** + * optional float download_variance = 14; + * @return {number} + */ +proto.score.Host.prototype.getDownloadVariance = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 14, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.setDownloadVariance = function(value) { + return jspb.Message.setProto3FloatField(this, 14, value); +}; + + +/** + * optional Location location = 15; + * @return {?proto.score.Location} + */ +proto.score.Host.prototype.getLocation = function() { + return /** @type{?proto.score.Location} */ ( + jspb.Message.getWrapperField(this, proto.score.Location, 15)); +}; + + +/** + * @param {?proto.score.Location|undefined} value + * @return {!proto.score.Host} returns this +*/ +proto.score.Host.prototype.setLocation = function(value) { + return jspb.Message.setWrapperField(this, 15, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.clearLocation = function() { + return this.setLocation(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.score.Host.prototype.hasLocation = function() { + return jspb.Message.getField(this, 15) != null; +}; + + +/** + * optional float storage_volume_cap = 16; + * @return {number} + */ +proto.score.Host.prototype.getStorageVolumeCap = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 16, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.setStorageVolumeCap = function(value) { + return jspb.Message.setProto3FloatField(this, 16, value); +}; + + +/** + * optional float storage_volume_left = 17; + * @return {number} + */ +proto.score.Host.prototype.getStorageVolumeLeft = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 17, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.setStorageVolumeLeft = function(value) { + return jspb.Message.setProto3FloatField(this, 17, value); +}; + + +/** + * optional uint64 storage_time_min = 18; + * @return {number} + */ +proto.score.Host.prototype.getStorageTimeMin = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 18, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.setStorageTimeMin = function(value) { + return jspb.Message.setProto3IntField(this, 18, value); +}; + + +/** + * optional uint64 storage_price_ask = 19; + * @return {number} + */ +proto.score.Host.prototype.getStoragePriceAsk = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.setStoragePriceAsk = function(value) { + return jspb.Message.setProto3IntField(this, 19, value); +}; + + +/** + * optional uint64 storage_price_est = 20; + * @return {number} + */ +proto.score.Host.prototype.getStoragePriceEst = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.setStoragePriceEst = function(value) { + return jspb.Message.setProto3IntField(this, 20, value); +}; + + +/** + * optional double bandwidth_limit = 21; + * @return {number} + */ +proto.score.Host.prototype.getBandwidthLimit = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 21, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.setBandwidthLimit = function(value) { + return jspb.Message.setProto3FloatField(this, 21, value); +}; + + +/** + * optional uint64 bandwidth_price_ask = 22; + * @return {number} + */ +proto.score.Host.prototype.getBandwidthPriceAsk = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 22, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.setBandwidthPriceAsk = function(value) { + return jspb.Message.setProto3IntField(this, 22, value); +}; + + +/** + * optional uint64 bandwidth_price_est = 23; + * @return {number} + */ +proto.score.Host.prototype.getBandwidthPriceEst = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 23, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.setBandwidthPriceEst = function(value) { + return jspb.Message.setProto3IntField(this, 23, value); +}; + + +/** + * optional uint64 collateral_stake = 24; + * @return {number} + */ +proto.score.Host.prototype.getCollateralStake = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 24, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.setCollateralStake = function(value) { + return jspb.Message.setProto3IntField(this, 24, value); +}; + + +/** + * optional uint64 collateral_lost = 25; + * @return {number} + */ +proto.score.Host.prototype.getCollateralLost = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 25, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.setCollateralLost = function(value) { + return jspb.Message.setProto3IntField(this, 25, value); +}; + + +/** + * optional uint64 collateral_burn = 26; + * @return {number} + */ +proto.score.Host.prototype.getCollateralBurn = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 26, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.setCollateralBurn = function(value) { + return jspb.Message.setProto3IntField(this, 26, value); +}; + + +/** + * optional string country_short = 27; + * @return {string} + */ +proto.score.Host.prototype.getCountryShort = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 27, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.setCountryShort = function(value) { + return jspb.Message.setProto3StringField(this, 27, value); +}; + + +/** + * optional Node.ExperimentalFlags flg = 28; + * @return {?proto.score.Node.ExperimentalFlags} + */ +proto.score.Host.prototype.getFlg = function() { + return /** @type{?proto.score.Node.ExperimentalFlags} */ ( + jspb.Message.getWrapperField(this, proto.score.Node.ExperimentalFlags, 28)); +}; + + +/** + * @param {?proto.score.Node.ExperimentalFlags|undefined} value + * @return {!proto.score.Host} returns this +*/ +proto.score.Host.prototype.setFlg = function(value) { + return jspb.Message.setWrapperField(this, 28, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.clearFlg = function() { + return this.setFlg(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.score.Host.prototype.hasFlg = function() { + return jspb.Message.getField(this, 28) != null; +}; + + +/** + * optional float discovery = 29; + * @return {number} + */ +proto.score.Host.prototype.getDiscovery = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 29, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.setDiscovery = function(value) { + return jspb.Message.setProto3FloatField(this, 29, value); +}; + + +/** + * optional float uptime_score = 30; + * @return {number} + */ +proto.score.Host.prototype.getUptimeScore = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 30, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.setUptimeScore = function(value) { + return jspb.Message.setProto3FloatField(this, 30, value); +}; + + +/** + * optional float age_score = 31; + * @return {number} + */ +proto.score.Host.prototype.getAgeScore = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 31, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.setAgeScore = function(value) { + return jspb.Message.setProto3FloatField(this, 31, value); +}; + + +/** + * optional float version_score = 32; + * @return {number} + */ +proto.score.Host.prototype.getVersionScore = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 32, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.setVersionScore = function(value) { + return jspb.Message.setProto3FloatField(this, 32, value); +}; + + +/** + * optional float upload_speed_score = 33; + * @return {number} + */ +proto.score.Host.prototype.getUploadSpeedScore = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 33, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.setUploadSpeedScore = function(value) { + return jspb.Message.setProto3FloatField(this, 33, value); +}; + + +/** + * optional float download_speed_score = 34; + * @return {number} + */ +proto.score.Host.prototype.getDownloadSpeedScore = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 34, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.setDownloadSpeedScore = function(value) { + return jspb.Message.setProto3FloatField(this, 34, value); +}; + + +/** + * repeated NodeRole roles = 35; + * @return {!Array} + */ +proto.score.Host.prototype.getRolesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 35)); +}; + + +/** + * @param {!Array} value + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.setRolesList = function(value) { + return jspb.Message.setField(this, 35, value || []); +}; + + +/** + * @param {!proto.score.NodeRole} value + * @param {number=} opt_index + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.addRoles = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 35, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.score.Host} returns this + */ +proto.score.Host.prototype.clearRolesList = function() { + return this.setRolesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.score.HostsData.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_, 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.score.HostsData.prototype.toObject = function(opt_includeInstance) { + return proto.score.HostsData.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.score.HostsData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.HostsData.toObject = function(includeInstance, msg) { + var f, obj = { + hostsList: jspb.Message.toObjectList(msg.getHostsList(), + proto.score.Host.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.score.HostsData} + */ +proto.score.HostsData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.score.HostsData; + return proto.score.HostsData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.score.HostsData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.score.HostsData} + */ +proto.score.HostsData.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.score.Host; + reader.readMessage(value,proto.score.Host.deserializeBinaryFromReader); + msg.addHosts(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.score.HostsData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.score.HostsData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.score.HostsData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.HostsData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHostsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.score.Host.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Host hosts = 1; + * @return {!Array} + */ +proto.score.HostsData.prototype.getHostsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.score.Host, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.score.HostsData} returns this +*/ +proto.score.HostsData.prototype.setHostsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.score.Host=} opt_value + * @param {number=} opt_index + * @return {!proto.score.Host} + */ +proto.score.HostsData.prototype.addHosts = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.score.Host, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.score.HostsData} returns this + */ +proto.score.HostsData.prototype.clearHostsList = function() { + return this.setHostsList([]); +}; + + + + + +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_, 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.score.Location.prototype.toObject = function(opt_includeInstance) { + return proto.score.Location.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.score.Location} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.Location.toObject = function(includeInstance, msg) { + var f, obj = { + lat: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0), + lon: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 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.score.Location} + */ +proto.score.Location.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.score.Location; + return proto.score.Location.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.score.Location} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.score.Location} + */ +proto.score.Location.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readDouble()); + msg.setLat(value); + break; + case 2: + var value = /** @type {number} */ (reader.readDouble()); + msg.setLon(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.score.Location.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.score.Location.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.score.Location} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.Location.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLat(); + if (f !== 0.0) { + writer.writeDouble( + 1, + f + ); + } + f = message.getLon(); + if (f !== 0.0) { + writer.writeDouble( + 2, + f + ); + } +}; + + +/** + * optional double lat = 1; + * @return {number} + */ +proto.score.Location.prototype.getLat = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Location} returns this + */ +proto.score.Location.prototype.setLat = function(value) { + return jspb.Message.setProto3FloatField(this, 1, value); +}; + + +/** + * optional double lon = 2; + * @return {number} + */ +proto.score.Location.prototype.getLon = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Location} returns this + */ +proto.score.Location.prototype.setLon = function(value) { + return jspb.Message.setProto3FloatField(this, 2, 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_, 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.score.StorageStat.prototype.toObject = function(opt_includeInstance) { + return proto.score.StorageStat.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.score.StorageStat} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.StorageStat.toObject = function(includeInstance, msg) { + var f, obj = { + hostStats: (f = msg.getHostStats()) && proto.score.StorageStat.Host.toObject(includeInstance, f), + renterStats: (f = msg.getRenterStats()) && proto.score.StorageStat.Renter.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.score.StorageStat} + */ +proto.score.StorageStat.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.score.StorageStat; + return proto.score.StorageStat.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.score.StorageStat} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.score.StorageStat} + */ +proto.score.StorageStat.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.score.StorageStat.Host; + reader.readMessage(value,proto.score.StorageStat.Host.deserializeBinaryFromReader); + msg.setHostStats(value); + break; + case 2: + var value = new proto.score.StorageStat.Renter; + reader.readMessage(value,proto.score.StorageStat.Renter.deserializeBinaryFromReader); + msg.setRenterStats(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.score.StorageStat.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.score.StorageStat.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.score.StorageStat} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.StorageStat.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHostStats(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.score.StorageStat.Host.serializeBinaryToWriter + ); + } + f = message.getRenterStats(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.score.StorageStat.Renter.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_, 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.score.StorageStat.HostStats.prototype.toObject = function(opt_includeInstance) { + return proto.score.StorageStat.HostStats.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.score.StorageStat.HostStats} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.StorageStat.HostStats.toObject = function(includeInstance, msg) { + var f, obj = { + uptime: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0), + score: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), + uptimeScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0), + ageScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0), + versionScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0), + speedScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 6, 0.0), + uploadSpeedScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 7, 0.0), + downloadSpeedScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 8, 0.0), + uptimeWeight: jspb.Message.getFloatingPointFieldWithDefault(msg, 9, 0.0), + ageWeight: jspb.Message.getFloatingPointFieldWithDefault(msg, 10, 0.0), + versionWeight: jspb.Message.getFloatingPointFieldWithDefault(msg, 11, 0.0), + speedWeight: jspb.Message.getFloatingPointFieldWithDefault(msg, 12, 0.0), + uploadSpeedWeight: jspb.Message.getFloatingPointFieldWithDefault(msg, 13, 0.0), + downloadSpeedWeight: jspb.Message.getFloatingPointFieldWithDefault(msg, 14, 0.0), + lastUpdated: (f = msg.getLastUpdated()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.score.StorageStat.HostStats} + */ +proto.score.StorageStat.HostStats.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.score.StorageStat.HostStats; + return proto.score.StorageStat.HostStats.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.score.StorageStat.HostStats} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.score.StorageStat.HostStats} + */ +proto.score.StorageStat.HostStats.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.setUptime(value); + break; + case 2: + var value = /** @type {number} */ (reader.readFloat()); + msg.setScore(value); + break; + case 3: + var value = /** @type {number} */ (reader.readFloat()); + msg.setUptimeScore(value); + break; + case 4: + var value = /** @type {number} */ (reader.readFloat()); + msg.setAgeScore(value); + break; + case 5: + var value = /** @type {number} */ (reader.readFloat()); + msg.setVersionScore(value); + break; + case 6: + var value = /** @type {number} */ (reader.readFloat()); + msg.setSpeedScore(value); + break; + case 7: + var value = /** @type {number} */ (reader.readFloat()); + msg.setUploadSpeedScore(value); + break; + case 8: + var value = /** @type {number} */ (reader.readFloat()); + msg.setDownloadSpeedScore(value); + break; + case 9: + var value = /** @type {number} */ (reader.readFloat()); + msg.setUptimeWeight(value); + break; + case 10: + var value = /** @type {number} */ (reader.readFloat()); + msg.setAgeWeight(value); + break; + case 11: + var value = /** @type {number} */ (reader.readFloat()); + msg.setVersionWeight(value); + break; + case 12: + var value = /** @type {number} */ (reader.readFloat()); + msg.setSpeedWeight(value); + break; + case 13: + var value = /** @type {number} */ (reader.readFloat()); + msg.setUploadSpeedWeight(value); + break; + case 14: + var value = /** @type {number} */ (reader.readFloat()); + msg.setDownloadSpeedWeight(value); + break; + case 15: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setLastUpdated(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.score.StorageStat.HostStats.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.score.StorageStat.HostStats.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.score.StorageStat.HostStats} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.StorageStat.HostStats.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUptime(); + if (f !== 0.0) { + writer.writeFloat( + 1, + f + ); + } + f = message.getScore(); + if (f !== 0.0) { + writer.writeFloat( + 2, + f + ); + } + f = message.getUptimeScore(); + if (f !== 0.0) { + writer.writeFloat( + 3, + f + ); + } + f = message.getAgeScore(); + if (f !== 0.0) { + writer.writeFloat( + 4, + f + ); + } + f = message.getVersionScore(); + if (f !== 0.0) { + writer.writeFloat( + 5, + f + ); + } + f = message.getSpeedScore(); + if (f !== 0.0) { + writer.writeFloat( + 6, + f + ); + } + f = message.getUploadSpeedScore(); + if (f !== 0.0) { + writer.writeFloat( + 7, + f + ); + } + f = message.getDownloadSpeedScore(); + if (f !== 0.0) { + writer.writeFloat( + 8, + f + ); + } + f = message.getUptimeWeight(); + if (f !== 0.0) { + writer.writeFloat( + 9, + f + ); + } + f = message.getAgeWeight(); + if (f !== 0.0) { + writer.writeFloat( + 10, + f + ); + } + f = message.getVersionWeight(); + if (f !== 0.0) { + writer.writeFloat( + 11, + f + ); + } + f = message.getSpeedWeight(); + if (f !== 0.0) { + writer.writeFloat( + 12, + f + ); + } + f = message.getUploadSpeedWeight(); + if (f !== 0.0) { + writer.writeFloat( + 13, + f + ); + } + f = message.getDownloadSpeedWeight(); + if (f !== 0.0) { + writer.writeFloat( + 14, + f + ); + } + f = message.getLastUpdated(); + if (f != null) { + writer.writeMessage( + 15, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional float uptime = 1; + * @return {number} + */ +proto.score.StorageStat.HostStats.prototype.getUptime = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.HostStats} returns this + */ +proto.score.StorageStat.HostStats.prototype.setUptime = function(value) { + return jspb.Message.setProto3FloatField(this, 1, value); +}; + + +/** + * optional float score = 2; + * @return {number} + */ +proto.score.StorageStat.HostStats.prototype.getScore = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.HostStats} returns this + */ +proto.score.StorageStat.HostStats.prototype.setScore = function(value) { + return jspb.Message.setProto3FloatField(this, 2, value); +}; + + +/** + * optional float uptime_score = 3; + * @return {number} + */ +proto.score.StorageStat.HostStats.prototype.getUptimeScore = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.HostStats} returns this + */ +proto.score.StorageStat.HostStats.prototype.setUptimeScore = function(value) { + return jspb.Message.setProto3FloatField(this, 3, value); +}; + + +/** + * optional float age_score = 4; + * @return {number} + */ +proto.score.StorageStat.HostStats.prototype.getAgeScore = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.HostStats} returns this + */ +proto.score.StorageStat.HostStats.prototype.setAgeScore = function(value) { + return jspb.Message.setProto3FloatField(this, 4, value); +}; + + +/** + * optional float version_score = 5; + * @return {number} + */ +proto.score.StorageStat.HostStats.prototype.getVersionScore = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.HostStats} returns this + */ +proto.score.StorageStat.HostStats.prototype.setVersionScore = function(value) { + return jspb.Message.setProto3FloatField(this, 5, value); +}; + + +/** + * optional float speed_score = 6; + * @return {number} + */ +proto.score.StorageStat.HostStats.prototype.getSpeedScore = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 6, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.HostStats} returns this + */ +proto.score.StorageStat.HostStats.prototype.setSpeedScore = function(value) { + return jspb.Message.setProto3FloatField(this, 6, value); +}; + + +/** + * optional float upload_speed_score = 7; + * @return {number} + */ +proto.score.StorageStat.HostStats.prototype.getUploadSpeedScore = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 7, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.HostStats} returns this + */ +proto.score.StorageStat.HostStats.prototype.setUploadSpeedScore = function(value) { + return jspb.Message.setProto3FloatField(this, 7, value); +}; + + +/** + * optional float download_speed_score = 8; + * @return {number} + */ +proto.score.StorageStat.HostStats.prototype.getDownloadSpeedScore = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 8, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.HostStats} returns this + */ +proto.score.StorageStat.HostStats.prototype.setDownloadSpeedScore = function(value) { + return jspb.Message.setProto3FloatField(this, 8, value); +}; + + +/** + * optional float uptime_weight = 9; + * @return {number} + */ +proto.score.StorageStat.HostStats.prototype.getUptimeWeight = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 9, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.HostStats} returns this + */ +proto.score.StorageStat.HostStats.prototype.setUptimeWeight = function(value) { + return jspb.Message.setProto3FloatField(this, 9, value); +}; + + +/** + * optional float age_weight = 10; + * @return {number} + */ +proto.score.StorageStat.HostStats.prototype.getAgeWeight = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 10, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.HostStats} returns this + */ +proto.score.StorageStat.HostStats.prototype.setAgeWeight = function(value) { + return jspb.Message.setProto3FloatField(this, 10, value); +}; + + +/** + * optional float version_weight = 11; + * @return {number} + */ +proto.score.StorageStat.HostStats.prototype.getVersionWeight = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 11, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.HostStats} returns this + */ +proto.score.StorageStat.HostStats.prototype.setVersionWeight = function(value) { + return jspb.Message.setProto3FloatField(this, 11, value); +}; + + +/** + * optional float speed_weight = 12; + * @return {number} + */ +proto.score.StorageStat.HostStats.prototype.getSpeedWeight = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 12, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.HostStats} returns this + */ +proto.score.StorageStat.HostStats.prototype.setSpeedWeight = function(value) { + return jspb.Message.setProto3FloatField(this, 12, value); +}; + + +/** + * optional float upload_speed_weight = 13; + * @return {number} + */ +proto.score.StorageStat.HostStats.prototype.getUploadSpeedWeight = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 13, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.HostStats} returns this + */ +proto.score.StorageStat.HostStats.prototype.setUploadSpeedWeight = function(value) { + return jspb.Message.setProto3FloatField(this, 13, value); +}; + + +/** + * optional float download_speed_weight = 14; + * @return {number} + */ +proto.score.StorageStat.HostStats.prototype.getDownloadSpeedWeight = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 14, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.HostStats} returns this + */ +proto.score.StorageStat.HostStats.prototype.setDownloadSpeedWeight = function(value) { + return jspb.Message.setProto3FloatField(this, 14, value); +}; + + +/** + * optional google.protobuf.Timestamp last_updated = 15; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.score.StorageStat.HostStats.prototype.getLastUpdated = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 15)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.score.StorageStat.HostStats} returns this +*/ +proto.score.StorageStat.HostStats.prototype.setLastUpdated = function(value) { + return jspb.Message.setWrapperField(this, 15, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.score.StorageStat.HostStats} returns this + */ +proto.score.StorageStat.HostStats.prototype.clearLastUpdated = function() { + return this.setLastUpdated(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.score.StorageStat.HostStats.prototype.hasLastUpdated = function() { + return jspb.Message.getField(this, 15) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, 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.score.StorageStat.Host.prototype.toObject = function(opt_includeInstance) { + return proto.score.StorageStat.Host.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.score.StorageStat.Host} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.StorageStat.Host.toObject = function(includeInstance, msg) { + var f, obj = { + online: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + storageUsed: jspb.Message.getFieldWithDefault(msg, 2, 0), + storageCap: jspb.Message.getFieldWithDefault(msg, 3, 0), + storageDiskTotal: jspb.Message.getFieldWithDefault(msg, 4, 0), + storageDiskAvailable: jspb.Message.getFieldWithDefault(msg, 5, 0), + stats: (f = msg.getStats()) && proto.score.StorageStat.HostStats.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.score.StorageStat.Host} + */ +proto.score.StorageStat.Host.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.score.StorageStat.Host; + return proto.score.StorageStat.Host.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.score.StorageStat.Host} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.score.StorageStat.Host} + */ +proto.score.StorageStat.Host.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setOnline(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStorageUsed(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStorageCap(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStorageDiskTotal(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStorageDiskAvailable(value); + break; + case 6: + var value = new proto.score.StorageStat.HostStats; + reader.readMessage(value,proto.score.StorageStat.HostStats.deserializeBinaryFromReader); + msg.setStats(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.score.StorageStat.Host.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.score.StorageStat.Host.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.score.StorageStat.Host} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.StorageStat.Host.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOnline(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getStorageUsed(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getStorageCap(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getStorageDiskTotal(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getStorageDiskAvailable(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getStats(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.score.StorageStat.HostStats.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bool online = 1; + * @return {boolean} + */ +proto.score.StorageStat.Host.prototype.getOnline = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.StorageStat.Host} returns this + */ +proto.score.StorageStat.Host.prototype.setOnline = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +/** + * optional int64 storage_used = 2; + * @return {number} + */ +proto.score.StorageStat.Host.prototype.getStorageUsed = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.Host} returns this + */ +proto.score.StorageStat.Host.prototype.setStorageUsed = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int64 storage_cap = 3; + * @return {number} + */ +proto.score.StorageStat.Host.prototype.getStorageCap = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.Host} returns this + */ +proto.score.StorageStat.Host.prototype.setStorageCap = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 storage_disk_total = 4; + * @return {number} + */ +proto.score.StorageStat.Host.prototype.getStorageDiskTotal = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.Host} returns this + */ +proto.score.StorageStat.Host.prototype.setStorageDiskTotal = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int64 storage_disk_available = 5; + * @return {number} + */ +proto.score.StorageStat.Host.prototype.getStorageDiskAvailable = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.Host} returns this + */ +proto.score.StorageStat.Host.prototype.setStorageDiskAvailable = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional HostStats stats = 6; + * @return {?proto.score.StorageStat.HostStats} + */ +proto.score.StorageStat.Host.prototype.getStats = function() { + return /** @type{?proto.score.StorageStat.HostStats} */ ( + jspb.Message.getWrapperField(this, proto.score.StorageStat.HostStats, 6)); +}; + + +/** + * @param {?proto.score.StorageStat.HostStats|undefined} value + * @return {!proto.score.StorageStat.Host} returns this +*/ +proto.score.StorageStat.Host.prototype.setStats = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.score.StorageStat.Host} returns this + */ +proto.score.StorageStat.Host.prototype.clearStats = function() { + return this.setStats(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.score.StorageStat.Host.prototype.hasStats = function() { + return jspb.Message.getField(this, 6) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, 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.score.StorageStat.Renter.prototype.toObject = function(opt_includeInstance) { + return proto.score.StorageStat.Renter.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.score.StorageStat.Renter} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.StorageStat.Renter.toObject = function(includeInstance, msg) { + var f, obj = { + reserved: 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.score.StorageStat.Renter} + */ +proto.score.StorageStat.Renter.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.score.StorageStat.Renter; + return proto.score.StorageStat.Renter.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.score.StorageStat.Renter} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.score.StorageStat.Renter} + */ +proto.score.StorageStat.Renter.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.setReserved(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.score.StorageStat.Renter.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.score.StorageStat.Renter.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.score.StorageStat.Renter} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.StorageStat.Renter.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getReserved(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string reserved = 1; + * @return {string} + */ +proto.score.StorageStat.Renter.prototype.getReserved = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.StorageStat.Renter} returns this + */ +proto.score.StorageStat.Renter.prototype.setReserved = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Host host_stats = 1; + * @return {?proto.score.StorageStat.Host} + */ +proto.score.StorageStat.prototype.getHostStats = function() { + return /** @type{?proto.score.StorageStat.Host} */ ( + jspb.Message.getWrapperField(this, proto.score.StorageStat.Host, 1)); +}; + + +/** + * @param {?proto.score.StorageStat.Host|undefined} value + * @return {!proto.score.StorageStat} returns this +*/ +proto.score.StorageStat.prototype.setHostStats = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.score.StorageStat} returns this + */ +proto.score.StorageStat.prototype.clearHostStats = function() { + return this.setHostStats(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.score.StorageStat.prototype.hasHostStats = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Renter renter_stats = 2; + * @return {?proto.score.StorageStat.Renter} + */ +proto.score.StorageStat.prototype.getRenterStats = function() { + return /** @type{?proto.score.StorageStat.Renter} */ ( + jspb.Message.getWrapperField(this, proto.score.StorageStat.Renter, 2)); +}; + + +/** + * @param {?proto.score.StorageStat.Renter|undefined} value + * @return {!proto.score.StorageStat} returns this +*/ +proto.score.StorageStat.prototype.setRenterStats = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.score.StorageStat} returns this + */ +proto.score.StorageStat.prototype.clearRenterStats = function() { + return this.setRenterStats(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.score.StorageStat.prototype.hasRenterStats = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, 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.score.Node.prototype.toObject = function(opt_includeInstance) { + return proto.score.Node.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.score.Node} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.Node.toObject = function(includeInstance, msg) { + var f, obj = { + tableName: jspb.Message.getFieldWithDefault(msg, 1, ""), + nodeId: jspb.Message.getFieldWithDefault(msg, 2, ""), + btfsVersion: jspb.Message.getFieldWithDefault(msg, 3, ""), + upTime: jspb.Message.getFieldWithDefault(msg, 4, 0), + storageUsed: jspb.Message.getFieldWithDefault(msg, 5, 0), + storageVolumeCap: jspb.Message.getFieldWithDefault(msg, 6, 0), + memoryUsed: jspb.Message.getFieldWithDefault(msg, 7, 0), + cpuUsed: jspb.Message.getFloatingPointFieldWithDefault(msg, 8, 0.0), + upload: jspb.Message.getFieldWithDefault(msg, 9, 0), + download: jspb.Message.getFieldWithDefault(msg, 10, 0), + totalUpload: jspb.Message.getFieldWithDefault(msg, 11, 0), + totalDownload: jspb.Message.getFieldWithDefault(msg, 12, 0), + storagePriceDeal: jspb.Message.getFieldWithDefault(msg, 13, 0), + bandwidthPriceDeal: jspb.Message.getFieldWithDefault(msg, 14, 0), + settings: (f = msg.getSettings()) && proto.score.Node.Settings.toObject(includeInstance, f), + reputation: jspb.Message.getFloatingPointFieldWithDefault(msg, 16, 0.0), + blocksUp: jspb.Message.getFieldWithDefault(msg, 17, 0), + blocksDown: jspb.Message.getFieldWithDefault(msg, 18, 0), + osType: jspb.Message.getFieldWithDefault(msg, 19, ""), + archType: jspb.Message.getFieldWithDefault(msg, 20, ""), + cpuInfo: jspb.Message.getFieldWithDefault(msg, 21, ""), + peersConnected: jspb.Message.getFieldWithDefault(msg, 23, 0), + timeCreated: (f = msg.getTimeCreated()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + hVal: jspb.Message.getFieldWithDefault(msg, 25, ""), + geo: (f = msg.getGeo()) && proto.score.Node.Geo.toObject(includeInstance, f), + flg: (f = msg.getFlg()) && proto.score.Node.ExperimentalFlags.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.score.Node} + */ +proto.score.Node.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.score.Node; + return proto.score.Node.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.score.Node} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.score.Node} + */ +proto.score.Node.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.setTableName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setNodeId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setBtfsVersion(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setUpTime(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setStorageUsed(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setStorageVolumeCap(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMemoryUsed(value); + break; + case 8: + var value = /** @type {number} */ (reader.readDouble()); + msg.setCpuUsed(value); + break; + case 9: + var value = /** @type {number} */ (reader.readUint64()); + msg.setUpload(value); + break; + case 10: + var value = /** @type {number} */ (reader.readUint64()); + msg.setDownload(value); + break; + case 11: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTotalUpload(value); + break; + case 12: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTotalDownload(value); + break; + case 13: + var value = /** @type {number} */ (reader.readUint64()); + msg.setStoragePriceDeal(value); + break; + case 14: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBandwidthPriceDeal(value); + break; + case 15: + var value = new proto.score.Node.Settings; + reader.readMessage(value,proto.score.Node.Settings.deserializeBinaryFromReader); + msg.setSettings(value); + break; + case 16: + var value = /** @type {number} */ (reader.readDouble()); + msg.setReputation(value); + break; + case 17: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBlocksUp(value); + break; + case 18: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBlocksDown(value); + break; + case 19: + var value = /** @type {string} */ (reader.readString()); + msg.setOsType(value); + break; + case 20: + var value = /** @type {string} */ (reader.readString()); + msg.setArchType(value); + break; + case 21: + var value = /** @type {string} */ (reader.readString()); + msg.setCpuInfo(value); + break; + case 23: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPeersConnected(value); + break; + case 24: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimeCreated(value); + break; + case 25: + var value = /** @type {string} */ (reader.readString()); + msg.setHVal(value); + break; + case 26: + var value = new proto.score.Node.Geo; + reader.readMessage(value,proto.score.Node.Geo.deserializeBinaryFromReader); + msg.setGeo(value); + break; + case 27: + var value = new proto.score.Node.ExperimentalFlags; + reader.readMessage(value,proto.score.Node.ExperimentalFlags.deserializeBinaryFromReader); + msg.setFlg(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.score.Node.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.score.Node.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.score.Node} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.Node.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTableName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getNodeId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getBtfsVersion(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getUpTime(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getStorageUsed(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getStorageVolumeCap(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } + f = message.getMemoryUsed(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } + f = message.getCpuUsed(); + if (f !== 0.0) { + writer.writeDouble( + 8, + f + ); + } + f = message.getUpload(); + if (f !== 0) { + writer.writeUint64( + 9, + f + ); + } + f = message.getDownload(); + if (f !== 0) { + writer.writeUint64( + 10, + f + ); + } + f = message.getTotalUpload(); + if (f !== 0) { + writer.writeUint64( + 11, + f + ); + } + f = message.getTotalDownload(); + if (f !== 0) { + writer.writeUint64( + 12, + f + ); + } + f = message.getStoragePriceDeal(); + if (f !== 0) { + writer.writeUint64( + 13, + f + ); + } + f = message.getBandwidthPriceDeal(); + if (f !== 0) { + writer.writeUint64( + 14, + f + ); + } + f = message.getSettings(); + if (f != null) { + writer.writeMessage( + 15, + f, + proto.score.Node.Settings.serializeBinaryToWriter + ); + } + f = message.getReputation(); + if (f !== 0.0) { + writer.writeDouble( + 16, + f + ); + } + f = message.getBlocksUp(); + if (f !== 0) { + writer.writeUint64( + 17, + f + ); + } + f = message.getBlocksDown(); + if (f !== 0) { + writer.writeUint64( + 18, + f + ); + } + f = message.getOsType(); + if (f.length > 0) { + writer.writeString( + 19, + f + ); + } + f = message.getArchType(); + if (f.length > 0) { + writer.writeString( + 20, + f + ); + } + f = message.getCpuInfo(); + if (f.length > 0) { + writer.writeString( + 21, + f + ); + } + f = message.getPeersConnected(); + if (f !== 0) { + writer.writeUint64( + 23, + f + ); + } + f = message.getTimeCreated(); + if (f != null) { + writer.writeMessage( + 24, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getHVal(); + if (f.length > 0) { + writer.writeString( + 25, + f + ); + } + f = message.getGeo(); + if (f != null) { + writer.writeMessage( + 26, + f, + proto.score.Node.Geo.serializeBinaryToWriter + ); + } + f = message.getFlg(); + if (f != null) { + writer.writeMessage( + 27, + f, + proto.score.Node.ExperimentalFlags.serializeBinaryToWriter + ); + } +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.score.Node.Settings.repeatedFields_ = [8]; + + + +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_, 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.score.Node.Settings.prototype.toObject = function(opt_includeInstance) { + return proto.score.Node.Settings.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.score.Node.Settings} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.Node.Settings.toObject = function(includeInstance, msg) { + var f, obj = { + storagePriceAsk: jspb.Message.getFieldWithDefault(msg, 1, 0), + bandwidthPriceAsk: jspb.Message.getFieldWithDefault(msg, 2, 0), + storageTimeMin: jspb.Message.getFieldWithDefault(msg, 3, 0), + bandwidthLimit: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0), + collateralStake: jspb.Message.getFieldWithDefault(msg, 5, 0), + storagePriceDefault: jspb.Message.getFieldWithDefault(msg, 6, 0), + customizedPricing: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), + rolesList: (f = jspb.Message.getRepeatedField(msg, 8)) == null ? undefined : f, + repairPriceDefault: jspb.Message.getFieldWithDefault(msg, 9, 0), + repairPriceCustomized: jspb.Message.getFieldWithDefault(msg, 10, 0), + repairCustomizedPricing: jspb.Message.getBooleanFieldWithDefault(msg, 11, false), + challengePriceDefault: jspb.Message.getFieldWithDefault(msg, 12, 0), + challengePriceCustomized: jspb.Message.getFieldWithDefault(msg, 13, 0), + challengeCustomizedPricing: jspb.Message.getBooleanFieldWithDefault(msg, 14, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.score.Node.Settings} + */ +proto.score.Node.Settings.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.score.Node.Settings; + return proto.score.Node.Settings.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.score.Node.Settings} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.score.Node.Settings} + */ +proto.score.Node.Settings.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setStoragePriceAsk(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBandwidthPriceAsk(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setStorageTimeMin(value); + break; + case 4: + var value = /** @type {number} */ (reader.readDouble()); + msg.setBandwidthLimit(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCollateralStake(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setStoragePriceDefault(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setCustomizedPricing(value); + break; + case 8: + var value = /** @type {!Array} */ (reader.readPackedEnum()); + msg.setRolesList(value); + break; + case 9: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRepairPriceDefault(value); + break; + case 10: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRepairPriceCustomized(value); + break; + case 11: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRepairCustomizedPricing(value); + break; + case 12: + var value = /** @type {number} */ (reader.readUint64()); + msg.setChallengePriceDefault(value); + break; + case 13: + var value = /** @type {number} */ (reader.readUint64()); + msg.setChallengePriceCustomized(value); + break; + case 14: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setChallengeCustomizedPricing(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.score.Node.Settings.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.score.Node.Settings.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.score.Node.Settings} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.Node.Settings.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStoragePriceAsk(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getBandwidthPriceAsk(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getStorageTimeMin(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getBandwidthLimit(); + if (f !== 0.0) { + writer.writeDouble( + 4, + f + ); + } + f = message.getCollateralStake(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getStoragePriceDefault(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } + f = message.getCustomizedPricing(); + if (f) { + writer.writeBool( + 7, + f + ); + } + f = message.getRolesList(); + if (f.length > 0) { + writer.writePackedEnum( + 8, + f + ); + } + f = message.getRepairPriceDefault(); + if (f !== 0) { + writer.writeUint64( + 9, + f + ); + } + f = message.getRepairPriceCustomized(); + if (f !== 0) { + writer.writeUint64( + 10, + f + ); + } + f = message.getRepairCustomizedPricing(); + if (f) { + writer.writeBool( + 11, + f + ); + } + f = message.getChallengePriceDefault(); + if (f !== 0) { + writer.writeUint64( + 12, + f + ); + } + f = message.getChallengePriceCustomized(); + if (f !== 0) { + writer.writeUint64( + 13, + f + ); + } + f = message.getChallengeCustomizedPricing(); + if (f) { + writer.writeBool( + 14, + f + ); + } +}; + + +/** + * optional uint64 storage_price_ask = 1; + * @return {number} + */ +proto.score.Node.Settings.prototype.getStoragePriceAsk = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node.Settings} returns this + */ +proto.score.Node.Settings.prototype.setStoragePriceAsk = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 bandwidth_price_ask = 2; + * @return {number} + */ +proto.score.Node.Settings.prototype.getBandwidthPriceAsk = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node.Settings} returns this + */ +proto.score.Node.Settings.prototype.setBandwidthPriceAsk = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 storage_time_min = 3; + * @return {number} + */ +proto.score.Node.Settings.prototype.getStorageTimeMin = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node.Settings} returns this + */ +proto.score.Node.Settings.prototype.setStorageTimeMin = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional double bandwidth_limit = 4; + * @return {number} + */ +proto.score.Node.Settings.prototype.getBandwidthLimit = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node.Settings} returns this + */ +proto.score.Node.Settings.prototype.setBandwidthLimit = function(value) { + return jspb.Message.setProto3FloatField(this, 4, value); +}; + + +/** + * optional uint64 collateral_stake = 5; + * @return {number} + */ +proto.score.Node.Settings.prototype.getCollateralStake = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node.Settings} returns this + */ +proto.score.Node.Settings.prototype.setCollateralStake = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional uint64 storage_price_default = 6; + * @return {number} + */ +proto.score.Node.Settings.prototype.getStoragePriceDefault = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node.Settings} returns this + */ +proto.score.Node.Settings.prototype.setStoragePriceDefault = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional bool customized_pricing = 7; + * @return {boolean} + */ +proto.score.Node.Settings.prototype.getCustomizedPricing = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.Settings} returns this + */ +proto.score.Node.Settings.prototype.setCustomizedPricing = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + +/** + * repeated NodeRole roles = 8; + * @return {!Array} + */ +proto.score.Node.Settings.prototype.getRolesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 8)); +}; + + +/** + * @param {!Array} value + * @return {!proto.score.Node.Settings} returns this + */ +proto.score.Node.Settings.prototype.setRolesList = function(value) { + return jspb.Message.setField(this, 8, value || []); +}; + + +/** + * @param {!proto.score.NodeRole} value + * @param {number=} opt_index + * @return {!proto.score.Node.Settings} returns this + */ +proto.score.Node.Settings.prototype.addRoles = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 8, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.score.Node.Settings} returns this + */ +proto.score.Node.Settings.prototype.clearRolesList = function() { + return this.setRolesList([]); +}; + + +/** + * optional uint64 repair_price_default = 9; + * @return {number} + */ +proto.score.Node.Settings.prototype.getRepairPriceDefault = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node.Settings} returns this + */ +proto.score.Node.Settings.prototype.setRepairPriceDefault = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); +}; + + +/** + * optional uint64 repair_price_customized = 10; + * @return {number} + */ +proto.score.Node.Settings.prototype.getRepairPriceCustomized = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node.Settings} returns this + */ +proto.score.Node.Settings.prototype.setRepairPriceCustomized = function(value) { + return jspb.Message.setProto3IntField(this, 10, value); +}; + + +/** + * optional bool repair_customized_pricing = 11; + * @return {boolean} + */ +proto.score.Node.Settings.prototype.getRepairCustomizedPricing = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 11, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.Settings} returns this + */ +proto.score.Node.Settings.prototype.setRepairCustomizedPricing = function(value) { + return jspb.Message.setProto3BooleanField(this, 11, value); +}; + + +/** + * optional uint64 challenge_price_default = 12; + * @return {number} + */ +proto.score.Node.Settings.prototype.getChallengePriceDefault = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node.Settings} returns this + */ +proto.score.Node.Settings.prototype.setChallengePriceDefault = function(value) { + return jspb.Message.setProto3IntField(this, 12, value); +}; + + +/** + * optional uint64 challenge_price_customized = 13; + * @return {number} + */ +proto.score.Node.Settings.prototype.getChallengePriceCustomized = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node.Settings} returns this + */ +proto.score.Node.Settings.prototype.setChallengePriceCustomized = function(value) { + return jspb.Message.setProto3IntField(this, 13, value); +}; + + +/** + * optional bool challenge_customized_pricing = 14; + * @return {boolean} + */ +proto.score.Node.Settings.prototype.getChallengeCustomizedPricing = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 14, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.Settings} returns this + */ +proto.score.Node.Settings.prototype.setChallengeCustomizedPricing = function(value) { + return jspb.Message.setProto3BooleanField(this, 14, 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_, 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.score.Node.Geo.prototype.toObject = function(opt_includeInstance) { + return proto.score.Node.Geo.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.score.Node.Geo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.Node.Geo.toObject = function(includeInstance, msg) { + var f, obj = { + countryShort: jspb.Message.getFieldWithDefault(msg, 1, ""), + region: jspb.Message.getFieldWithDefault(msg, 2, ""), + latitude: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0), + longitude: 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.score.Node.Geo} + */ +proto.score.Node.Geo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.score.Node.Geo; + return proto.score.Node.Geo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.score.Node.Geo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.score.Node.Geo} + */ +proto.score.Node.Geo.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.setCountryShort(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setRegion(value); + break; + case 3: + var value = /** @type {number} */ (reader.readFloat()); + msg.setLatitude(value); + break; + case 4: + var value = /** @type {number} */ (reader.readFloat()); + msg.setLongitude(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.score.Node.Geo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.score.Node.Geo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.score.Node.Geo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.Node.Geo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCountryShort(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRegion(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getLatitude(); + if (f !== 0.0) { + writer.writeFloat( + 3, + f + ); + } + f = message.getLongitude(); + if (f !== 0.0) { + writer.writeFloat( + 4, + f + ); + } +}; + + +/** + * optional string country_short = 1; + * @return {string} + */ +proto.score.Node.Geo.prototype.getCountryShort = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.Node.Geo} returns this + */ +proto.score.Node.Geo.prototype.setCountryShort = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string region = 2; + * @return {string} + */ +proto.score.Node.Geo.prototype.getRegion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.Node.Geo} returns this + */ +proto.score.Node.Geo.prototype.setRegion = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional float latitude = 3; + * @return {number} + */ +proto.score.Node.Geo.prototype.getLatitude = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node.Geo} returns this + */ +proto.score.Node.Geo.prototype.setLatitude = function(value) { + return jspb.Message.setProto3FloatField(this, 3, value); +}; + + +/** + * optional float longitude = 4; + * @return {number} + */ +proto.score.Node.Geo.prototype.getLongitude = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node.Geo} returns this + */ +proto.score.Node.Geo.prototype.setLongitude = 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_, 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.score.Node.ExperimentalFlags.prototype.toObject = function(opt_includeInstance) { + return proto.score.Node.ExperimentalFlags.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.score.Node.ExperimentalFlags} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.Node.ExperimentalFlags.toObject = function(includeInstance, msg) { + var f, obj = { + analytics: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + filestoreEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + hostsSyncEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + hostsSyncMode: jspb.Message.getFieldWithDefault(msg, 4, ""), + libp2pStreamMounting: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + p2pHttpProxy: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + preferTls: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), + quic: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), + removeOnUnpin: jspb.Message.getBooleanFieldWithDefault(msg, 9, false), + shardingEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), + storageClientEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 11, false), + storageHostEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 12, false), + strategicProviding: jspb.Message.getBooleanFieldWithDefault(msg, 13, false), + urlStoreEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 14, false), + disableAutoUpdate: jspb.Message.getBooleanFieldWithDefault(msg, 15, false), + graphsyncEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 16, false), + repairHostEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 17, false), + challengeHostEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 18, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.score.Node.ExperimentalFlags} + */ +proto.score.Node.ExperimentalFlags.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.score.Node.ExperimentalFlags; + return proto.score.Node.ExperimentalFlags.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.score.Node.ExperimentalFlags} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.score.Node.ExperimentalFlags} + */ +proto.score.Node.ExperimentalFlags.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAnalytics(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setFilestoreEnabled(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setHostsSyncEnabled(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setHostsSyncMode(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setLibp2pStreamMounting(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setP2pHttpProxy(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPreferTls(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setQuic(value); + break; + case 9: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRemoveOnUnpin(value); + break; + case 10: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setShardingEnabled(value); + break; + case 11: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setStorageClientEnabled(value); + break; + case 12: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setStorageHostEnabled(value); + break; + case 13: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setStrategicProviding(value); + break; + case 14: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setUrlStoreEnabled(value); + break; + case 15: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDisableAutoUpdate(value); + break; + case 16: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setGraphsyncEnabled(value); + break; + case 17: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRepairHostEnabled(value); + break; + case 18: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setChallengeHostEnabled(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.score.Node.ExperimentalFlags.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.score.Node.ExperimentalFlags.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.score.Node.ExperimentalFlags} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.Node.ExperimentalFlags.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAnalytics(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getFilestoreEnabled(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getHostsSyncEnabled(); + if (f) { + writer.writeBool( + 3, + f + ); + } + f = message.getHostsSyncMode(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getLibp2pStreamMounting(); + if (f) { + writer.writeBool( + 5, + f + ); + } + f = message.getP2pHttpProxy(); + if (f) { + writer.writeBool( + 6, + f + ); + } + f = message.getPreferTls(); + if (f) { + writer.writeBool( + 7, + f + ); + } + f = message.getQuic(); + if (f) { + writer.writeBool( + 8, + f + ); + } + f = message.getRemoveOnUnpin(); + if (f) { + writer.writeBool( + 9, + f + ); + } + f = message.getShardingEnabled(); + if (f) { + writer.writeBool( + 10, + f + ); + } + f = message.getStorageClientEnabled(); + if (f) { + writer.writeBool( + 11, + f + ); + } + f = message.getStorageHostEnabled(); + if (f) { + writer.writeBool( + 12, + f + ); + } + f = message.getStrategicProviding(); + if (f) { + writer.writeBool( + 13, + f + ); + } + f = message.getUrlStoreEnabled(); + if (f) { + writer.writeBool( + 14, + f + ); + } + f = message.getDisableAutoUpdate(); + if (f) { + writer.writeBool( + 15, + f + ); + } + f = message.getGraphsyncEnabled(); + if (f) { + writer.writeBool( + 16, + f + ); + } + f = message.getRepairHostEnabled(); + if (f) { + writer.writeBool( + 17, + f + ); + } + f = message.getChallengeHostEnabled(); + if (f) { + writer.writeBool( + 18, + f + ); + } +}; + + +/** + * optional bool analytics = 1; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getAnalytics = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setAnalytics = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +/** + * optional bool filestore_enabled = 2; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getFilestoreEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setFilestoreEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional bool hosts_sync_enabled = 3; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getHostsSyncEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setHostsSyncEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +/** + * optional string hosts_sync_mode = 4; + * @return {string} + */ +proto.score.Node.ExperimentalFlags.prototype.getHostsSyncMode = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setHostsSyncMode = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional bool libp2p_stream_mounting = 5; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getLibp2pStreamMounting = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setLibp2pStreamMounting = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + +/** + * optional bool p2p_http_proxy = 6; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getP2pHttpProxy = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setP2pHttpProxy = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); +}; + + +/** + * optional bool prefer_tls = 7; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getPreferTls = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setPreferTls = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + +/** + * optional bool quic = 8; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getQuic = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setQuic = function(value) { + return jspb.Message.setProto3BooleanField(this, 8, value); +}; + + +/** + * optional bool remove_on_unpin = 9; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getRemoveOnUnpin = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setRemoveOnUnpin = function(value) { + return jspb.Message.setProto3BooleanField(this, 9, value); +}; + + +/** + * optional bool sharding_enabled = 10; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getShardingEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setShardingEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 10, value); +}; + + +/** + * optional bool storage_client_enabled = 11; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getStorageClientEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 11, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setStorageClientEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 11, value); +}; + + +/** + * optional bool storage_host_enabled = 12; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getStorageHostEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 12, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setStorageHostEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 12, value); +}; + + +/** + * optional bool strategic_providing = 13; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getStrategicProviding = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 13, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setStrategicProviding = function(value) { + return jspb.Message.setProto3BooleanField(this, 13, value); +}; + + +/** + * optional bool url_store_enabled = 14; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getUrlStoreEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 14, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setUrlStoreEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 14, value); +}; + + +/** + * optional bool disable_auto_update = 15; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getDisableAutoUpdate = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 15, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setDisableAutoUpdate = function(value) { + return jspb.Message.setProto3BooleanField(this, 15, value); +}; + + +/** + * optional bool graphsync_enabled = 16; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getGraphsyncEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 16, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setGraphsyncEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 16, value); +}; + + +/** + * optional bool repair_host_enabled = 17; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getRepairHostEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 17, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setRepairHostEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 17, value); +}; + + +/** + * optional bool challenge_host_enabled = 18; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getChallengeHostEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 18, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setChallengeHostEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 18, value); +}; + + +/** + * optional string table_name = 1; + * @return {string} + */ +proto.score.Node.prototype.getTableName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setTableName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string node_id = 2; + * @return {string} + */ +proto.score.Node.prototype.getNodeId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setNodeId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string btfs_version = 3; + * @return {string} + */ +proto.score.Node.prototype.getBtfsVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setBtfsVersion = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional uint64 up_time = 4; + * @return {number} + */ +proto.score.Node.prototype.getUpTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setUpTime = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint64 storage_used = 5; + * @return {number} + */ +proto.score.Node.prototype.getStorageUsed = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setStorageUsed = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional uint64 storage_volume_cap = 6; + * @return {number} + */ +proto.score.Node.prototype.getStorageVolumeCap = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setStorageVolumeCap = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional uint64 memory_used = 7; + * @return {number} + */ +proto.score.Node.prototype.getMemoryUsed = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setMemoryUsed = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional double cpu_used = 8; + * @return {number} + */ +proto.score.Node.prototype.getCpuUsed = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 8, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setCpuUsed = function(value) { + return jspb.Message.setProto3FloatField(this, 8, value); +}; + + +/** + * optional uint64 upload = 9; + * @return {number} + */ +proto.score.Node.prototype.getUpload = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setUpload = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); +}; + + +/** + * optional uint64 download = 10; + * @return {number} + */ +proto.score.Node.prototype.getDownload = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setDownload = function(value) { + return jspb.Message.setProto3IntField(this, 10, value); +}; + + +/** + * optional uint64 total_upload = 11; + * @return {number} + */ +proto.score.Node.prototype.getTotalUpload = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setTotalUpload = function(value) { + return jspb.Message.setProto3IntField(this, 11, value); +}; + + +/** + * optional uint64 total_download = 12; + * @return {number} + */ +proto.score.Node.prototype.getTotalDownload = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setTotalDownload = function(value) { + return jspb.Message.setProto3IntField(this, 12, value); +}; + + +/** + * optional uint64 storage_price_deal = 13; + * @return {number} + */ +proto.score.Node.prototype.getStoragePriceDeal = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setStoragePriceDeal = function(value) { + return jspb.Message.setProto3IntField(this, 13, value); +}; + + +/** + * optional uint64 bandwidth_price_deal = 14; + * @return {number} + */ +proto.score.Node.prototype.getBandwidthPriceDeal = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setBandwidthPriceDeal = function(value) { + return jspb.Message.setProto3IntField(this, 14, value); +}; + + +/** + * optional Settings settings = 15; + * @return {?proto.score.Node.Settings} + */ +proto.score.Node.prototype.getSettings = function() { + return /** @type{?proto.score.Node.Settings} */ ( + jspb.Message.getWrapperField(this, proto.score.Node.Settings, 15)); +}; + + +/** + * @param {?proto.score.Node.Settings|undefined} value + * @return {!proto.score.Node} returns this +*/ +proto.score.Node.prototype.setSettings = function(value) { + return jspb.Message.setWrapperField(this, 15, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.clearSettings = function() { + return this.setSettings(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.score.Node.prototype.hasSettings = function() { + return jspb.Message.getField(this, 15) != null; +}; + + +/** + * optional double reputation = 16; + * @return {number} + */ +proto.score.Node.prototype.getReputation = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 16, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setReputation = function(value) { + return jspb.Message.setProto3FloatField(this, 16, value); +}; + + +/** + * optional uint64 blocks_up = 17; + * @return {number} + */ +proto.score.Node.prototype.getBlocksUp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 17, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setBlocksUp = function(value) { + return jspb.Message.setProto3IntField(this, 17, value); +}; + + +/** + * optional uint64 blocks_down = 18; + * @return {number} + */ +proto.score.Node.prototype.getBlocksDown = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 18, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setBlocksDown = function(value) { + return jspb.Message.setProto3IntField(this, 18, value); +}; + + +/** + * optional string os_type = 19; + * @return {string} + */ +proto.score.Node.prototype.getOsType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 19, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setOsType = function(value) { + return jspb.Message.setProto3StringField(this, 19, value); +}; + + +/** + * optional string arch_type = 20; + * @return {string} + */ +proto.score.Node.prototype.getArchType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 20, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setArchType = function(value) { + return jspb.Message.setProto3StringField(this, 20, value); +}; + + +/** + * optional string cpu_info = 21; + * @return {string} + */ +proto.score.Node.prototype.getCpuInfo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 21, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setCpuInfo = function(value) { + return jspb.Message.setProto3StringField(this, 21, value); +}; + + +/** + * optional uint64 peers_connected = 23; + * @return {number} + */ +proto.score.Node.prototype.getPeersConnected = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 23, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setPeersConnected = function(value) { + return jspb.Message.setProto3IntField(this, 23, value); +}; + + +/** + * optional google.protobuf.Timestamp time_created = 24; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.score.Node.prototype.getTimeCreated = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 24)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.score.Node} returns this +*/ +proto.score.Node.prototype.setTimeCreated = function(value) { + return jspb.Message.setWrapperField(this, 24, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.clearTimeCreated = function() { + return this.setTimeCreated(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.score.Node.prototype.hasTimeCreated = function() { + return jspb.Message.getField(this, 24) != null; +}; + + +/** + * optional string h_val = 25; + * @return {string} + */ +proto.score.Node.prototype.getHVal = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 25, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setHVal = function(value) { + return jspb.Message.setProto3StringField(this, 25, value); +}; + + +/** + * optional Geo geo = 26; + * @return {?proto.score.Node.Geo} + */ +proto.score.Node.prototype.getGeo = function() { + return /** @type{?proto.score.Node.Geo} */ ( + jspb.Message.getWrapperField(this, proto.score.Node.Geo, 26)); +}; + + +/** + * @param {?proto.score.Node.Geo|undefined} value + * @return {!proto.score.Node} returns this +*/ +proto.score.Node.prototype.setGeo = function(value) { + return jspb.Message.setWrapperField(this, 26, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.clearGeo = function() { + return this.setGeo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.score.Node.prototype.hasGeo = function() { + return jspb.Message.getField(this, 26) != null; +}; + + +/** + * optional ExperimentalFlags flg = 27; + * @return {?proto.score.Node.ExperimentalFlags} + */ +proto.score.Node.prototype.getFlg = function() { + return /** @type{?proto.score.Node.ExperimentalFlags} */ ( + jspb.Message.getWrapperField(this, proto.score.Node.ExperimentalFlags, 27)); +}; + + +/** + * @param {?proto.score.Node.ExperimentalFlags|undefined} value + * @return {!proto.score.Node} returns this +*/ +proto.score.Node.prototype.setFlg = function(value) { + return jspb.Message.setWrapperField(this, 27, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.clearFlg = function() { + return this.setFlg(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.score.Node.prototype.hasFlg = function() { + return jspb.Message.getField(this, 27) != null; +}; + + +/** + * @enum {number} + */ +proto.score.ResponseCode = { + SUCCESS: 0, + SIGNATURE_FORMAT_ERROR: 1, + COMPUTE_ADDRESS_ERROR: 2, + TIMEOUT_ERROR: 3, + OTHER_ERROR: 20 +}; + +/** + * @enum {number} + */ +proto.score.NodeRole = { + RENTER: 0, + HOST: 1, + REPAIRER: 2, + CHALLENGER: 3, + NETWORK_CHECKER: 4, + REPUTATION_CHECKER: 5, + CDN_PROVIDER: 6, + OTHER: 20 +}; + +goog.object.extend(exports, proto.score); diff --git a/protos/score/score.pb.go b/protos/score/score.pb.go new file mode 100644 index 0000000..fefdcc8 --- /dev/null +++ b/protos/score/score.pb.go @@ -0,0 +1,9670 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: protos/score/score.proto + +package score + +import ( + context "context" + encoding_binary "encoding/binary" + fmt "fmt" + _ "github.com/gogo/protobuf/types" + golang_proto "github.com/golang/protobuf/proto" + _ "github.com/tron-us/protobuf/gogoproto" + proto "github.com/tron-us/protobuf/proto" + github_com_tron_us_protobuf_types "github.com/tron-us/protobuf/types" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" + time "time" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = golang_proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type ResponseCode int32 + +const ( + ResponseCode_SUCCESS ResponseCode = 0 + ResponseCode_SIGNATURE_FORMAT_ERROR ResponseCode = 1 + ResponseCode_COMPUTE_ADDRESS_ERROR ResponseCode = 2 + ResponseCode_TIMEOUT_ERROR ResponseCode = 3 + ResponseCode_OTHER_ERROR ResponseCode = 20 +) + +var ResponseCode_name = map[int32]string{ + 0: "SUCCESS", + 1: "SIGNATURE_FORMAT_ERROR", + 2: "COMPUTE_ADDRESS_ERROR", + 3: "TIMEOUT_ERROR", + 20: "OTHER_ERROR", +} + +var ResponseCode_value = map[string]int32{ + "SUCCESS": 0, + "SIGNATURE_FORMAT_ERROR": 1, + "COMPUTE_ADDRESS_ERROR": 2, + "TIMEOUT_ERROR": 3, + "OTHER_ERROR": 20, +} + +func (x ResponseCode) String() string { + return proto.EnumName(ResponseCode_name, int32(x)) +} + +func (ResponseCode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_649f1c1133130df2, []int{0} +} + +type NodeRole int32 + +const ( + NodeRole_RENTER NodeRole = 0 + NodeRole_HOST NodeRole = 1 + NodeRole_REPAIRER NodeRole = 2 + NodeRole_CHALLENGER NodeRole = 3 + NodeRole_NETWORK_CHECKER NodeRole = 4 + NodeRole_REPUTATION_CHECKER NodeRole = 5 + NodeRole_CDN_PROVIDER NodeRole = 6 + NodeRole_OTHER NodeRole = 20 +) + +var NodeRole_name = map[int32]string{ + 0: "RENTER", + 1: "HOST", + 2: "REPAIRER", + 3: "CHALLENGER", + 4: "NETWORK_CHECKER", + 5: "REPUTATION_CHECKER", + 6: "CDN_PROVIDER", + 20: "OTHER", +} + +var NodeRole_value = map[string]int32{ + "RENTER": 0, + "HOST": 1, + "REPAIRER": 2, + "CHALLENGER": 3, + "NETWORK_CHECKER": 4, + "REPUTATION_CHECKER": 5, + "CDN_PROVIDER": 6, + "OTHER": 20, +} + +func (x NodeRole) String() string { + return proto.EnumName(NodeRole_name, int32(x)) +} + +func (NodeRole) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_649f1c1133130df2, []int{1} +} + +type HostsReq_Mode int32 + +const ( + HostsReq_SCORE HostsReq_Mode = 0 + HostsReq_GEO HostsReq_Mode = 1 + HostsReq_REP HostsReq_Mode = 2 + HostsReq_PRICE HostsReq_Mode = 3 + HostsReq_SPEED HostsReq_Mode = 4 + HostsReq_TESTNET HostsReq_Mode = 5 +) + +var HostsReq_Mode_name = map[int32]string{ + 0: "SCORE", + 1: "GEO", + 2: "REP", + 3: "PRICE", + 4: "SPEED", + 5: "TESTNET", +} + +var HostsReq_Mode_value = map[string]int32{ + "SCORE": 0, + "GEO": 1, + "REP": 2, + "PRICE": 3, + "SPEED": 4, + "TESTNET": 5, +} + +func (x HostsReq_Mode) String() string { + return proto.EnumName(HostsReq_Mode_name, int32(x)) +} + +func (HostsReq_Mode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_649f1c1133130df2, []int{4, 0} +} + +type NodesReq struct { + NodeId []string `protobuf:"bytes,1,rep,name=node_id,json=nodeId,proto3" json:"node_id,omitempty" pg:"node_id"` + RequesterId string `protobuf:"bytes,2,opt,name=requester_id,json=requesterId,proto3" json:"requester_id,omitempty" pg:"requester_id"` + Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *NodesReq) Reset() { *m = NodesReq{} } +func (m *NodesReq) String() string { return proto.CompactTextString(m) } +func (*NodesReq) ProtoMessage() {} +func (*NodesReq) Descriptor() ([]byte, []int) { + return fileDescriptor_649f1c1133130df2, []int{0} +} +func (m *NodesReq) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NodesReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NodesReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *NodesReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_NodesReq.Merge(m, src) +} +func (m *NodesReq) XXX_Size() int { + return m.Size() +} +func (m *NodesReq) XXX_DiscardUnknown() { + xxx_messageInfo_NodesReq.DiscardUnknown(m) +} + +var xxx_messageInfo_NodesReq proto.InternalMessageInfo + +func (m *NodesReq) GetNodeId() []string { + if m != nil { + return m.NodeId + } + return nil +} + +func (m *NodesReq) GetRequesterId() string { + if m != nil { + return m.RequesterId + } + return "" +} + +func (m *NodesReq) GetSignature() []byte { + if m != nil { + return m.Signature + } + return nil +} + +func (*NodesReq) XXX_MessageName() string { + return "score.NodesReq" +} + +type SettingsReq struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" pg:"id"` + RespSize int32 `protobuf:"varint,2,opt,name=resp_size,json=respSize,proto3" json:"resp_size,omitempty" pg:"resp_size"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *SettingsReq) Reset() { *m = SettingsReq{} } +func (m *SettingsReq) String() string { return proto.CompactTextString(m) } +func (*SettingsReq) ProtoMessage() {} +func (*SettingsReq) Descriptor() ([]byte, []int) { + return fileDescriptor_649f1c1133130df2, []int{1} +} +func (m *SettingsReq) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SettingsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SettingsReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SettingsReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_SettingsReq.Merge(m, src) +} +func (m *SettingsReq) XXX_Size() int { + return m.Size() +} +func (m *SettingsReq) XXX_DiscardUnknown() { + xxx_messageInfo_SettingsReq.DiscardUnknown(m) +} + +var xxx_messageInfo_SettingsReq proto.InternalMessageInfo + +func (m *SettingsReq) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *SettingsReq) GetRespSize() int32 { + if m != nil { + return m.RespSize + } + return 0 +} + +func (*SettingsReq) XXX_MessageName() string { + return "score.SettingsReq" +} + +type SettingsResp struct { + Code ResponseCode `protobuf:"varint,1,opt,name=code,proto3,enum=score.ResponseCode" json:"code,omitempty" pg:"code"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty" pg:"message"` + ResponseTime time.Time `protobuf:"bytes,3,opt,name=response_time,json=responseTime,proto3,stdtime" json:"response_time" pg:"response_time"` + SettingsData *SettingsData `protobuf:"bytes,4,opt,name=settings_data,json=settingsData,proto3" json:"settings_data,omitempty" pg:"settings_data"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *SettingsResp) Reset() { *m = SettingsResp{} } +func (m *SettingsResp) String() string { return proto.CompactTextString(m) } +func (*SettingsResp) ProtoMessage() {} +func (*SettingsResp) Descriptor() ([]byte, []int) { + return fileDescriptor_649f1c1133130df2, []int{2} +} +func (m *SettingsResp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SettingsResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SettingsResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SettingsResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_SettingsResp.Merge(m, src) +} +func (m *SettingsResp) XXX_Size() int { + return m.Size() +} +func (m *SettingsResp) XXX_DiscardUnknown() { + xxx_messageInfo_SettingsResp.DiscardUnknown(m) +} + +var xxx_messageInfo_SettingsResp proto.InternalMessageInfo + +func (m *SettingsResp) GetCode() ResponseCode { + if m != nil { + return m.Code + } + return ResponseCode_SUCCESS +} + +func (m *SettingsResp) GetMessage() string { + if m != nil { + return m.Message + } + return "" +} + +func (m *SettingsResp) GetResponseTime() time.Time { + if m != nil { + return m.ResponseTime + } + return time.Time{} +} + +func (m *SettingsResp) GetSettingsData() *SettingsData { + if m != nil { + return m.SettingsData + } + return nil +} + +func (*SettingsResp) XXX_MessageName() string { + return "score.SettingsResp" +} + +type SettingsData struct { + StoragePriceAsk float64 `protobuf:"fixed64,1,opt,name=storage_price_ask,json=storagePriceAsk,proto3" json:"storage_price_ask,omitempty" pg:"storage_price_ask"` + BandwidthPriceAsk float64 `protobuf:"fixed64,2,opt,name=bandwidth_price_ask,json=bandwidthPriceAsk,proto3" json:"bandwidth_price_ask,omitempty" pg:"bandwidth_price_ask"` + StorageTimeMin float64 `protobuf:"fixed64,3,opt,name=storage_time_min,json=storageTimeMin,proto3" json:"storage_time_min,omitempty" pg:"storage_time_min"` + BandwidthLimit float64 `protobuf:"fixed64,4,opt,name=bandwidth_limit,json=bandwidthLimit,proto3" json:"bandwidth_limit,omitempty" pg:"bandwidth_limit"` + CollateralStake float64 `protobuf:"fixed64,5,opt,name=collateral_stake,json=collateralStake,proto3" json:"collateral_stake,omitempty" pg:"collateral_stake"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *SettingsData) Reset() { *m = SettingsData{} } +func (m *SettingsData) String() string { return proto.CompactTextString(m) } +func (*SettingsData) ProtoMessage() {} +func (*SettingsData) Descriptor() ([]byte, []int) { + return fileDescriptor_649f1c1133130df2, []int{3} +} +func (m *SettingsData) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SettingsData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SettingsData.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SettingsData) XXX_Merge(src proto.Message) { + xxx_messageInfo_SettingsData.Merge(m, src) +} +func (m *SettingsData) XXX_Size() int { + return m.Size() +} +func (m *SettingsData) XXX_DiscardUnknown() { + xxx_messageInfo_SettingsData.DiscardUnknown(m) +} + +var xxx_messageInfo_SettingsData proto.InternalMessageInfo + +func (m *SettingsData) GetStoragePriceAsk() float64 { + if m != nil { + return m.StoragePriceAsk + } + return 0 +} + +func (m *SettingsData) GetBandwidthPriceAsk() float64 { + if m != nil { + return m.BandwidthPriceAsk + } + return 0 +} + +func (m *SettingsData) GetStorageTimeMin() float64 { + if m != nil { + return m.StorageTimeMin + } + return 0 +} + +func (m *SettingsData) GetBandwidthLimit() float64 { + if m != nil { + return m.BandwidthLimit + } + return 0 +} + +func (m *SettingsData) GetCollateralStake() float64 { + if m != nil { + return m.CollateralStake + } + return 0 +} + +func (*SettingsData) XXX_MessageName() string { + return "score.SettingsData" +} + +type HostsReq struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" pg:"id"` + RespSize int32 `protobuf:"varint,2,opt,name=resp_size,json=respSize,proto3" json:"resp_size,omitempty" pg:"resp_size"` + Mode HostsReq_Mode `protobuf:"varint,3,opt,name=mode,proto3,enum=score.HostsReq_Mode" json:"mode,omitempty" pg:"mode"` + Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty" pg:"version"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *HostsReq) Reset() { *m = HostsReq{} } +func (m *HostsReq) String() string { return proto.CompactTextString(m) } +func (*HostsReq) ProtoMessage() {} +func (*HostsReq) Descriptor() ([]byte, []int) { + return fileDescriptor_649f1c1133130df2, []int{4} +} +func (m *HostsReq) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HostsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_HostsReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *HostsReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_HostsReq.Merge(m, src) +} +func (m *HostsReq) XXX_Size() int { + return m.Size() +} +func (m *HostsReq) XXX_DiscardUnknown() { + xxx_messageInfo_HostsReq.DiscardUnknown(m) +} + +var xxx_messageInfo_HostsReq proto.InternalMessageInfo + +func (m *HostsReq) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *HostsReq) GetRespSize() int32 { + if m != nil { + return m.RespSize + } + return 0 +} + +func (m *HostsReq) GetMode() HostsReq_Mode { + if m != nil { + return m.Mode + } + return HostsReq_SCORE +} + +func (m *HostsReq) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +func (*HostsReq) XXX_MessageName() string { + return "score.HostsReq" +} + +type RolesHostsReq struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" pg:"id"` + RespSize int32 `protobuf:"varint,2,opt,name=resp_size,json=respSize,proto3" json:"resp_size,omitempty" pg:"resp_size"` + Role NodeRole `protobuf:"varint,3,opt,name=role,proto3,enum=score.NodeRole" json:"role,omitempty" pg:"role"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *RolesHostsReq) Reset() { *m = RolesHostsReq{} } +func (m *RolesHostsReq) String() string { return proto.CompactTextString(m) } +func (*RolesHostsReq) ProtoMessage() {} +func (*RolesHostsReq) Descriptor() ([]byte, []int) { + return fileDescriptor_649f1c1133130df2, []int{5} +} +func (m *RolesHostsReq) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RolesHostsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RolesHostsReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RolesHostsReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_RolesHostsReq.Merge(m, src) +} +func (m *RolesHostsReq) XXX_Size() int { + return m.Size() +} +func (m *RolesHostsReq) XXX_DiscardUnknown() { + xxx_messageInfo_RolesHostsReq.DiscardUnknown(m) +} + +var xxx_messageInfo_RolesHostsReq proto.InternalMessageInfo + +func (m *RolesHostsReq) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *RolesHostsReq) GetRespSize() int32 { + if m != nil { + return m.RespSize + } + return 0 +} + +func (m *RolesHostsReq) GetRole() NodeRole { + if m != nil { + return m.Role + } + return NodeRole_RENTER +} + +func (*RolesHostsReq) XXX_MessageName() string { + return "score.RolesHostsReq" +} + +type HostsResp struct { + Code ResponseCode `protobuf:"varint,1,opt,name=code,proto3,enum=score.ResponseCode" json:"code,omitempty" pg:"code"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty" pg:"message"` + Hosts *HostsData `protobuf:"bytes,3,opt,name=hosts,proto3" json:"hosts,omitempty" pg:"hosts"` + RespSize int32 `protobuf:"varint,4,opt,name=resp_size,json=respSize,proto3" json:"resp_size,omitempty" pg:"resp_size"` + Mode string `protobuf:"bytes,5,opt,name=mode,proto3" json:"mode,omitempty" pg:"mode"` + ResponseTime time.Time `protobuf:"bytes,6,opt,name=response_time,json=responseTime,proto3,stdtime" json:"response_time" pg:"response_time"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *HostsResp) Reset() { *m = HostsResp{} } +func (m *HostsResp) String() string { return proto.CompactTextString(m) } +func (*HostsResp) ProtoMessage() {} +func (*HostsResp) Descriptor() ([]byte, []int) { + return fileDescriptor_649f1c1133130df2, []int{6} +} +func (m *HostsResp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HostsResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_HostsResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *HostsResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_HostsResp.Merge(m, src) +} +func (m *HostsResp) XXX_Size() int { + return m.Size() +} +func (m *HostsResp) XXX_DiscardUnknown() { + xxx_messageInfo_HostsResp.DiscardUnknown(m) +} + +var xxx_messageInfo_HostsResp proto.InternalMessageInfo + +func (m *HostsResp) GetCode() ResponseCode { + if m != nil { + return m.Code + } + return ResponseCode_SUCCESS +} + +func (m *HostsResp) GetMessage() string { + if m != nil { + return m.Message + } + return "" +} + +func (m *HostsResp) GetHosts() *HostsData { + if m != nil { + return m.Hosts + } + return nil +} + +func (m *HostsResp) GetRespSize() int32 { + if m != nil { + return m.RespSize + } + return 0 +} + +func (m *HostsResp) GetMode() string { + if m != nil { + return m.Mode + } + return "" +} + +func (m *HostsResp) GetResponseTime() time.Time { + if m != nil { + return m.ResponseTime + } + return time.Time{} +} + +func (*HostsResp) XXX_MessageName() string { + return "score.HostsResp" +} + +type StatsReq struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" pg:"id"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *StatsReq) Reset() { *m = StatsReq{} } +func (m *StatsReq) String() string { return proto.CompactTextString(m) } +func (*StatsReq) ProtoMessage() {} +func (*StatsReq) Descriptor() ([]byte, []int) { + return fileDescriptor_649f1c1133130df2, []int{7} +} +func (m *StatsReq) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StatsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StatsReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *StatsReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_StatsReq.Merge(m, src) +} +func (m *StatsReq) XXX_Size() int { + return m.Size() +} +func (m *StatsReq) XXX_DiscardUnknown() { + xxx_messageInfo_StatsReq.DiscardUnknown(m) +} + +var xxx_messageInfo_StatsReq proto.InternalMessageInfo + +func (m *StatsReq) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (*StatsReq) XXX_MessageName() string { + return "score.StatsReq" +} + +type StatsResp struct { + Code ResponseCode `protobuf:"varint,1,opt,name=code,proto3,enum=score.ResponseCode" json:"code,omitempty" pg:"code"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty" pg:"message"` + ResponseTime time.Time `protobuf:"bytes,3,opt,name=response_time,json=responseTime,proto3,stdtime" json:"response_time" pg:"response_time"` + StorageStat_HostStats `protobuf:"bytes,4,opt,name=stats,proto3,embedded=stats" json:"stats" pg:"stats"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *StatsResp) Reset() { *m = StatsResp{} } +func (m *StatsResp) String() string { return proto.CompactTextString(m) } +func (*StatsResp) ProtoMessage() {} +func (*StatsResp) Descriptor() ([]byte, []int) { + return fileDescriptor_649f1c1133130df2, []int{8} +} +func (m *StatsResp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StatsResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StatsResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *StatsResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_StatsResp.Merge(m, src) +} +func (m *StatsResp) XXX_Size() int { + return m.Size() +} +func (m *StatsResp) XXX_DiscardUnknown() { + xxx_messageInfo_StatsResp.DiscardUnknown(m) +} + +var xxx_messageInfo_StatsResp proto.InternalMessageInfo + +func (m *StatsResp) GetCode() ResponseCode { + if m != nil { + return m.Code + } + return ResponseCode_SUCCESS +} + +func (m *StatsResp) GetMessage() string { + if m != nil { + return m.Message + } + return "" +} + +func (m *StatsResp) GetResponseTime() time.Time { + if m != nil { + return m.ResponseTime + } + return time.Time{} +} + +func (*StatsResp) XXX_MessageName() string { + return "score.StatsResp" +} + +type Host struct { + NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id" pg:"node_id"` + CreateTimestamp time.Time `protobuf:"bytes,2,opt,name=create_timestamp,json=createTimestamp,proto3,stdtime" json:"create_timestamp" pg:"create_timestamp"` + UpdateTimestamp time.Time `protobuf:"bytes,3,opt,name=update_timestamp,json=updateTimestamp,proto3,stdtime" json:"update_timestamp" pg:"update_timestamp"` + Region string `protobuf:"bytes,4,opt,name=region,proto3" json:"region" pg:"region"` + BtfsVersion string `protobuf:"bytes,5,opt,name=btfs_version,json=btfsVersion,proto3" json:"btfs_version" pg:"btfs_version"` + Score float32 `protobuf:"fixed32,6,opt,name=score,proto3" json:"score" pg:"score"` + HeartBeats uint64 `protobuf:"varint,7,opt,name=heart_beats,json=heartBeats,proto3" json:"heart_beats" pg:"heart_beats"` + Uptime float32 `protobuf:"fixed32,8,opt,name=uptime,proto3" json:"uptime" pg:"uptime"` + Age uint64 `protobuf:"varint,9,opt,name=age,proto3" json:"age" pg:"age"` + Reputation float32 `protobuf:"fixed32,10,opt,name=reputation,proto3" json:"reputation" pg:"reputation"` + UploadAverage float32 `protobuf:"fixed32,11,opt,name=upload_average,json=uploadAverage,proto3" json:"upload_average" pg:"upload_average"` + UploadVariance float32 `protobuf:"fixed32,12,opt,name=upload_variance,json=uploadVariance,proto3" json:"upload_variance" pg:"upload_variance"` + DownloadAverage float32 `protobuf:"fixed32,13,opt,name=download_average,json=downloadAverage,proto3" json:"download_average" pg:"download_average"` + DownloadVariance float32 `protobuf:"fixed32,14,opt,name=download_variance,json=downloadVariance,proto3" json:"download_variance" pg:"download_variance"` + Location Location `protobuf:"bytes,15,opt,name=location,proto3" json:"location" pg:"location"` + StorageVolumeCap float32 `protobuf:"fixed32,16,opt,name=storage_volume_cap,json=storageVolumeCap,proto3" json:"storage_volume_cap" pg:"storage_volume_cap"` + StorageVolumeLeft float32 `protobuf:"fixed32,17,opt,name=storage_volume_left,json=storageVolumeLeft,proto3" json:"storage_volume_left" pg:"storage_volume_left"` + StorageTimeMin uint64 `protobuf:"varint,18,opt,name=storage_time_min,json=storageTimeMin,proto3" json:"storage_time_min" pg:"storage_time_min"` + StoragePriceAsk uint64 `protobuf:"varint,19,opt,name=storage_price_ask,json=storagePriceAsk,proto3" json:"storage_price_ask" pg:"storage_price_ask"` + StoragePriceEst uint64 `protobuf:"varint,20,opt,name=storage_price_est,json=storagePriceEst,proto3" json:"storage_price_est" pg:"storage_price_est"` + BandwidthLimit float64 `protobuf:"fixed64,21,opt,name=bandwidth_limit,json=bandwidthLimit,proto3" json:"bandwidth_limit" pg:"bandwidth_limit"` + BandwidthPriceAsk uint64 `protobuf:"varint,22,opt,name=bandwidth_price_ask,json=bandwidthPriceAsk,proto3" json:"bandwidth_price_ask" pg:"bandwidth_price_ask"` + BandwidthPriceEst uint64 `protobuf:"varint,23,opt,name=bandwidth_price_est,json=bandwidthPriceEst,proto3" json:"bandwidth_price_est" pg:"bandwidth_price_est"` + CollateralStake uint64 `protobuf:"varint,24,opt,name=collateral_stake,json=collateralStake,proto3" json:"collateral_stake" pg:"collateral_stake"` + CollateralLost uint64 `protobuf:"varint,25,opt,name=collateral_lost,json=collateralLost,proto3" json:"collateral_lost" pg:"collateral_lost"` + CollateralBurn uint64 `protobuf:"varint,26,opt,name=collateral_burn,json=collateralBurn,proto3" json:"collateral_burn" pg:"collateral_burn"` + CountryShort string `protobuf:"bytes,27,opt,name=country_short,json=countryShort,proto3" json:"country_short" pg:"country_short"` + Node_ExperimentalFlags `protobuf:"bytes,28,opt,name=flg,proto3,embedded=flg" json:"flg" pg:"flg"` + Discovery float32 `protobuf:"fixed32,29,opt,name=discovery,proto3" json:"discovery" pg:"discovery"` + UptimeScore float32 `protobuf:"fixed32,30,opt,name=uptime_score,json=uptimeScore,proto3" json:"uptime_score" pg:"uptime_score"` + AgeScore float32 `protobuf:"fixed32,31,opt,name=age_score,json=ageScore,proto3" json:"age_score" pg:"age_score"` + VersionScore float32 `protobuf:"fixed32,32,opt,name=version_score,json=versionScore,proto3" json:"version_score" pg:"version_score"` + UploadSpeedScore float32 `protobuf:"fixed32,33,opt,name=upload_speed_score,json=uploadSpeedScore,proto3" json:"upload_speed_score" pg:"upload_speed_score"` + DownloadSpeedScore float32 `protobuf:"fixed32,34,opt,name=download_speed_score,json=downloadSpeedScore,proto3" json:"download_speed_score" pg:"download_speed_score"` + Roles []NodeRole `protobuf:"varint,35,rep,packed,name=roles,proto3,enum=score.NodeRole" json:"roles" pg:"roles,array"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *Host) Reset() { *m = Host{} } +func (m *Host) String() string { return proto.CompactTextString(m) } +func (*Host) ProtoMessage() {} +func (*Host) Descriptor() ([]byte, []int) { + return fileDescriptor_649f1c1133130df2, []int{9} +} +func (m *Host) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Host) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Host.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Host) XXX_Merge(src proto.Message) { + xxx_messageInfo_Host.Merge(m, src) +} +func (m *Host) XXX_Size() int { + return m.Size() +} +func (m *Host) XXX_DiscardUnknown() { + xxx_messageInfo_Host.DiscardUnknown(m) +} + +var xxx_messageInfo_Host proto.InternalMessageInfo + +func (m *Host) GetNodeId() string { + if m != nil { + return m.NodeId + } + return "" +} + +func (m *Host) GetCreateTimestamp() time.Time { + if m != nil { + return m.CreateTimestamp + } + return time.Time{} +} + +func (m *Host) GetUpdateTimestamp() time.Time { + if m != nil { + return m.UpdateTimestamp + } + return time.Time{} +} + +func (m *Host) GetRegion() string { + if m != nil { + return m.Region + } + return "" +} + +func (m *Host) GetBtfsVersion() string { + if m != nil { + return m.BtfsVersion + } + return "" +} + +func (m *Host) GetScore() float32 { + if m != nil { + return m.Score + } + return 0 +} + +func (m *Host) GetHeartBeats() uint64 { + if m != nil { + return m.HeartBeats + } + return 0 +} + +func (m *Host) GetUptime() float32 { + if m != nil { + return m.Uptime + } + return 0 +} + +func (m *Host) GetAge() uint64 { + if m != nil { + return m.Age + } + return 0 +} + +func (m *Host) GetReputation() float32 { + if m != nil { + return m.Reputation + } + return 0 +} + +func (m *Host) GetUploadAverage() float32 { + if m != nil { + return m.UploadAverage + } + return 0 +} + +func (m *Host) GetUploadVariance() float32 { + if m != nil { + return m.UploadVariance + } + return 0 +} + +func (m *Host) GetDownloadAverage() float32 { + if m != nil { + return m.DownloadAverage + } + return 0 +} + +func (m *Host) GetDownloadVariance() float32 { + if m != nil { + return m.DownloadVariance + } + return 0 +} + +func (m *Host) GetLocation() Location { + if m != nil { + return m.Location + } + return Location{} +} + +func (m *Host) GetStorageVolumeCap() float32 { + if m != nil { + return m.StorageVolumeCap + } + return 0 +} + +func (m *Host) GetStorageVolumeLeft() float32 { + if m != nil { + return m.StorageVolumeLeft + } + return 0 +} + +func (m *Host) GetStorageTimeMin() uint64 { + if m != nil { + return m.StorageTimeMin + } + return 0 +} + +func (m *Host) GetStoragePriceAsk() uint64 { + if m != nil { + return m.StoragePriceAsk + } + return 0 +} + +func (m *Host) GetStoragePriceEst() uint64 { + if m != nil { + return m.StoragePriceEst + } + return 0 +} + +func (m *Host) GetBandwidthLimit() float64 { + if m != nil { + return m.BandwidthLimit + } + return 0 +} + +func (m *Host) GetBandwidthPriceAsk() uint64 { + if m != nil { + return m.BandwidthPriceAsk + } + return 0 +} + +func (m *Host) GetBandwidthPriceEst() uint64 { + if m != nil { + return m.BandwidthPriceEst + } + return 0 +} + +func (m *Host) GetCollateralStake() uint64 { + if m != nil { + return m.CollateralStake + } + return 0 +} + +func (m *Host) GetCollateralLost() uint64 { + if m != nil { + return m.CollateralLost + } + return 0 +} + +func (m *Host) GetCollateralBurn() uint64 { + if m != nil { + return m.CollateralBurn + } + return 0 +} + +func (m *Host) GetCountryShort() string { + if m != nil { + return m.CountryShort + } + return "" +} + +func (m *Host) GetDiscovery() float32 { + if m != nil { + return m.Discovery + } + return 0 +} + +func (m *Host) GetUptimeScore() float32 { + if m != nil { + return m.UptimeScore + } + return 0 +} + +func (m *Host) GetAgeScore() float32 { + if m != nil { + return m.AgeScore + } + return 0 +} + +func (m *Host) GetVersionScore() float32 { + if m != nil { + return m.VersionScore + } + return 0 +} + +func (m *Host) GetUploadSpeedScore() float32 { + if m != nil { + return m.UploadSpeedScore + } + return 0 +} + +func (m *Host) GetDownloadSpeedScore() float32 { + if m != nil { + return m.DownloadSpeedScore + } + return 0 +} + +func (m *Host) GetRoles() []NodeRole { + if m != nil { + return m.Roles + } + return nil +} + +func (*Host) XXX_MessageName() string { + return "score.Host" +} + +type HostsData struct { + Hosts []*Host `protobuf:"bytes,1,rep,name=hosts,proto3" json:"hosts,omitempty" pg:"hosts"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *HostsData) Reset() { *m = HostsData{} } +func (m *HostsData) String() string { return proto.CompactTextString(m) } +func (*HostsData) ProtoMessage() {} +func (*HostsData) Descriptor() ([]byte, []int) { + return fileDescriptor_649f1c1133130df2, []int{10} +} +func (m *HostsData) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HostsData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_HostsData.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *HostsData) XXX_Merge(src proto.Message) { + xxx_messageInfo_HostsData.Merge(m, src) +} +func (m *HostsData) XXX_Size() int { + return m.Size() +} +func (m *HostsData) XXX_DiscardUnknown() { + xxx_messageInfo_HostsData.DiscardUnknown(m) +} + +var xxx_messageInfo_HostsData proto.InternalMessageInfo + +func (m *HostsData) GetHosts() []*Host { + if m != nil { + return m.Hosts + } + return nil +} + +func (*HostsData) XXX_MessageName() string { + return "score.HostsData" +} + +type Location struct { + Lat float64 `protobuf:"fixed64,1,opt,name=lat,proto3" json:"lat,omitempty" pg:"lat"` + Lon float64 `protobuf:"fixed64,2,opt,name=lon,proto3" json:"lon,omitempty" pg:"lon"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *Location) Reset() { *m = Location{} } +func (m *Location) String() string { return proto.CompactTextString(m) } +func (*Location) ProtoMessage() {} +func (*Location) Descriptor() ([]byte, []int) { + return fileDescriptor_649f1c1133130df2, []int{11} +} +func (m *Location) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Location) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Location.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Location) XXX_Merge(src proto.Message) { + xxx_messageInfo_Location.Merge(m, src) +} +func (m *Location) XXX_Size() int { + return m.Size() +} +func (m *Location) XXX_DiscardUnknown() { + xxx_messageInfo_Location.DiscardUnknown(m) +} + +var xxx_messageInfo_Location proto.InternalMessageInfo + +func (m *Location) GetLat() float64 { + if m != nil { + return m.Lat + } + return 0 +} + +func (m *Location) GetLon() float64 { + if m != nil { + return m.Lon + } + return 0 +} + +func (*Location) XXX_MessageName() string { + return "score.Location" +} + +type StorageStat struct { + HostStats StorageStat_Host `protobuf:"bytes,1,opt,name=host_stats,json=hostStats,proto3" json:"host_stats" pg:"host_stats"` + RenterStats StorageStat_Renter `protobuf:"bytes,2,opt,name=renter_stats,json=renterStats,proto3" json:"renter_stats" pg:"renter_stats"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *StorageStat) Reset() { *m = StorageStat{} } +func (m *StorageStat) String() string { return proto.CompactTextString(m) } +func (*StorageStat) ProtoMessage() {} +func (*StorageStat) Descriptor() ([]byte, []int) { + return fileDescriptor_649f1c1133130df2, []int{12} +} +func (m *StorageStat) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StorageStat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StorageStat.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *StorageStat) XXX_Merge(src proto.Message) { + xxx_messageInfo_StorageStat.Merge(m, src) +} +func (m *StorageStat) XXX_Size() int { + return m.Size() +} +func (m *StorageStat) XXX_DiscardUnknown() { + xxx_messageInfo_StorageStat.DiscardUnknown(m) +} + +var xxx_messageInfo_StorageStat proto.InternalMessageInfo + +func (m *StorageStat) GetHostStats() StorageStat_Host { + if m != nil { + return m.HostStats + } + return StorageStat_Host{} +} + +func (m *StorageStat) GetRenterStats() StorageStat_Renter { + if m != nil { + return m.RenterStats + } + return StorageStat_Renter{} +} + +func (*StorageStat) XXX_MessageName() string { + return "score.StorageStat" +} + +type StorageStat_HostStats struct { + Uptime float32 `protobuf:"fixed32,1,opt,name=uptime,proto3" json:"uptime" pg:"uptime"` + Score float32 `protobuf:"fixed32,2,opt,name=score,proto3" json:"score" pg:"score"` + UptimeScore float32 `protobuf:"fixed32,3,opt,name=uptime_score,json=uptimeScore,proto3" json:"uptime_score" pg:"uptime_score"` + AgeScore float32 `protobuf:"fixed32,4,opt,name=age_score,json=ageScore,proto3" json:"age_score" pg:"age_score"` + VersionScore float32 `protobuf:"fixed32,5,opt,name=version_score,json=versionScore,proto3" json:"version_score" pg:"version_score"` + SpeedScore float32 `protobuf:"fixed32,6,opt,name=speed_score,json=speedScore,proto3" json:"speed_score" pg:"speed_score"` + UploadSpeedScore float32 `protobuf:"fixed32,7,opt,name=upload_speed_score,json=uploadSpeedScore,proto3" json:"upload_speed_score" pg:"upload_speed_score"` + DownloadSpeedScore float32 `protobuf:"fixed32,8,opt,name=download_speed_score,json=downloadSpeedScore,proto3" json:"download_speed_score" pg:"download_speed_score"` + UptimeWeight float32 `protobuf:"fixed32,9,opt,name=uptime_weight,json=uptimeWeight,proto3" json:"uptime_weight" pg:"uptime_weight"` + AgeWeight float32 `protobuf:"fixed32,10,opt,name=age_weight,json=ageWeight,proto3" json:"age_weight" pg:"age_weight"` + VersionWeight float32 `protobuf:"fixed32,11,opt,name=version_weight,json=versionWeight,proto3" json:"version_weight" pg:"version_weight"` + SpeedWeight float32 `protobuf:"fixed32,12,opt,name=speed_weight,json=speedWeight,proto3" json:"speed_weight" pg:"speed_weight"` + UploadSpeedWeight float32 `protobuf:"fixed32,13,opt,name=upload_speed_weight,json=uploadSpeedWeight,proto3" json:"upload_speed_weight" pg:"upload_speed_weight"` + DownloadSpeedWeight float32 `protobuf:"fixed32,14,opt,name=download_speed_weight,json=downloadSpeedWeight,proto3" json:"download_speed_weight" pg:"download_speed_weight"` + LastUpdated time.Time `protobuf:"bytes,15,opt,name=last_updated,json=lastUpdated,proto3,stdtime" json:"last_updated" pg:"last_updated"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *StorageStat_HostStats) Reset() { *m = StorageStat_HostStats{} } +func (m *StorageStat_HostStats) String() string { return proto.CompactTextString(m) } +func (*StorageStat_HostStats) ProtoMessage() {} +func (*StorageStat_HostStats) Descriptor() ([]byte, []int) { + return fileDescriptor_649f1c1133130df2, []int{12, 0} +} +func (m *StorageStat_HostStats) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StorageStat_HostStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StorageStat_HostStats.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *StorageStat_HostStats) XXX_Merge(src proto.Message) { + xxx_messageInfo_StorageStat_HostStats.Merge(m, src) +} +func (m *StorageStat_HostStats) XXX_Size() int { + return m.Size() +} +func (m *StorageStat_HostStats) XXX_DiscardUnknown() { + xxx_messageInfo_StorageStat_HostStats.DiscardUnknown(m) +} + +var xxx_messageInfo_StorageStat_HostStats proto.InternalMessageInfo + +func (m *StorageStat_HostStats) GetUptime() float32 { + if m != nil { + return m.Uptime + } + return 0 +} + +func (m *StorageStat_HostStats) GetScore() float32 { + if m != nil { + return m.Score + } + return 0 +} + +func (m *StorageStat_HostStats) GetUptimeScore() float32 { + if m != nil { + return m.UptimeScore + } + return 0 +} + +func (m *StorageStat_HostStats) GetAgeScore() float32 { + if m != nil { + return m.AgeScore + } + return 0 +} + +func (m *StorageStat_HostStats) GetVersionScore() float32 { + if m != nil { + return m.VersionScore + } + return 0 +} + +func (m *StorageStat_HostStats) GetSpeedScore() float32 { + if m != nil { + return m.SpeedScore + } + return 0 +} + +func (m *StorageStat_HostStats) GetUploadSpeedScore() float32 { + if m != nil { + return m.UploadSpeedScore + } + return 0 +} + +func (m *StorageStat_HostStats) GetDownloadSpeedScore() float32 { + if m != nil { + return m.DownloadSpeedScore + } + return 0 +} + +func (m *StorageStat_HostStats) GetUptimeWeight() float32 { + if m != nil { + return m.UptimeWeight + } + return 0 +} + +func (m *StorageStat_HostStats) GetAgeWeight() float32 { + if m != nil { + return m.AgeWeight + } + return 0 +} + +func (m *StorageStat_HostStats) GetVersionWeight() float32 { + if m != nil { + return m.VersionWeight + } + return 0 +} + +func (m *StorageStat_HostStats) GetSpeedWeight() float32 { + if m != nil { + return m.SpeedWeight + } + return 0 +} + +func (m *StorageStat_HostStats) GetUploadSpeedWeight() float32 { + if m != nil { + return m.UploadSpeedWeight + } + return 0 +} + +func (m *StorageStat_HostStats) GetDownloadSpeedWeight() float32 { + if m != nil { + return m.DownloadSpeedWeight + } + return 0 +} + +func (m *StorageStat_HostStats) GetLastUpdated() time.Time { + if m != nil { + return m.LastUpdated + } + return time.Time{} +} + +func (*StorageStat_HostStats) XXX_MessageName() string { + return "score.StorageStat.HostStats" +} + +type StorageStat_Host struct { + Online bool `protobuf:"varint,1,opt,name=online,proto3" json:"online" pg:"online"` + StorageUsed int64 `protobuf:"varint,2,opt,name=storage_used,json=storageUsed,proto3" json:"storage_used" pg:"storage_used"` + StorageCap int64 `protobuf:"varint,3,opt,name=storage_cap,json=storageCap,proto3" json:"storage_cap" pg:"storage_cap"` + StorageDiskTotal int64 `protobuf:"varint,4,opt,name=storage_disk_total,json=storageDiskTotal,proto3" json:"storage_disk_total" pg:"storage_disk_total"` + StorageDiskAvailable int64 `protobuf:"varint,5,opt,name=storage_disk_available,json=storageDiskAvailable,proto3" json:"storage_disk_available" pg:"storage_disk_available"` + StorageStat_HostStats `protobuf:"bytes,6,opt,name=stats,proto3,embedded=stats" json:"" pg:""` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *StorageStat_Host) Reset() { *m = StorageStat_Host{} } +func (m *StorageStat_Host) String() string { return proto.CompactTextString(m) } +func (*StorageStat_Host) ProtoMessage() {} +func (*StorageStat_Host) Descriptor() ([]byte, []int) { + return fileDescriptor_649f1c1133130df2, []int{12, 1} +} +func (m *StorageStat_Host) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StorageStat_Host) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StorageStat_Host.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *StorageStat_Host) XXX_Merge(src proto.Message) { + xxx_messageInfo_StorageStat_Host.Merge(m, src) +} +func (m *StorageStat_Host) XXX_Size() int { + return m.Size() +} +func (m *StorageStat_Host) XXX_DiscardUnknown() { + xxx_messageInfo_StorageStat_Host.DiscardUnknown(m) +} + +var xxx_messageInfo_StorageStat_Host proto.InternalMessageInfo + +func (m *StorageStat_Host) GetOnline() bool { + if m != nil { + return m.Online + } + return false +} + +func (m *StorageStat_Host) GetStorageUsed() int64 { + if m != nil { + return m.StorageUsed + } + return 0 +} + +func (m *StorageStat_Host) GetStorageCap() int64 { + if m != nil { + return m.StorageCap + } + return 0 +} + +func (m *StorageStat_Host) GetStorageDiskTotal() int64 { + if m != nil { + return m.StorageDiskTotal + } + return 0 +} + +func (m *StorageStat_Host) GetStorageDiskAvailable() int64 { + if m != nil { + return m.StorageDiskAvailable + } + return 0 +} + +func (*StorageStat_Host) XXX_MessageName() string { + return "score.StorageStat.Host" +} + +type StorageStat_Renter struct { + Reserved string `protobuf:"bytes,1,opt,name=reserved,proto3" json:"reserved" pg:"reserved"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *StorageStat_Renter) Reset() { *m = StorageStat_Renter{} } +func (m *StorageStat_Renter) String() string { return proto.CompactTextString(m) } +func (*StorageStat_Renter) ProtoMessage() {} +func (*StorageStat_Renter) Descriptor() ([]byte, []int) { + return fileDescriptor_649f1c1133130df2, []int{12, 2} +} +func (m *StorageStat_Renter) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StorageStat_Renter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StorageStat_Renter.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *StorageStat_Renter) XXX_Merge(src proto.Message) { + xxx_messageInfo_StorageStat_Renter.Merge(m, src) +} +func (m *StorageStat_Renter) XXX_Size() int { + return m.Size() +} +func (m *StorageStat_Renter) XXX_DiscardUnknown() { + xxx_messageInfo_StorageStat_Renter.DiscardUnknown(m) +} + +var xxx_messageInfo_StorageStat_Renter proto.InternalMessageInfo + +func (m *StorageStat_Renter) GetReserved() string { + if m != nil { + return m.Reserved + } + return "" +} + +func (*StorageStat_Renter) XXX_MessageName() string { + return "score.StorageStat.Renter" +} + +type Node struct { + TableName string `protobuf:"bytes,1,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty" pg:"table_name" pg:"node_metrics,alias:t,discard_unknown_columns"` + NodeId string `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty" pg:"node_id"` + BtfsVersion string `protobuf:"bytes,3,opt,name=btfs_version,json=btfsVersion,proto3" json:"btfs_version,omitempty" pg:"btfs_version"` + UpTime uint64 `protobuf:"varint,4,opt,name=up_time,json=upTime,proto3" json:"up_time,omitempty" pg:"up_time"` + StorageUsed uint64 `protobuf:"varint,5,opt,name=storage_used,json=storageUsed,proto3" json:"storage_used,omitempty" pg:"storage_used"` + StorageVolumeCap uint64 `protobuf:"varint,6,opt,name=storage_volume_cap,json=storageVolumeCap,proto3" json:"storage_volume_cap,omitempty" pg:"storage_volume_cap"` + MemoryUsed uint64 `protobuf:"varint,7,opt,name=memory_used,json=memoryUsed,proto3" json:"memory_used,omitempty" pg:"memory_used"` + CpuUsed float64 `protobuf:"fixed64,8,opt,name=cpu_used,json=cpuUsed,proto3" json:"cpu_used,omitempty" pg:"cpu_used"` + Upload uint64 `protobuf:"varint,9,opt,name=upload,proto3" json:"upload,omitempty" pg:"upload"` + Download uint64 `protobuf:"varint,10,opt,name=download,proto3" json:"download,omitempty" pg:"download"` + TotalUpload uint64 `protobuf:"varint,11,opt,name=total_upload,json=totalUpload,proto3" json:"total_upload,omitempty" pg:"total_upload"` + TotalDownload uint64 `protobuf:"varint,12,opt,name=total_download,json=totalDownload,proto3" json:"total_download,omitempty" pg:"total_download"` + StoragePriceDeal uint64 `protobuf:"varint,13,opt,name=storage_price_deal,json=storagePriceDeal,proto3" json:"storage_price_deal,omitempty" pg:"storage_price_deal"` + BandwidthPriceDeal uint64 `protobuf:"varint,14,opt,name=bandwidth_price_deal,json=bandwidthPriceDeal,proto3" json:"bandwidth_price_deal,omitempty" pg:"bandwidth_price_deal"` + Node_Settings `protobuf:"bytes,15,opt,name=settings,proto3,embedded=settings" json:"settings" pg:"settings"` + Reputation float64 `protobuf:"fixed64,16,opt,name=reputation,proto3" json:"reputation,omitempty" pg:"reputation"` + BlocksUp uint64 `protobuf:"varint,17,opt,name=blocks_up,json=blocksUp,proto3" json:"blocks_up,omitempty" pg:"blocks_up"` + BlocksDown uint64 `protobuf:"varint,18,opt,name=blocks_down,json=blocksDown,proto3" json:"blocks_down,omitempty" pg:"blocks_down"` + OsType string `protobuf:"bytes,19,opt,name=os_type,json=osType,proto3" json:"os_type,omitempty" pg:"os_type"` + ArchType string `protobuf:"bytes,20,opt,name=arch_type,json=archType,proto3" json:"arch_type,omitempty" pg:"arch_type"` + CpuInfo string `protobuf:"bytes,21,opt,name=cpu_info,json=cpuInfo,proto3" json:"cpu_info,omitempty" pg:"cpu_info"` + PeersConnected uint64 `protobuf:"varint,23,opt,name=peers_connected,json=peersConnected,proto3" json:"peers_connected,omitempty" pg:"peers_connected"` + TimeCreated time.Time `protobuf:"bytes,24,opt,name=time_created,json=timeCreated,proto3,stdtime" json:"time_created" pg:"time_created"` + HVal string `protobuf:"bytes,25,opt,name=h_val,json=hVal,proto3" json:"h_val,omitempty" pg:"h_val"` + Node_Geo `protobuf:"bytes,26,opt,name=geo,proto3,embedded=geo" json:"geo" pg:"geo"` + Node_ExperimentalFlags `protobuf:"bytes,27,opt,name=flg,proto3,embedded=flg" json:"flg" pg:"flg"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *Node) Reset() { *m = Node{} } +func (m *Node) String() string { return proto.CompactTextString(m) } +func (*Node) ProtoMessage() {} +func (*Node) Descriptor() ([]byte, []int) { + return fileDescriptor_649f1c1133130df2, []int{13} +} +func (m *Node) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Node.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Node) XXX_Merge(src proto.Message) { + xxx_messageInfo_Node.Merge(m, src) +} +func (m *Node) XXX_Size() int { + return m.Size() +} +func (m *Node) XXX_DiscardUnknown() { + xxx_messageInfo_Node.DiscardUnknown(m) +} + +var xxx_messageInfo_Node proto.InternalMessageInfo + +func (m *Node) GetTableName() string { + if m != nil { + return m.TableName + } + return "" +} + +func (m *Node) GetNodeId() string { + if m != nil { + return m.NodeId + } + return "" +} + +func (m *Node) GetBtfsVersion() string { + if m != nil { + return m.BtfsVersion + } + return "" +} + +func (m *Node) GetUpTime() uint64 { + if m != nil { + return m.UpTime + } + return 0 +} + +func (m *Node) GetStorageUsed() uint64 { + if m != nil { + return m.StorageUsed + } + return 0 +} + +func (m *Node) GetStorageVolumeCap() uint64 { + if m != nil { + return m.StorageVolumeCap + } + return 0 +} + +func (m *Node) GetMemoryUsed() uint64 { + if m != nil { + return m.MemoryUsed + } + return 0 +} + +func (m *Node) GetCpuUsed() float64 { + if m != nil { + return m.CpuUsed + } + return 0 +} + +func (m *Node) GetUpload() uint64 { + if m != nil { + return m.Upload + } + return 0 +} + +func (m *Node) GetDownload() uint64 { + if m != nil { + return m.Download + } + return 0 +} + +func (m *Node) GetTotalUpload() uint64 { + if m != nil { + return m.TotalUpload + } + return 0 +} + +func (m *Node) GetTotalDownload() uint64 { + if m != nil { + return m.TotalDownload + } + return 0 +} + +func (m *Node) GetStoragePriceDeal() uint64 { + if m != nil { + return m.StoragePriceDeal + } + return 0 +} + +func (m *Node) GetBandwidthPriceDeal() uint64 { + if m != nil { + return m.BandwidthPriceDeal + } + return 0 +} + +func (m *Node) GetReputation() float64 { + if m != nil { + return m.Reputation + } + return 0 +} + +func (m *Node) GetBlocksUp() uint64 { + if m != nil { + return m.BlocksUp + } + return 0 +} + +func (m *Node) GetBlocksDown() uint64 { + if m != nil { + return m.BlocksDown + } + return 0 +} + +func (m *Node) GetOsType() string { + if m != nil { + return m.OsType + } + return "" +} + +func (m *Node) GetArchType() string { + if m != nil { + return m.ArchType + } + return "" +} + +func (m *Node) GetCpuInfo() string { + if m != nil { + return m.CpuInfo + } + return "" +} + +func (m *Node) GetPeersConnected() uint64 { + if m != nil { + return m.PeersConnected + } + return 0 +} + +func (m *Node) GetTimeCreated() time.Time { + if m != nil { + return m.TimeCreated + } + return time.Time{} +} + +func (m *Node) GetHVal() string { + if m != nil { + return m.HVal + } + return "" +} + +func (*Node) XXX_MessageName() string { + return "score.Node" +} + +type Node_Settings struct { + StoragePriceAsk uint64 `protobuf:"varint,1,opt,name=storage_price_ask,json=storagePriceAsk,proto3" json:"storage_price_ask,omitempty" pg:"storage_price_ask"` + BandwidthPriceAsk uint64 `protobuf:"varint,2,opt,name=bandwidth_price_ask,json=bandwidthPriceAsk,proto3" json:"bandwidth_price_ask,omitempty" pg:"bandwidth_price_ask"` + StorageTimeMin uint64 `protobuf:"varint,3,opt,name=storage_time_min,json=storageTimeMin,proto3" json:"storage_time_min,omitempty" pg:"storage_time_min"` + BandwidthLimit float64 `protobuf:"fixed64,4,opt,name=bandwidth_limit,json=bandwidthLimit,proto3" json:"bandwidth_limit,omitempty" pg:"bandwidth_limit"` + CollateralStake uint64 `protobuf:"varint,5,opt,name=collateral_stake,json=collateralStake,proto3" json:"collateral_stake,omitempty" pg:"collateral_stake"` + StoragePriceDefault uint64 `protobuf:"varint,6,opt,name=storage_price_default,json=storagePriceDefault,proto3" json:"storage_price_default,omitempty" pg:"storage_price_default"` + CustomizedPricing bool `protobuf:"varint,7,opt,name=customized_pricing,json=customizedPricing,proto3" json:"customized_pricing,omitempty" pg:"customized_pricing"` + Roles []NodeRole `protobuf:"varint,8,rep,packed,name=roles,proto3,enum=score.NodeRole" json:"roles,omitempty" pg:"roles,array"` + RepairPriceDefault uint64 `protobuf:"varint,9,opt,name=repair_price_default,json=repairPriceDefault,proto3" json:"repair_price_default,omitempty" pg:"repair_price_default"` + RepairPriceCustomized uint64 `protobuf:"varint,10,opt,name=repair_price_customized,json=repairPriceCustomized,proto3" json:"repair_price_customized,omitempty" pg:"repair_price_customized"` + RepairCustomizedPricing bool `protobuf:"varint,11,opt,name=repair_customized_pricing,json=repairCustomizedPricing,proto3" json:"repair_customized_pricing,omitempty" pg:"repair_customized_pricing"` + ChallengePriceDefault uint64 `protobuf:"varint,12,opt,name=challenge_price_default,json=challengePriceDefault,proto3" json:"challenge_price_default,omitempty" pg:"challenge_price_default"` + ChallengePriceCustomized uint64 `protobuf:"varint,13,opt,name=challenge_price_customized,json=challengePriceCustomized,proto3" json:"challenge_price_customized,omitempty" pg:"challenge_price_customized"` + ChallengeCustomizedPricing bool `protobuf:"varint,14,opt,name=challenge_customized_pricing,json=challengeCustomizedPricing,proto3" json:"challenge_customized_pricing,omitempty" pg:"challenge_customized_pricing"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *Node_Settings) Reset() { *m = Node_Settings{} } +func (m *Node_Settings) String() string { return proto.CompactTextString(m) } +func (*Node_Settings) ProtoMessage() {} +func (*Node_Settings) Descriptor() ([]byte, []int) { + return fileDescriptor_649f1c1133130df2, []int{13, 0} +} +func (m *Node_Settings) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Node_Settings) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Node_Settings.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Node_Settings) XXX_Merge(src proto.Message) { + xxx_messageInfo_Node_Settings.Merge(m, src) +} +func (m *Node_Settings) XXX_Size() int { + return m.Size() +} +func (m *Node_Settings) XXX_DiscardUnknown() { + xxx_messageInfo_Node_Settings.DiscardUnknown(m) +} + +var xxx_messageInfo_Node_Settings proto.InternalMessageInfo + +func (m *Node_Settings) GetStoragePriceAsk() uint64 { + if m != nil { + return m.StoragePriceAsk + } + return 0 +} + +func (m *Node_Settings) GetBandwidthPriceAsk() uint64 { + if m != nil { + return m.BandwidthPriceAsk + } + return 0 +} + +func (m *Node_Settings) GetStorageTimeMin() uint64 { + if m != nil { + return m.StorageTimeMin + } + return 0 +} + +func (m *Node_Settings) GetBandwidthLimit() float64 { + if m != nil { + return m.BandwidthLimit + } + return 0 +} + +func (m *Node_Settings) GetCollateralStake() uint64 { + if m != nil { + return m.CollateralStake + } + return 0 +} + +func (m *Node_Settings) GetStoragePriceDefault() uint64 { + if m != nil { + return m.StoragePriceDefault + } + return 0 +} + +func (m *Node_Settings) GetCustomizedPricing() bool { + if m != nil { + return m.CustomizedPricing + } + return false +} + +func (m *Node_Settings) GetRoles() []NodeRole { + if m != nil { + return m.Roles + } + return nil +} + +func (m *Node_Settings) GetRepairPriceDefault() uint64 { + if m != nil { + return m.RepairPriceDefault + } + return 0 +} + +func (m *Node_Settings) GetRepairPriceCustomized() uint64 { + if m != nil { + return m.RepairPriceCustomized + } + return 0 +} + +func (m *Node_Settings) GetRepairCustomizedPricing() bool { + if m != nil { + return m.RepairCustomizedPricing + } + return false +} + +func (m *Node_Settings) GetChallengePriceDefault() uint64 { + if m != nil { + return m.ChallengePriceDefault + } + return 0 +} + +func (m *Node_Settings) GetChallengePriceCustomized() uint64 { + if m != nil { + return m.ChallengePriceCustomized + } + return 0 +} + +func (m *Node_Settings) GetChallengeCustomizedPricing() bool { + if m != nil { + return m.ChallengeCustomizedPricing + } + return false +} + +func (*Node_Settings) XXX_MessageName() string { + return "score.Node.Settings" +} + +type Node_Geo struct { + CountryShort string `protobuf:"bytes,1,opt,name=country_short,json=countryShort,proto3" json:"country_short,omitempty" pg:"country_short"` + Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty" pg:"region"` + Latitude float32 `protobuf:"fixed32,3,opt,name=latitude,proto3" json:"latitude,omitempty" pg:"latitude"` + Longitude float32 `protobuf:"fixed32,4,opt,name=longitude,proto3" json:"longitude,omitempty" pg:"longitude"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *Node_Geo) Reset() { *m = Node_Geo{} } +func (m *Node_Geo) String() string { return proto.CompactTextString(m) } +func (*Node_Geo) ProtoMessage() {} +func (*Node_Geo) Descriptor() ([]byte, []int) { + return fileDescriptor_649f1c1133130df2, []int{13, 1} +} +func (m *Node_Geo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Node_Geo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Node_Geo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Node_Geo) XXX_Merge(src proto.Message) { + xxx_messageInfo_Node_Geo.Merge(m, src) +} +func (m *Node_Geo) XXX_Size() int { + return m.Size() +} +func (m *Node_Geo) XXX_DiscardUnknown() { + xxx_messageInfo_Node_Geo.DiscardUnknown(m) +} + +var xxx_messageInfo_Node_Geo proto.InternalMessageInfo + +func (m *Node_Geo) GetCountryShort() string { + if m != nil { + return m.CountryShort + } + return "" +} + +func (m *Node_Geo) GetRegion() string { + if m != nil { + return m.Region + } + return "" +} + +func (m *Node_Geo) GetLatitude() float32 { + if m != nil { + return m.Latitude + } + return 0 +} + +func (m *Node_Geo) GetLongitude() float32 { + if m != nil { + return m.Longitude + } + return 0 +} + +func (*Node_Geo) XXX_MessageName() string { + return "score.Node.Geo" +} + +type Node_ExperimentalFlags struct { + Analytics bool `protobuf:"varint,1,opt,name=analytics,proto3" json:"analytics,omitempty" pg:"analytics"` + FilestoreEnabled bool `protobuf:"varint,2,opt,name=filestore_enabled,json=filestoreEnabled,proto3" json:"filestore_enabled,omitempty" pg:"filestore_enabled"` + HostsSyncEnabled bool `protobuf:"varint,3,opt,name=hosts_sync_enabled,json=hostsSyncEnabled,proto3" json:"hosts_sync_enabled,omitempty" pg:"hosts_sync_enabled"` + HostsSyncMode string `protobuf:"bytes,4,opt,name=hosts_sync_mode,json=hostsSyncMode,proto3" json:"hosts_sync_mode,omitempty" pg:"hosts_sync_mode"` + Libp2PStreamMounting bool `protobuf:"varint,5,opt,name=libp2p_stream_mounting,json=libp2pStreamMounting,proto3" json:"libp2p_stream_mounting,omitempty" pg:"libp2p_stream_mounting"` + P2PHttpProxy bool `protobuf:"varint,6,opt,name=p2p_http_proxy,json=p2pHttpProxy,proto3" json:"p2p_http_proxy,omitempty" pg:"p2p_http_proxy"` + PreferTls bool `protobuf:"varint,7,opt,name=prefer_tls,json=preferTls,proto3" json:"prefer_tls,omitempty" pg:"prefer_tls"` + Quic bool `protobuf:"varint,8,opt,name=quic,proto3" json:"quic,omitempty" pg:"quic"` + RemoveOnUnpin bool `protobuf:"varint,9,opt,name=remove_on_unpin,json=removeOnUnpin,proto3" json:"remove_on_unpin,omitempty" pg:"remove_on_unpin"` + ShardingEnabled bool `protobuf:"varint,10,opt,name=sharding_enabled,json=shardingEnabled,proto3" json:"sharding_enabled,omitempty" pg:"sharding_enabled"` + StorageClientEnabled bool `protobuf:"varint,11,opt,name=storage_client_enabled,json=storageClientEnabled,proto3" json:"storage_client_enabled,omitempty" pg:"storage_client_enabled"` + StorageHostEnabled bool `protobuf:"varint,12,opt,name=storage_host_enabled,json=storageHostEnabled,proto3" json:"storage_host_enabled,omitempty" pg:"storage_host_enabled"` + StrategicProviding bool `protobuf:"varint,13,opt,name=strategic_providing,json=strategicProviding,proto3" json:"strategic_providing,omitempty" pg:"strategic_providing"` + UrlStoreEnabled bool `protobuf:"varint,14,opt,name=url_store_enabled,json=urlStoreEnabled,proto3" json:"url_store_enabled,omitempty" pg:"url_store_enabled"` + DisableAutoUpdate bool `protobuf:"varint,15,opt,name=disable_auto_update,json=disableAutoUpdate,proto3" json:"disable_auto_update,omitempty" pg:"disable_auto_update"` + GraphsyncEnabled bool `protobuf:"varint,16,opt,name=graphsync_enabled,json=graphsyncEnabled,proto3" json:"graphsync_enabled,omitempty" pg:"graphsync_enabled"` + RepairHostEnabled bool `protobuf:"varint,17,opt,name=repair_host_enabled,json=repairHostEnabled,proto3" json:"repair_host_enabled,omitempty" pg:"repair_host_enabled"` + ChallengeHostEnabled bool `protobuf:"varint,18,opt,name=challenge_host_enabled,json=challengeHostEnabled,proto3" json:"challenge_host_enabled,omitempty" pg:"challenge_host_enabled"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *Node_ExperimentalFlags) Reset() { *m = Node_ExperimentalFlags{} } +func (m *Node_ExperimentalFlags) String() string { return proto.CompactTextString(m) } +func (*Node_ExperimentalFlags) ProtoMessage() {} +func (*Node_ExperimentalFlags) Descriptor() ([]byte, []int) { + return fileDescriptor_649f1c1133130df2, []int{13, 2} +} +func (m *Node_ExperimentalFlags) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Node_ExperimentalFlags) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Node_ExperimentalFlags.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Node_ExperimentalFlags) XXX_Merge(src proto.Message) { + xxx_messageInfo_Node_ExperimentalFlags.Merge(m, src) +} +func (m *Node_ExperimentalFlags) XXX_Size() int { + return m.Size() +} +func (m *Node_ExperimentalFlags) XXX_DiscardUnknown() { + xxx_messageInfo_Node_ExperimentalFlags.DiscardUnknown(m) +} + +var xxx_messageInfo_Node_ExperimentalFlags proto.InternalMessageInfo + +func (m *Node_ExperimentalFlags) GetAnalytics() bool { + if m != nil { + return m.Analytics + } + return false +} + +func (m *Node_ExperimentalFlags) GetFilestoreEnabled() bool { + if m != nil { + return m.FilestoreEnabled + } + return false +} + +func (m *Node_ExperimentalFlags) GetHostsSyncEnabled() bool { + if m != nil { + return m.HostsSyncEnabled + } + return false +} + +func (m *Node_ExperimentalFlags) GetHostsSyncMode() string { + if m != nil { + return m.HostsSyncMode + } + return "" +} + +func (m *Node_ExperimentalFlags) GetLibp2PStreamMounting() bool { + if m != nil { + return m.Libp2PStreamMounting + } + return false +} + +func (m *Node_ExperimentalFlags) GetP2PHttpProxy() bool { + if m != nil { + return m.P2PHttpProxy + } + return false +} + +func (m *Node_ExperimentalFlags) GetPreferTls() bool { + if m != nil { + return m.PreferTls + } + return false +} + +func (m *Node_ExperimentalFlags) GetQuic() bool { + if m != nil { + return m.Quic + } + return false +} + +func (m *Node_ExperimentalFlags) GetRemoveOnUnpin() bool { + if m != nil { + return m.RemoveOnUnpin + } + return false +} + +func (m *Node_ExperimentalFlags) GetShardingEnabled() bool { + if m != nil { + return m.ShardingEnabled + } + return false +} + +func (m *Node_ExperimentalFlags) GetStorageClientEnabled() bool { + if m != nil { + return m.StorageClientEnabled + } + return false +} + +func (m *Node_ExperimentalFlags) GetStorageHostEnabled() bool { + if m != nil { + return m.StorageHostEnabled + } + return false +} + +func (m *Node_ExperimentalFlags) GetStrategicProviding() bool { + if m != nil { + return m.StrategicProviding + } + return false +} + +func (m *Node_ExperimentalFlags) GetUrlStoreEnabled() bool { + if m != nil { + return m.UrlStoreEnabled + } + return false +} + +func (m *Node_ExperimentalFlags) GetDisableAutoUpdate() bool { + if m != nil { + return m.DisableAutoUpdate + } + return false +} + +func (m *Node_ExperimentalFlags) GetGraphsyncEnabled() bool { + if m != nil { + return m.GraphsyncEnabled + } + return false +} + +func (m *Node_ExperimentalFlags) GetRepairHostEnabled() bool { + if m != nil { + return m.RepairHostEnabled + } + return false +} + +func (m *Node_ExperimentalFlags) GetChallengeHostEnabled() bool { + if m != nil { + return m.ChallengeHostEnabled + } + return false +} + +func (*Node_ExperimentalFlags) XXX_MessageName() string { + return "score.Node.ExperimentalFlags" +} +func init() { + proto.RegisterEnum("score.ResponseCode", ResponseCode_name, ResponseCode_value) + golang_proto.RegisterEnum("score.ResponseCode", ResponseCode_name, ResponseCode_value) + proto.RegisterEnum("score.NodeRole", NodeRole_name, NodeRole_value) + golang_proto.RegisterEnum("score.NodeRole", NodeRole_name, NodeRole_value) + proto.RegisterEnum("score.HostsReq_Mode", HostsReq_Mode_name, HostsReq_Mode_value) + golang_proto.RegisterEnum("score.HostsReq_Mode", HostsReq_Mode_name, HostsReq_Mode_value) + proto.RegisterType((*NodesReq)(nil), "score.NodesReq") + golang_proto.RegisterType((*NodesReq)(nil), "score.NodesReq") + proto.RegisterType((*SettingsReq)(nil), "score.SettingsReq") + golang_proto.RegisterType((*SettingsReq)(nil), "score.SettingsReq") + proto.RegisterType((*SettingsResp)(nil), "score.SettingsResp") + golang_proto.RegisterType((*SettingsResp)(nil), "score.SettingsResp") + proto.RegisterType((*SettingsData)(nil), "score.SettingsData") + golang_proto.RegisterType((*SettingsData)(nil), "score.SettingsData") + proto.RegisterType((*HostsReq)(nil), "score.HostsReq") + golang_proto.RegisterType((*HostsReq)(nil), "score.HostsReq") + proto.RegisterType((*RolesHostsReq)(nil), "score.RolesHostsReq") + golang_proto.RegisterType((*RolesHostsReq)(nil), "score.RolesHostsReq") + proto.RegisterType((*HostsResp)(nil), "score.HostsResp") + golang_proto.RegisterType((*HostsResp)(nil), "score.HostsResp") + proto.RegisterType((*StatsReq)(nil), "score.StatsReq") + golang_proto.RegisterType((*StatsReq)(nil), "score.StatsReq") + proto.RegisterType((*StatsResp)(nil), "score.StatsResp") + golang_proto.RegisterType((*StatsResp)(nil), "score.StatsResp") + proto.RegisterType((*Host)(nil), "score.Host") + golang_proto.RegisterType((*Host)(nil), "score.Host") + proto.RegisterType((*HostsData)(nil), "score.HostsData") + golang_proto.RegisterType((*HostsData)(nil), "score.HostsData") + proto.RegisterType((*Location)(nil), "score.Location") + golang_proto.RegisterType((*Location)(nil), "score.Location") + proto.RegisterType((*StorageStat)(nil), "score.StorageStat") + golang_proto.RegisterType((*StorageStat)(nil), "score.StorageStat") + proto.RegisterType((*StorageStat_HostStats)(nil), "score.StorageStat.HostStats") + golang_proto.RegisterType((*StorageStat_HostStats)(nil), "score.StorageStat.HostStats") + proto.RegisterType((*StorageStat_Host)(nil), "score.StorageStat.Host") + golang_proto.RegisterType((*StorageStat_Host)(nil), "score.StorageStat.Host") + proto.RegisterType((*StorageStat_Renter)(nil), "score.StorageStat.Renter") + golang_proto.RegisterType((*StorageStat_Renter)(nil), "score.StorageStat.Renter") + proto.RegisterType((*Node)(nil), "score.Node") + golang_proto.RegisterType((*Node)(nil), "score.Node") + proto.RegisterType((*Node_Settings)(nil), "score.Node.Settings") + golang_proto.RegisterType((*Node_Settings)(nil), "score.Node.Settings") + proto.RegisterType((*Node_Geo)(nil), "score.Node.Geo") + golang_proto.RegisterType((*Node_Geo)(nil), "score.Node.Geo") + proto.RegisterType((*Node_ExperimentalFlags)(nil), "score.Node.ExperimentalFlags") + golang_proto.RegisterType((*Node_ExperimentalFlags)(nil), "score.Node.ExperimentalFlags") +} + +func init() { proto.RegisterFile("protos/score/score.proto", fileDescriptor_649f1c1133130df2) } +func init() { golang_proto.RegisterFile("protos/score/score.proto", fileDescriptor_649f1c1133130df2) } + +var fileDescriptor_649f1c1133130df2 = []byte{ + // 2862 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0xc1, 0x6f, 0x1b, 0xc7, + 0xd5, 0xf7, 0x8a, 0xa4, 0xb4, 0x7c, 0xa4, 0x44, 0x6a, 0x24, 0xcb, 0x34, 0xed, 0x48, 0x36, 0xfd, + 0x25, 0xf1, 0xe7, 0x38, 0x74, 0xa2, 0xa6, 0x41, 0x63, 0xf8, 0x10, 0x89, 0xda, 0xc8, 0x42, 0x6c, + 0x49, 0x1d, 0x52, 0x0e, 0xd0, 0xcb, 0x62, 0xb4, 0x1c, 0x91, 0x0b, 0x2d, 0x77, 0xd7, 0xbb, 0xb3, + 0x72, 0x14, 0xf4, 0x0f, 0xe8, 0xa9, 0xc8, 0xb1, 0xa7, 0xa2, 0xe8, 0xb1, 0xf7, 0x9e, 0x5b, 0xa0, + 0x97, 0x1c, 0x73, 0x6a, 0x4f, 0x4d, 0x82, 0xe4, 0x52, 0xf4, 0x18, 0xa0, 0xf7, 0x62, 0xde, 0xcc, + 0x2e, 0x97, 0x14, 0x8d, 0x58, 0x41, 0x0e, 0xbd, 0x08, 0xdc, 0xf7, 0x7e, 0xef, 0xe9, 0xbd, 0x99, + 0x79, 0xef, 0xfd, 0x76, 0x16, 0x1a, 0x61, 0x14, 0x88, 0x20, 0x7e, 0x10, 0x3b, 0x41, 0xc4, 0xd5, + 0xdf, 0x36, 0x8a, 0x48, 0x09, 0x1f, 0x9a, 0xef, 0x0c, 0x5c, 0x31, 0x4c, 0x8e, 0xdb, 0x4e, 0x30, + 0x7a, 0x20, 0xa2, 0xc0, 0x7f, 0x3b, 0x89, 0x1f, 0x20, 0xe0, 0x38, 0x39, 0x79, 0x30, 0x08, 0x06, + 0x01, 0x3e, 0xe0, 0x2f, 0x65, 0xd8, 0xdc, 0x18, 0x04, 0xc1, 0xc0, 0xe3, 0x63, 0x94, 0x70, 0x47, + 0x3c, 0x16, 0x6c, 0x14, 0x2a, 0x40, 0xab, 0x0f, 0xe6, 0x7e, 0xd0, 0xe7, 0x31, 0xe5, 0xcf, 0xc9, + 0x35, 0x58, 0xf0, 0x83, 0x3e, 0xb7, 0xdd, 0x7e, 0xc3, 0xb8, 0x55, 0xb8, 0x5b, 0xa6, 0xf3, 0xf2, + 0x71, 0xaf, 0x4f, 0x6e, 0x43, 0x35, 0xe2, 0xcf, 0x13, 0x1e, 0x0b, 0x1e, 0x49, 0xed, 0xdc, 0x2d, + 0xe3, 0x6e, 0x99, 0x56, 0x32, 0xd9, 0x5e, 0x9f, 0xdc, 0x84, 0x72, 0xec, 0x0e, 0x7c, 0x26, 0x92, + 0x88, 0x37, 0x0a, 0xb7, 0x8c, 0xbb, 0x55, 0x3a, 0x16, 0xb4, 0x1e, 0x42, 0xa5, 0xcb, 0x85, 0x70, + 0xfd, 0x01, 0xfe, 0xa3, 0x25, 0x98, 0xc3, 0xff, 0x21, 0xbd, 0xcc, 0xb9, 0x7d, 0x72, 0x03, 0xca, + 0x11, 0x8f, 0x43, 0x3b, 0x76, 0x3f, 0xe3, 0xe8, 0xbc, 0x44, 0x4d, 0x29, 0xe8, 0xba, 0x9f, 0xf1, + 0xd6, 0xdf, 0x0d, 0xa8, 0x8e, 0x8d, 0xe3, 0x90, 0xbc, 0x09, 0x45, 0x27, 0xe8, 0x73, 0xb4, 0x5f, + 0xda, 0x5c, 0x69, 0xab, 0x85, 0x92, 0xaa, 0xc0, 0x8f, 0x79, 0x27, 0xe8, 0x73, 0x8a, 0x00, 0xd2, + 0x80, 0x85, 0x11, 0x8f, 0x63, 0x36, 0xe0, 0x3a, 0xe2, 0xf4, 0x91, 0xec, 0xc1, 0x62, 0xa4, 0xf1, + 0xb6, 0x5c, 0x11, 0x8c, 0xb8, 0xb2, 0xd9, 0x6c, 0xab, 0xe5, 0x6a, 0xa7, 0xcb, 0xd5, 0xee, 0xa5, + 0xcb, 0xb5, 0x6d, 0x7e, 0xf1, 0xd5, 0xc6, 0x95, 0xcf, 0xbf, 0xde, 0x30, 0x68, 0x35, 0x35, 0x95, + 0x4a, 0xf2, 0x0b, 0x58, 0x8c, 0x75, 0x74, 0x76, 0x9f, 0x09, 0xd6, 0x28, 0xa2, 0xab, 0x34, 0xac, + 0x34, 0xf2, 0x1d, 0x26, 0x18, 0xad, 0xc6, 0xb9, 0xa7, 0xd6, 0xbf, 0x72, 0x89, 0x49, 0x01, 0xb9, + 0x07, 0xcb, 0xb1, 0x08, 0x22, 0x36, 0xe0, 0x76, 0x18, 0xb9, 0x0e, 0xb7, 0x59, 0x7c, 0x8a, 0x59, + 0x1a, 0xb4, 0xa6, 0x15, 0x87, 0x52, 0xbe, 0x15, 0x9f, 0x92, 0x36, 0xac, 0x1c, 0x33, 0xbf, 0xff, + 0xc2, 0xed, 0x8b, 0x61, 0x0e, 0x3d, 0x87, 0xe8, 0xe5, 0x4c, 0x95, 0xe1, 0xef, 0x42, 0x3d, 0xf5, + 0x2d, 0x13, 0xb6, 0x47, 0xae, 0x8f, 0x49, 0x1b, 0x74, 0x49, 0xcb, 0x65, 0x36, 0x4f, 0x5d, 0x9f, + 0xbc, 0x09, 0xb5, 0xb1, 0x67, 0xcf, 0x1d, 0xb9, 0x02, 0x53, 0x32, 0xe8, 0x52, 0x26, 0x7e, 0x22, + 0xa5, 0xe4, 0xff, 0xa1, 0xee, 0x04, 0x9e, 0xc7, 0x04, 0x8f, 0x98, 0x67, 0xc7, 0x82, 0x9d, 0xf2, + 0x46, 0x49, 0x45, 0x3b, 0x96, 0x77, 0xa5, 0xb8, 0xf5, 0x37, 0x03, 0xcc, 0xc7, 0x41, 0x2c, 0x2e, + 0xbd, 0xfb, 0xe4, 0x2e, 0x14, 0x47, 0x72, 0xb3, 0x0b, 0xb8, 0xd9, 0xab, 0x7a, 0x55, 0x53, 0x5f, + 0xed, 0xa7, 0xb8, 0xdb, 0x23, 0xbd, 0xdb, 0x67, 0x3c, 0x8a, 0xdd, 0xc0, 0xc7, 0x78, 0xcb, 0x34, + 0x7d, 0x6c, 0x7d, 0x04, 0x45, 0x89, 0x23, 0x65, 0x28, 0x75, 0x3b, 0x07, 0xd4, 0xaa, 0x5f, 0x21, + 0x0b, 0x50, 0xd8, 0xb5, 0x0e, 0xea, 0x86, 0xfc, 0x41, 0xad, 0xc3, 0xfa, 0x9c, 0x54, 0x1e, 0xd2, + 0xbd, 0x8e, 0x55, 0x2f, 0x20, 0xee, 0xd0, 0xb2, 0x76, 0xea, 0x45, 0x52, 0x81, 0x85, 0x9e, 0xd5, + 0xed, 0xed, 0x5b, 0xbd, 0x7a, 0xa9, 0xc5, 0x60, 0x91, 0x06, 0x1e, 0x8f, 0x7f, 0x5c, 0x26, 0x77, + 0xa0, 0x18, 0x05, 0x5e, 0x9a, 0x49, 0x4d, 0x67, 0x22, 0x8b, 0x4f, 0x3a, 0xa5, 0xa8, 0x6c, 0x7d, + 0x6f, 0x40, 0x59, 0xbb, 0xff, 0x69, 0x4e, 0xfa, 0x1b, 0x50, 0x1a, 0x4a, 0x7f, 0xfa, 0x84, 0xd7, + 0xf3, 0x0b, 0x88, 0x67, 0x52, 0xa9, 0x27, 0x43, 0x2f, 0x4e, 0x85, 0x4e, 0xf4, 0x26, 0x94, 0xd0, + 0xb7, 0x5a, 0xee, 0x0b, 0x25, 0x34, 0xff, 0x63, 0x4b, 0xa8, 0xd5, 0x04, 0xb3, 0x2b, 0xd8, 0xcc, + 0x25, 0x6d, 0xfd, 0xc3, 0x80, 0xb2, 0x56, 0xfe, 0xcf, 0x95, 0xfe, 0x23, 0x28, 0xc5, 0x32, 0x34, + 0x5d, 0xf2, 0x37, 0xd3, 0x92, 0x57, 0xf5, 0x24, 0xa3, 0xc6, 0x75, 0xc6, 0xf0, 0x95, 0x93, 0x2f, + 0xbf, 0xda, 0x30, 0xa8, 0x32, 0x6a, 0xfd, 0xa5, 0x02, 0x45, 0xa9, 0x9e, 0x6c, 0xbb, 0x46, 0xae, + 0xed, 0x1e, 0x40, 0xdd, 0x89, 0x38, 0x13, 0x2a, 0x50, 0x8c, 0x05, 0xb3, 0x79, 0xd5, 0x68, 0x6b, + 0xca, 0x3a, 0x53, 0x49, 0x87, 0x49, 0xd8, 0x9f, 0x74, 0x78, 0x99, 0xf4, 0x6b, 0xca, 0x7a, 0xec, + 0x70, 0x0d, 0xe6, 0x23, 0x3e, 0x18, 0x97, 0x9c, 0x7e, 0x92, 0x03, 0xe3, 0x58, 0x9c, 0xc4, 0x76, + 0x5a, 0x90, 0xea, 0xe0, 0x54, 0xa4, 0xec, 0x99, 0x12, 0x91, 0x55, 0x50, 0x43, 0x0d, 0xcf, 0xcd, + 0x1c, 0x55, 0x0f, 0x64, 0x03, 0x2a, 0x43, 0xce, 0x22, 0x61, 0x1f, 0x73, 0xb9, 0xb0, 0x0b, 0xb7, + 0x8c, 0xbb, 0x45, 0x0a, 0x28, 0xda, 0x96, 0x12, 0xf9, 0x1f, 0x93, 0x10, 0xf7, 0xcd, 0x44, 0x3b, + 0xfd, 0x44, 0xea, 0x50, 0x90, 0x9b, 0x5d, 0x46, 0x03, 0xf9, 0x93, 0xac, 0x03, 0x44, 0x3c, 0x4c, + 0x04, 0x13, 0x32, 0x02, 0x40, 0x74, 0x4e, 0x42, 0x5e, 0x87, 0xa5, 0x24, 0xf4, 0x02, 0xd6, 0xb7, + 0xd9, 0x19, 0x97, 0x1b, 0xd6, 0xa8, 0x20, 0x66, 0x51, 0x49, 0xb7, 0x94, 0x50, 0xb6, 0x43, 0x0d, + 0x3b, 0x63, 0x91, 0xcb, 0x7c, 0x87, 0x37, 0xaa, 0x88, 0xd3, 0xd6, 0xcf, 0xb4, 0x54, 0xb6, 0xc3, + 0x7e, 0xf0, 0xc2, 0x9f, 0xf0, 0xb8, 0x88, 0xc8, 0x5a, 0x2a, 0x4f, 0x7d, 0xbe, 0x05, 0xcb, 0x19, + 0x34, 0xf3, 0xba, 0x84, 0xd8, 0xcc, 0x47, 0xe6, 0xf7, 0x5d, 0x30, 0xbd, 0xc0, 0x51, 0x59, 0xd4, + 0x70, 0xb3, 0xd2, 0xde, 0xf1, 0x44, 0x8b, 0xb7, 0x8b, 0x72, 0x87, 0x68, 0x06, 0x23, 0xf7, 0x81, + 0xa4, 0xcd, 0xfe, 0x2c, 0xf0, 0x92, 0x11, 0xb7, 0x1d, 0x16, 0x36, 0xea, 0xea, 0x1f, 0x68, 0xcd, + 0x33, 0x54, 0x74, 0x58, 0x28, 0x47, 0xc9, 0x14, 0xda, 0xe3, 0x27, 0xa2, 0xb1, 0x8c, 0xf0, 0xe5, + 0x09, 0xf8, 0x13, 0x7e, 0x22, 0x66, 0x8e, 0x12, 0x82, 0xeb, 0x3e, 0x3d, 0x4a, 0x66, 0x0e, 0xb4, + 0x15, 0x84, 0x5e, 0x18, 0x68, 0x17, 0xb0, 0x3c, 0x16, 0x8d, 0xd5, 0x8b, 0x58, 0x2b, 0x16, 0xb3, + 0x46, 0xd4, 0xd5, 0x99, 0x23, 0xea, 0x25, 0x53, 0x72, 0x0d, 0xdd, 0xce, 0x98, 0x92, 0x33, 0xf0, + 0x32, 0x8c, 0x6b, 0xb3, 0xf0, 0x32, 0x90, 0x59, 0x23, 0xb0, 0xa1, 0x62, 0x9e, 0x1a, 0x81, 0x32, + 0xe6, 0x1c, 0xd4, 0x0b, 0x62, 0xd1, 0xb8, 0xae, 0x16, 0x6d, 0x2c, 0x7e, 0x12, 0xa8, 0xe4, 0x72, + 0xc0, 0xe3, 0x24, 0xf2, 0x1b, 0xcd, 0x69, 0xe0, 0x76, 0x12, 0xf9, 0xe4, 0x0e, 0x2c, 0x3a, 0x41, + 0xe2, 0x8b, 0xe8, 0xdc, 0x8e, 0x87, 0x41, 0x24, 0x1a, 0x37, 0xb0, 0xca, 0xaa, 0x5a, 0xd8, 0x95, + 0x32, 0xf2, 0x01, 0x14, 0x4e, 0xbc, 0x41, 0xe3, 0x26, 0x1e, 0x9c, 0xd7, 0x72, 0x43, 0xa7, 0x6d, + 0x7d, 0x1a, 0xf2, 0xc8, 0x1d, 0x71, 0x5f, 0x30, 0xef, 0x23, 0x8f, 0x0d, 0xf2, 0x2d, 0x4a, 0xda, + 0x48, 0x4a, 0xd7, 0x77, 0x63, 0x27, 0x38, 0xe3, 0xd1, 0x79, 0xe3, 0x35, 0x3c, 0x0d, 0x63, 0x81, + 0x2c, 0x71, 0x55, 0x7a, 0xb6, 0x2a, 0xe3, 0x75, 0x04, 0x54, 0x94, 0xac, 0x8b, 0xc5, 0x7c, 0x03, + 0xca, 0x72, 0x3b, 0x95, 0x7e, 0x03, 0xf5, 0xa6, 0x6c, 0x8c, 0xa8, 0xbc, 0x03, 0x8b, 0xba, 0x3b, + 0x68, 0xc0, 0x2d, 0x04, 0x54, 0xb5, 0x50, 0x81, 0xee, 0x03, 0xd1, 0xc5, 0x17, 0x87, 0x9c, 0xf7, + 0x35, 0xf2, 0xb6, 0x3a, 0xc8, 0x4a, 0xd3, 0x95, 0x0a, 0x85, 0x7e, 0x07, 0x56, 0xb3, 0xb2, 0xca, + 0xe3, 0x5b, 0x88, 0x27, 0xa9, 0x2e, 0x67, 0xf1, 0x3e, 0x94, 0xe4, 0xd8, 0x8d, 0x1b, 0x77, 0x6e, + 0x15, 0x66, 0x0c, 0xe5, 0xed, 0xda, 0x9f, 0xbe, 0xde, 0xa8, 0x20, 0xe2, 0x3e, 0x8b, 0x22, 0x76, + 0x4e, 0x15, 0xfc, 0x61, 0xf1, 0x0f, 0x7f, 0xdc, 0x30, 0x5a, 0x6d, 0x3d, 0xab, 0x91, 0xbc, 0xdd, + 0x4e, 0x07, 0xad, 0xa4, 0xce, 0x95, 0xcd, 0x4a, 0x6e, 0xd0, 0xea, 0x19, 0xdb, 0x6a, 0x83, 0x99, + 0x96, 0xac, 0xec, 0x57, 0x1e, 0x13, 0x9a, 0xdd, 0xc9, 0x9f, 0x28, 0x09, 0x7c, 0xcd, 0xe0, 0xe4, + 0xcf, 0xd6, 0x9f, 0x4d, 0xa8, 0xe4, 0x86, 0x09, 0x79, 0x04, 0x20, 0x1d, 0xd9, 0x6a, 0xe8, 0x18, + 0xb8, 0xa5, 0xd7, 0x5e, 0x32, 0x74, 0x74, 0x4f, 0x28, 0x0f, 0xd3, 0x01, 0x44, 0xb6, 0x25, 0x89, + 0xf7, 0x25, 0x83, 0x57, 0xf6, 0x6a, 0x92, 0x5c, 0x9f, 0x61, 0x4f, 0x11, 0xa6, 0x3d, 0x54, 0x94, + 0x11, 0xfa, 0x68, 0x7e, 0x53, 0x54, 0x29, 0x2b, 0x8f, 0xe3, 0x5e, 0x6c, 0x4c, 0xf4, 0xe2, 0xac, + 0xb5, 0xcf, 0xe5, 0x5b, 0xfb, 0xf4, 0x81, 0x29, 0xfc, 0xc0, 0x81, 0x29, 0xfe, 0xd0, 0x81, 0x29, + 0xcd, 0x38, 0x30, 0x1b, 0x50, 0xc9, 0xef, 0xbc, 0x9a, 0x2d, 0x10, 0x8f, 0x77, 0x7c, 0xf6, 0x89, + 0x5a, 0xb8, 0xe4, 0x89, 0x32, 0x5f, 0x7a, 0xa2, 0xee, 0xc0, 0xa2, 0xce, 0xf2, 0x05, 0x77, 0x07, + 0x43, 0x81, 0x13, 0x69, 0x8e, 0xea, 0xd4, 0x3f, 0x41, 0x19, 0x79, 0x0d, 0x40, 0xe6, 0xa9, 0x11, + 0x6a, 0x34, 0xc9, 0xcc, 0xb5, 0xfa, 0x75, 0x58, 0x4a, 0x33, 0xd5, 0x10, 0x3d, 0x99, 0xb4, 0x54, + 0xc3, 0x6e, 0x43, 0x55, 0xc5, 0xa4, 0x41, 0x6a, 0x2c, 0xa9, 0xfc, 0x35, 0xa4, 0x0d, 0x2b, 0x13, + 0xd9, 0x6a, 0xa4, 0x1a, 0x4b, 0xcb, 0xb9, 0x74, 0x35, 0x7e, 0x13, 0xae, 0x4e, 0xe5, 0xab, 0x2d, + 0xd4, 0x70, 0x5a, 0x99, 0x48, 0x58, 0xdb, 0xec, 0x42, 0xd5, 0x63, 0xb1, 0xb0, 0x15, 0x37, 0xe8, + 0xeb, 0x19, 0xf5, 0x6a, 0x84, 0xa2, 0x22, 0x2d, 0x8f, 0x94, 0xa1, 0x2a, 0xaa, 0xe6, 0x6f, 0xe7, + 0x34, 0x2d, 0x5a, 0x83, 0xf9, 0xc0, 0xf7, 0x5c, 0x5f, 0x9d, 0x2e, 0x93, 0xea, 0x27, 0x4c, 0x5b, + 0x0f, 0x8a, 0x24, 0xe6, 0xea, 0x65, 0xb4, 0x40, 0x2b, 0x5a, 0x76, 0x14, 0xf3, 0x3e, 0x9e, 0x02, + 0x0d, 0x91, 0x83, 0xaf, 0x80, 0x08, 0xd0, 0x22, 0x39, 0xf2, 0x72, 0x03, 0xb2, 0xef, 0xc6, 0xa7, + 0xb6, 0x08, 0x04, 0xf3, 0xf0, 0xc4, 0x15, 0xb2, 0x01, 0xb9, 0xe3, 0xc6, 0xa7, 0x3d, 0x29, 0x27, + 0xef, 0xc1, 0xda, 0x04, 0x9a, 0x9d, 0x31, 0xd7, 0x63, 0xc7, 0x9e, 0x3a, 0x82, 0x05, 0xba, 0x9a, + 0xb3, 0xd8, 0x4a, 0x75, 0xe4, 0xc3, 0x94, 0x1d, 0xce, 0xbf, 0x02, 0x3b, 0xac, 0xa6, 0xad, 0xf7, + 0xdf, 0xb2, 0xe6, 0x94, 0xa1, 0x5e, 0x90, 0x7b, 0x30, 0xaf, 0x0a, 0x92, 0x34, 0x41, 0x52, 0x72, + 0x1e, 0x9d, 0xf1, 0x94, 0x29, 0x66, 0xcf, 0x0a, 0xab, 0xfb, 0xd2, 0x7f, 0x56, 0xa1, 0x28, 0x5b, + 0x18, 0xe9, 0x01, 0x08, 0x19, 0x8b, 0xed, 0x33, 0x5d, 0xa4, 0xe5, 0xed, 0x9f, 0x7f, 0xff, 0xd5, + 0xc6, 0xbb, 0xe1, 0xe0, 0x61, 0x0b, 0x39, 0xe7, 0x88, 0x8b, 0xc8, 0x75, 0xe2, 0xfb, 0xcc, 0x73, + 0x59, 0xfc, 0x50, 0xdc, 0x97, 0xfd, 0x9d, 0x45, 0x7d, 0x3b, 0xf1, 0x4f, 0xfd, 0xe0, 0x85, 0x6f, + 0x3b, 0x72, 0xec, 0xfb, 0x71, 0x8b, 0x96, 0xd1, 0xd1, 0x3e, 0x1b, 0xf1, 0x3c, 0x5f, 0x9d, 0x9b, + 0xe0, 0xab, 0xd3, 0xac, 0xaf, 0x70, 0x91, 0xf5, 0x5d, 0x83, 0x85, 0x24, 0x54, 0xbc, 0xbb, 0x88, + 0x43, 0x6d, 0x3e, 0x09, 0x91, 0x4b, 0x4f, 0xef, 0x6a, 0x09, 0xb5, 0x13, 0xbb, 0x3a, 0x9b, 0xd5, + 0xcc, 0x23, 0xf0, 0x22, 0xab, 0xd9, 0x80, 0xca, 0x88, 0x8f, 0x82, 0xe8, 0x5c, 0xf9, 0xd3, 0x4c, + 0x52, 0x89, 0xd0, 0xdd, 0x75, 0x30, 0x9d, 0x30, 0x51, 0x5a, 0x13, 0x9b, 0xee, 0x82, 0x13, 0x26, + 0xa8, 0xc2, 0xc6, 0x26, 0xcf, 0xb9, 0xe6, 0x93, 0xfa, 0x49, 0x6e, 0x40, 0x5a, 0x01, 0x58, 0xb5, + 0x45, 0x9a, 0x3d, 0xcb, 0x04, 0xf0, 0x14, 0xd9, 0xda, 0xb2, 0xa2, 0x12, 0x40, 0xd9, 0x91, 0x32, + 0x7f, 0x1d, 0x96, 0x14, 0x24, 0x73, 0x52, 0x45, 0xd0, 0x22, 0x4a, 0x77, 0x52, 0x4f, 0xb9, 0x3c, + 0x15, 0x05, 0xe9, 0x73, 0xe6, 0x61, 0xcd, 0x8e, 0xf3, 0x44, 0x06, 0xb2, 0xc3, 0x99, 0x27, 0x5b, + 0xd4, 0x34, 0x65, 0x41, 0xfc, 0x12, 0xe2, 0xc9, 0x24, 0x67, 0x41, 0x8b, 0x87, 0x60, 0xa6, 0xf7, + 0x10, 0xba, 0x58, 0x57, 0xf3, 0xbc, 0x20, 0xbd, 0x92, 0xc8, 0xd1, 0x81, 0x0c, 0x3f, 0x45, 0xaa, + 0xeb, 0xb8, 0x6c, 0x79, 0x52, 0x7d, 0x03, 0xca, 0xc7, 0x5e, 0xe0, 0x9c, 0xc6, 0x76, 0x12, 0x22, + 0x83, 0x2c, 0x52, 0x53, 0x09, 0x8e, 0x70, 0x4b, 0xb4, 0x52, 0x2e, 0x80, 0xe6, 0x8c, 0xa0, 0x44, + 0x32, 0x7b, 0x79, 0x3a, 0x82, 0xd8, 0x16, 0xe7, 0x21, 0x47, 0x96, 0x58, 0xa6, 0xf3, 0x41, 0xdc, + 0x3b, 0x0f, 0xd5, 0x60, 0x88, 0x9c, 0xa1, 0x52, 0xad, 0xaa, 0xa3, 0x2f, 0x05, 0xa8, 0xd4, 0x1b, + 0xe9, 0xfa, 0x27, 0x01, 0xd2, 0xc0, 0x32, 0x6e, 0xe4, 0x9e, 0x7f, 0x12, 0x48, 0x2e, 0x15, 0x72, + 0x1e, 0xc5, 0xb6, 0x13, 0xf8, 0x3e, 0x77, 0x64, 0x7b, 0x52, 0x5c, 0x6e, 0x09, 0xc5, 0x9d, 0x54, + 0x2a, 0x9b, 0x18, 0x36, 0x6d, 0xf5, 0xc6, 0xd4, 0x47, 0x12, 0xf7, 0xca, 0x4d, 0x4c, 0x5a, 0x76, + 0x94, 0x21, 0x59, 0x81, 0xd2, 0xd0, 0x3e, 0x63, 0x1e, 0x92, 0xbb, 0x32, 0x2d, 0x0e, 0x9f, 0x31, + 0x8f, 0xbc, 0x05, 0x85, 0x01, 0x0f, 0x90, 0xc6, 0x55, 0x26, 0x48, 0x46, 0x7b, 0x97, 0x07, 0x79, + 0xda, 0x35, 0xe0, 0x41, 0xca, 0xd8, 0x6e, 0x5c, 0x9e, 0xb1, 0x35, 0xff, 0x59, 0x02, 0x33, 0xdd, + 0xbe, 0x97, 0xdf, 0x26, 0x15, 0x2f, 0x75, 0x9b, 0x54, 0xbc, 0xcc, 0x6d, 0x52, 0xf1, 0xa7, 0xbf, + 0x4d, 0x9a, 0x41, 0xa5, 0x37, 0xe1, 0xea, 0x74, 0x81, 0x9c, 0xb0, 0xc4, 0x13, 0xba, 0x17, 0xac, + 0x4c, 0xd6, 0x08, 0xaa, 0xc8, 0xdb, 0x40, 0x9c, 0x24, 0x16, 0xc1, 0xc8, 0xfd, 0x8c, 0xf7, 0xd1, + 0xcc, 0xf5, 0x07, 0xd8, 0x15, 0x4c, 0xba, 0x3c, 0xd6, 0x1c, 0x2a, 0xc5, 0x98, 0x18, 0x9a, 0x97, + 0x22, 0x86, 0xb2, 0x1a, 0x23, 0x1e, 0x32, 0x37, 0x9a, 0x8a, 0x4c, 0xf5, 0x11, 0xa2, 0x74, 0x13, + 0x81, 0xbd, 0x0f, 0xd7, 0x26, 0x2c, 0xc6, 0xb1, 0xe8, 0x16, 0x73, 0x35, 0x67, 0xd4, 0xc9, 0x94, + 0xe4, 0x21, 0x5c, 0xd7, 0x76, 0x33, 0xf2, 0xaa, 0x60, 0x5e, 0xda, 0x71, 0x67, 0x46, 0x76, 0xd7, + 0x9c, 0x21, 0xf3, 0x3c, 0xee, 0x5f, 0x58, 0x42, 0xd5, 0x91, 0xae, 0x66, 0xea, 0x89, 0x58, 0x1f, + 0x41, 0x73, 0xda, 0x2e, 0x17, 0xae, 0xea, 0x50, 0x8d, 0x49, 0xd3, 0x5c, 0xc4, 0x1f, 0xc2, 0xcd, + 0xb1, 0xf5, 0x8c, 0xa0, 0x97, 0x30, 0xe8, 0xf1, 0x7f, 0xb8, 0x10, 0x77, 0xf3, 0xd7, 0x50, 0xd8, + 0xe5, 0xc1, 0xc5, 0x17, 0x1f, 0x63, 0xc6, 0x8b, 0xcf, 0xf8, 0x6a, 0x62, 0x6e, 0xe2, 0x6a, 0xa2, + 0x09, 0xa6, 0xc7, 0x84, 0x2b, 0x92, 0x7e, 0x4a, 0x41, 0xb3, 0x67, 0xf9, 0xc6, 0xe3, 0x05, 0xfe, + 0x40, 0x29, 0x15, 0xff, 0x1c, 0x0b, 0x9a, 0xbf, 0x9f, 0x87, 0xe5, 0x0b, 0x25, 0x28, 0x6d, 0x98, + 0xcf, 0xbc, 0x73, 0xe1, 0x3a, 0xb1, 0x66, 0x2a, 0x63, 0x81, 0x7c, 0xd3, 0x3f, 0x71, 0x3d, 0x2e, + 0x4f, 0x24, 0xb7, 0xb9, 0x2f, 0x67, 0xa8, 0x9a, 0x9a, 0x26, 0xad, 0x67, 0x0a, 0x4b, 0xc9, 0x65, + 0xe3, 0xc7, 0x17, 0x05, 0x3b, 0x3e, 0xf7, 0x9d, 0x0c, 0x5d, 0x50, 0x68, 0xd4, 0x74, 0xcf, 0x7d, + 0x27, 0x45, 0xbf, 0x01, 0xb5, 0x1c, 0x1a, 0xef, 0xe7, 0xd4, 0x25, 0xcc, 0x62, 0x06, 0xc5, 0x5b, + 0xcf, 0xf7, 0x60, 0xcd, 0x73, 0x8f, 0xc3, 0xcd, 0xd0, 0x8e, 0x45, 0xc4, 0xd9, 0xc8, 0x1e, 0xc9, + 0x65, 0x92, 0x0b, 0x5e, 0x42, 0xcf, 0xab, 0x4a, 0xdb, 0x45, 0xe5, 0x53, 0xad, 0x23, 0xff, 0x07, + 0x4b, 0xd2, 0x64, 0x28, 0x44, 0x68, 0x87, 0x51, 0xf0, 0xe9, 0x39, 0x16, 0x97, 0x49, 0xab, 0xe1, + 0x66, 0xf8, 0x58, 0x88, 0xf0, 0x50, 0xca, 0x24, 0x91, 0x0d, 0x23, 0x7e, 0xc2, 0x23, 0x5b, 0x78, + 0xb1, 0xae, 0xa6, 0xb2, 0x92, 0xf4, 0xbc, 0x98, 0x10, 0x28, 0x3e, 0x4f, 0x5c, 0x07, 0xc7, 0xab, + 0x49, 0xf1, 0xb7, 0x0c, 0x3b, 0xe2, 0xa3, 0xe0, 0x8c, 0xdb, 0x81, 0x6f, 0x27, 0x7e, 0xe8, 0xfa, + 0x58, 0x1c, 0x26, 0x5d, 0x54, 0xe2, 0x03, 0xff, 0x48, 0x0a, 0x65, 0x3f, 0x88, 0x87, 0x2c, 0xea, + 0xbb, 0xfe, 0x20, 0x5b, 0x0a, 0x40, 0x60, 0x2d, 0x95, 0xa7, 0x2b, 0x91, 0xe3, 0x67, 0x8e, 0xe7, + 0x72, 0x5f, 0x64, 0x06, 0xaa, 0x0e, 0x52, 0x7e, 0xd6, 0x41, 0x65, 0x6a, 0xf5, 0x0e, 0xa4, 0x72, + 0x1b, 0xdf, 0xaa, 0x52, 0x9b, 0x2a, 0xda, 0xa4, 0x23, 0x58, 0x52, 0xb4, 0xd4, 0xe2, 0x01, 0xac, + 0xc4, 0x22, 0x62, 0x82, 0x0f, 0x5c, 0x47, 0x2e, 0xca, 0x99, 0x2b, 0xa3, 0xc0, 0x73, 0x8f, 0x06, + 0x5a, 0x75, 0x98, 0x6a, 0x64, 0x0b, 0x4e, 0x22, 0xd9, 0xcc, 0xf2, 0xbb, 0xaf, 0x8e, 0x79, 0x2d, + 0x89, 0xbc, 0x6e, 0x7e, 0xf3, 0xdb, 0xb0, 0xd2, 0x77, 0x63, 0x64, 0x6b, 0x2c, 0x11, 0x81, 0xa6, + 0xd3, 0x38, 0xa0, 0x4d, 0xba, 0xac, 0x55, 0x5b, 0x89, 0x08, 0x14, 0x5d, 0x96, 0x27, 0x6b, 0x10, + 0xb1, 0x70, 0x38, 0x71, 0x56, 0xea, 0xea, 0xac, 0x64, 0x8a, 0x9c, 0x73, 0xdd, 0x2c, 0x26, 0x52, + 0x5d, 0x56, 0xce, 0x95, 0x2a, 0x9f, 0xe9, 0x7b, 0xb0, 0x36, 0x2e, 0xd5, 0x09, 0x13, 0xa2, 0x56, + 0x34, 0xd3, 0xe6, 0xac, 0xee, 0x9d, 0x41, 0x35, 0x7f, 0x15, 0x4b, 0x2a, 0xb0, 0xd0, 0x3d, 0xea, + 0x74, 0xac, 0x6e, 0xb7, 0x7e, 0x85, 0x34, 0x61, 0xad, 0xbb, 0xb7, 0xbb, 0xbf, 0xd5, 0x3b, 0xa2, + 0x96, 0xfd, 0xd1, 0x01, 0x7d, 0xba, 0xd5, 0xb3, 0x2d, 0x4a, 0x0f, 0x68, 0xdd, 0x20, 0xd7, 0xe1, + 0x6a, 0xe7, 0xe0, 0xe9, 0xe1, 0x51, 0xcf, 0xb2, 0xb7, 0x76, 0x76, 0xa8, 0xd5, 0xed, 0x6a, 0xd5, + 0x1c, 0x59, 0x86, 0xc5, 0xde, 0xde, 0x53, 0xeb, 0xe0, 0x28, 0x45, 0x17, 0x48, 0x0d, 0x2a, 0x07, + 0xbd, 0xc7, 0x16, 0xd5, 0x82, 0xd5, 0x7b, 0xbf, 0x31, 0xd4, 0x47, 0x2c, 0xd9, 0x99, 0x09, 0xc0, + 0x3c, 0xb5, 0xf6, 0x7b, 0x16, 0xad, 0x5f, 0x21, 0x26, 0x14, 0x1f, 0x1f, 0x74, 0x7b, 0x75, 0x83, + 0x54, 0xc1, 0xa4, 0xd6, 0xe1, 0xd6, 0x1e, 0xb5, 0xa4, 0xd3, 0x25, 0x80, 0xce, 0xe3, 0xad, 0x27, + 0x4f, 0xac, 0xfd, 0x5d, 0x4b, 0x7a, 0x5c, 0x81, 0xda, 0xbe, 0xd5, 0xfb, 0xe4, 0x80, 0x7e, 0x6c, + 0x77, 0x1e, 0x5b, 0x9d, 0x8f, 0x2d, 0x5a, 0x2f, 0x92, 0x35, 0x20, 0xd4, 0x3a, 0x3c, 0xea, 0x6d, + 0xf5, 0xf6, 0x0e, 0xf6, 0x33, 0x79, 0x89, 0xd4, 0xa1, 0xda, 0xd9, 0xd9, 0xb7, 0x0f, 0xe9, 0xc1, + 0xb3, 0xbd, 0x1d, 0x8b, 0xd6, 0xe7, 0x49, 0x19, 0x4a, 0x18, 0x50, 0x7d, 0x75, 0xf3, 0xf3, 0x39, + 0xa8, 0xe2, 0x8b, 0x60, 0x97, 0x47, 0x67, 0xae, 0xc3, 0xc9, 0xfb, 0x50, 0xd9, 0xe5, 0x22, 0x1b, + 0xca, 0x64, 0xea, 0xb3, 0x10, 0xe5, 0xcf, 0x9b, 0x2b, 0x17, 0x64, 0x71, 0x48, 0xde, 0x06, 0x73, + 0x97, 0x0b, 0xbc, 0x5e, 0x20, 0xb5, 0xa9, 0xaf, 0x1e, 0xcd, 0xfa, 0xa4, 0x20, 0x83, 0xab, 0xd7, + 0xf2, 0x5a, 0xf6, 0xa6, 0xc1, 0x26, 0xe1, 0xe3, 0x7b, 0xf4, 0x07, 0x00, 0xbf, 0x4c, 0x78, 0x74, + 0x8e, 0x9f, 0xfe, 0x48, 0x7e, 0xba, 0xbd, 0xc4, 0xff, 0x07, 0x50, 0x4b, 0xc3, 0xd9, 0x3e, 0xc7, + 0x8f, 0x20, 0x24, 0x25, 0x8d, 0x13, 0x9f, 0x44, 0x2e, 0x9a, 0x6e, 0x3f, 0xfa, 0xe2, 0xdb, 0x75, + 0xe3, 0xcb, 0x6f, 0xd7, 0x8d, 0x6f, 0xbe, 0x5d, 0x37, 0x7e, 0xf7, 0xdd, 0xba, 0xf1, 0xd7, 0xef, + 0xd6, 0x8d, 0x2f, 0xbe, 0x5b, 0x37, 0x60, 0xd1, 0x0d, 0xda, 0xf2, 0xe5, 0x40, 0x99, 0x6c, 0x03, + 0x2e, 0xdc, 0xa1, 0xa4, 0x5a, 0x87, 0xc6, 0xaf, 0xd4, 0xad, 0xc1, 0xf1, 0x3c, 0x52, 0xaf, 0x9f, + 0xfd, 0x37, 0x00, 0x00, 0xff, 0xff, 0x8b, 0xf7, 0xc5, 0xa2, 0x1c, 0x1d, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// ScoreServiceClient is the client API for ScoreService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ScoreServiceClient interface { + GetSettings(ctx context.Context, in *SettingsReq, opts ...grpc.CallOption) (*SettingsResp, error) + GetHosts(ctx context.Context, in *HostsReq, opts ...grpc.CallOption) (*HostsResp, error) + GetStats(ctx context.Context, in *StatsReq, opts ...grpc.CallOption) (*StatsResp, error) + QueryNodes(ctx context.Context, in *NodesReq, opts ...grpc.CallOption) (*HostsResp, error) + GetHostsByRoles(ctx context.Context, in *RolesHostsReq, opts ...grpc.CallOption) (*HostsResp, error) +} + +type scoreServiceClient struct { + cc *grpc.ClientConn +} + +func NewScoreServiceClient(cc *grpc.ClientConn) ScoreServiceClient { + return &scoreServiceClient{cc} +} + +func (c *scoreServiceClient) GetSettings(ctx context.Context, in *SettingsReq, opts ...grpc.CallOption) (*SettingsResp, error) { + out := new(SettingsResp) + err := c.cc.Invoke(ctx, "/score.ScoreService/GetSettings", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *scoreServiceClient) GetHosts(ctx context.Context, in *HostsReq, opts ...grpc.CallOption) (*HostsResp, error) { + out := new(HostsResp) + err := c.cc.Invoke(ctx, "/score.ScoreService/GetHosts", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *scoreServiceClient) GetStats(ctx context.Context, in *StatsReq, opts ...grpc.CallOption) (*StatsResp, error) { + out := new(StatsResp) + err := c.cc.Invoke(ctx, "/score.ScoreService/GetStats", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *scoreServiceClient) QueryNodes(ctx context.Context, in *NodesReq, opts ...grpc.CallOption) (*HostsResp, error) { + out := new(HostsResp) + err := c.cc.Invoke(ctx, "/score.ScoreService/QueryNodes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *scoreServiceClient) GetHostsByRoles(ctx context.Context, in *RolesHostsReq, opts ...grpc.CallOption) (*HostsResp, error) { + out := new(HostsResp) + err := c.cc.Invoke(ctx, "/score.ScoreService/GetHostsByRoles", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ScoreServiceServer is the server API for ScoreService service. +type ScoreServiceServer interface { + GetSettings(context.Context, *SettingsReq) (*SettingsResp, error) + GetHosts(context.Context, *HostsReq) (*HostsResp, error) + GetStats(context.Context, *StatsReq) (*StatsResp, error) + QueryNodes(context.Context, *NodesReq) (*HostsResp, error) + GetHostsByRoles(context.Context, *RolesHostsReq) (*HostsResp, error) +} + +// UnimplementedScoreServiceServer can be embedded to have forward compatible implementations. +type UnimplementedScoreServiceServer struct { +} + +func (*UnimplementedScoreServiceServer) GetSettings(ctx context.Context, req *SettingsReq) (*SettingsResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSettings not implemented") +} +func (*UnimplementedScoreServiceServer) GetHosts(ctx context.Context, req *HostsReq) (*HostsResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetHosts not implemented") +} +func (*UnimplementedScoreServiceServer) GetStats(ctx context.Context, req *StatsReq) (*StatsResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStats not implemented") +} +func (*UnimplementedScoreServiceServer) QueryNodes(ctx context.Context, req *NodesReq) (*HostsResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryNodes not implemented") +} +func (*UnimplementedScoreServiceServer) GetHostsByRoles(ctx context.Context, req *RolesHostsReq) (*HostsResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetHostsByRoles not implemented") +} + +func RegisterScoreServiceServer(s *grpc.Server, srv ScoreServiceServer) { + s.RegisterService(&_ScoreService_serviceDesc, srv) +} + +func _ScoreService_GetSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SettingsReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ScoreServiceServer).GetSettings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/score.ScoreService/GetSettings", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ScoreServiceServer).GetSettings(ctx, req.(*SettingsReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _ScoreService_GetHosts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HostsReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ScoreServiceServer).GetHosts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/score.ScoreService/GetHosts", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ScoreServiceServer).GetHosts(ctx, req.(*HostsReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _ScoreService_GetStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StatsReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ScoreServiceServer).GetStats(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/score.ScoreService/GetStats", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ScoreServiceServer).GetStats(ctx, req.(*StatsReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _ScoreService_QueryNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(NodesReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ScoreServiceServer).QueryNodes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/score.ScoreService/QueryNodes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ScoreServiceServer).QueryNodes(ctx, req.(*NodesReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _ScoreService_GetHostsByRoles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RolesHostsReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ScoreServiceServer).GetHostsByRoles(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/score.ScoreService/GetHostsByRoles", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ScoreServiceServer).GetHostsByRoles(ctx, req.(*RolesHostsReq)) + } + return interceptor(ctx, in, info, handler) +} + +var _ScoreService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "score.ScoreService", + HandlerType: (*ScoreServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetSettings", + Handler: _ScoreService_GetSettings_Handler, + }, + { + MethodName: "GetHosts", + Handler: _ScoreService_GetHosts_Handler, + }, + { + MethodName: "GetStats", + Handler: _ScoreService_GetStats_Handler, + }, + { + MethodName: "QueryNodes", + Handler: _ScoreService_QueryNodes_Handler, + }, + { + MethodName: "GetHostsByRoles", + Handler: _ScoreService_GetHostsByRoles_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "protos/score/score.proto", +} + +func (m *NodesReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NodesReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NodesReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = encodeVarintScore(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x1a + } + if len(m.RequesterId) > 0 { + i -= len(m.RequesterId) + copy(dAtA[i:], m.RequesterId) + i = encodeVarintScore(dAtA, i, uint64(len(m.RequesterId))) + i-- + dAtA[i] = 0x12 + } + if len(m.NodeId) > 0 { + for iNdEx := len(m.NodeId) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.NodeId[iNdEx]) + copy(dAtA[i:], m.NodeId[iNdEx]) + i = encodeVarintScore(dAtA, i, uint64(len(m.NodeId[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *SettingsReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SettingsReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SettingsReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.RespSize != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.RespSize)) + i-- + dAtA[i] = 0x10 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintScore(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SettingsResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SettingsResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SettingsResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.SettingsData != nil { + { + size, err := m.SettingsData.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintScore(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + n2, err2 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.ResponseTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime):]) + if err2 != nil { + return 0, err2 + } + i -= n2 + i = encodeVarintScore(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x1a + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintScore(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0x12 + } + if m.Code != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *SettingsData) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SettingsData) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SettingsData) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.CollateralStake != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.CollateralStake)))) + i-- + dAtA[i] = 0x29 + } + if m.BandwidthLimit != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.BandwidthLimit)))) + i-- + dAtA[i] = 0x21 + } + if m.StorageTimeMin != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.StorageTimeMin)))) + i-- + dAtA[i] = 0x19 + } + if m.BandwidthPriceAsk != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.BandwidthPriceAsk)))) + i-- + dAtA[i] = 0x11 + } + if m.StoragePriceAsk != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.StoragePriceAsk)))) + i-- + dAtA[i] = 0x9 + } + return len(dAtA) - i, nil +} + +func (m *HostsReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HostsReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HostsReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintScore(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x22 + } + if m.Mode != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.Mode)) + i-- + dAtA[i] = 0x18 + } + if m.RespSize != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.RespSize)) + i-- + dAtA[i] = 0x10 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintScore(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RolesHostsReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RolesHostsReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RolesHostsReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Role != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.Role)) + i-- + dAtA[i] = 0x18 + } + if m.RespSize != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.RespSize)) + i-- + dAtA[i] = 0x10 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintScore(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *HostsResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HostsResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HostsResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + n3, err3 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.ResponseTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime):]) + if err3 != nil { + return 0, err3 + } + i -= n3 + i = encodeVarintScore(dAtA, i, uint64(n3)) + i-- + dAtA[i] = 0x32 + if len(m.Mode) > 0 { + i -= len(m.Mode) + copy(dAtA[i:], m.Mode) + i = encodeVarintScore(dAtA, i, uint64(len(m.Mode))) + i-- + dAtA[i] = 0x2a + } + if m.RespSize != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.RespSize)) + i-- + dAtA[i] = 0x20 + } + if m.Hosts != nil { + { + size, err := m.Hosts.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintScore(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintScore(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0x12 + } + if m.Code != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *StatsReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StatsReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StatsReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintScore(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *StatsResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StatsResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StatsResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + { + size, err := m.StorageStat_HostStats.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintScore(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + n6, err6 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.ResponseTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime):]) + if err6 != nil { + return 0, err6 + } + i -= n6 + i = encodeVarintScore(dAtA, i, uint64(n6)) + i-- + dAtA[i] = 0x1a + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintScore(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0x12 + } + if m.Code != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Host) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Host) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Host) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Roles) > 0 { + dAtA8 := make([]byte, len(m.Roles)*10) + var j7 int + for _, num := range m.Roles { + for num >= 1<<7 { + dAtA8[j7] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j7++ + } + dAtA8[j7] = uint8(num) + j7++ + } + i -= j7 + copy(dAtA[i:], dAtA8[:j7]) + i = encodeVarintScore(dAtA, i, uint64(j7)) + i-- + dAtA[i] = 0x2 + i-- + dAtA[i] = 0x9a + } + if m.DownloadSpeedScore != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.DownloadSpeedScore)))) + i-- + dAtA[i] = 0x2 + i-- + dAtA[i] = 0x95 + } + if m.UploadSpeedScore != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.UploadSpeedScore)))) + i-- + dAtA[i] = 0x2 + i-- + dAtA[i] = 0x8d + } + if m.VersionScore != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.VersionScore)))) + i-- + dAtA[i] = 0x2 + i-- + dAtA[i] = 0x85 + } + if m.AgeScore != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.AgeScore)))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xfd + } + if m.UptimeScore != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.UptimeScore)))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xf5 + } + if m.Discovery != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Discovery)))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xed + } + { + size, err := m.Node_ExperimentalFlags.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintScore(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xe2 + if len(m.CountryShort) > 0 { + i -= len(m.CountryShort) + copy(dAtA[i:], m.CountryShort) + i = encodeVarintScore(dAtA, i, uint64(len(m.CountryShort))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xda + } + if m.CollateralBurn != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.CollateralBurn)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xd0 + } + if m.CollateralLost != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.CollateralLost)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xc8 + } + if m.CollateralStake != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.CollateralStake)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xc0 + } + if m.BandwidthPriceEst != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.BandwidthPriceEst)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb8 + } + if m.BandwidthPriceAsk != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.BandwidthPriceAsk)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb0 + } + if m.BandwidthLimit != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.BandwidthLimit)))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa9 + } + if m.StoragePriceEst != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.StoragePriceEst)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa0 + } + if m.StoragePriceAsk != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.StoragePriceAsk)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x98 + } + if m.StorageTimeMin != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.StorageTimeMin)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x90 + } + if m.StorageVolumeLeft != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.StorageVolumeLeft)))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x8d + } + if m.StorageVolumeCap != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.StorageVolumeCap)))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x85 + } + { + size, err := m.Location.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintScore(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x7a + if m.DownloadVariance != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.DownloadVariance)))) + i-- + dAtA[i] = 0x75 + } + if m.DownloadAverage != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.DownloadAverage)))) + i-- + dAtA[i] = 0x6d + } + if m.UploadVariance != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.UploadVariance)))) + i-- + dAtA[i] = 0x65 + } + if m.UploadAverage != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.UploadAverage)))) + i-- + dAtA[i] = 0x5d + } + if m.Reputation != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Reputation)))) + i-- + dAtA[i] = 0x55 + } + if m.Age != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.Age)) + i-- + dAtA[i] = 0x48 + } + if m.Uptime != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Uptime)))) + i-- + dAtA[i] = 0x45 + } + if m.HeartBeats != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.HeartBeats)) + i-- + dAtA[i] = 0x38 + } + if m.Score != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Score)))) + i-- + dAtA[i] = 0x35 + } + if len(m.BtfsVersion) > 0 { + i -= len(m.BtfsVersion) + copy(dAtA[i:], m.BtfsVersion) + i = encodeVarintScore(dAtA, i, uint64(len(m.BtfsVersion))) + i-- + dAtA[i] = 0x2a + } + if len(m.Region) > 0 { + i -= len(m.Region) + copy(dAtA[i:], m.Region) + i = encodeVarintScore(dAtA, i, uint64(len(m.Region))) + i-- + dAtA[i] = 0x22 + } + n11, err11 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.UpdateTimestamp, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.UpdateTimestamp):]) + if err11 != nil { + return 0, err11 + } + i -= n11 + i = encodeVarintScore(dAtA, i, uint64(n11)) + i-- + dAtA[i] = 0x1a + n12, err12 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.CreateTimestamp, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.CreateTimestamp):]) + if err12 != nil { + return 0, err12 + } + i -= n12 + i = encodeVarintScore(dAtA, i, uint64(n12)) + i-- + dAtA[i] = 0x12 + if len(m.NodeId) > 0 { + i -= len(m.NodeId) + copy(dAtA[i:], m.NodeId) + i = encodeVarintScore(dAtA, i, uint64(len(m.NodeId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *HostsData) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HostsData) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HostsData) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Hosts) > 0 { + for iNdEx := len(m.Hosts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Hosts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintScore(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *Location) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Location) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Location) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Lon != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Lon)))) + i-- + dAtA[i] = 0x11 + } + if m.Lat != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Lat)))) + i-- + dAtA[i] = 0x9 + } + return len(dAtA) - i, nil +} + +func (m *StorageStat) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StorageStat) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StorageStat) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + { + size, err := m.RenterStats.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintScore(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.HostStats.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintScore(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *StorageStat_HostStats) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StorageStat_HostStats) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StorageStat_HostStats) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + n15, err15 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.LastUpdated, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.LastUpdated):]) + if err15 != nil { + return 0, err15 + } + i -= n15 + i = encodeVarintScore(dAtA, i, uint64(n15)) + i-- + dAtA[i] = 0x7a + if m.DownloadSpeedWeight != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.DownloadSpeedWeight)))) + i-- + dAtA[i] = 0x75 + } + if m.UploadSpeedWeight != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.UploadSpeedWeight)))) + i-- + dAtA[i] = 0x6d + } + if m.SpeedWeight != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.SpeedWeight)))) + i-- + dAtA[i] = 0x65 + } + if m.VersionWeight != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.VersionWeight)))) + i-- + dAtA[i] = 0x5d + } + if m.AgeWeight != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.AgeWeight)))) + i-- + dAtA[i] = 0x55 + } + if m.UptimeWeight != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.UptimeWeight)))) + i-- + dAtA[i] = 0x4d + } + if m.DownloadSpeedScore != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.DownloadSpeedScore)))) + i-- + dAtA[i] = 0x45 + } + if m.UploadSpeedScore != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.UploadSpeedScore)))) + i-- + dAtA[i] = 0x3d + } + if m.SpeedScore != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.SpeedScore)))) + i-- + dAtA[i] = 0x35 + } + if m.VersionScore != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.VersionScore)))) + i-- + dAtA[i] = 0x2d + } + if m.AgeScore != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.AgeScore)))) + i-- + dAtA[i] = 0x25 + } + if m.UptimeScore != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.UptimeScore)))) + i-- + dAtA[i] = 0x1d + } + if m.Score != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Score)))) + i-- + dAtA[i] = 0x15 + } + if m.Uptime != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Uptime)))) + i-- + dAtA[i] = 0xd + } + return len(dAtA) - i, nil +} + +func (m *StorageStat_Host) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StorageStat_Host) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StorageStat_Host) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + { + size, err := m.StorageStat_HostStats.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintScore(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + if m.StorageDiskAvailable != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.StorageDiskAvailable)) + i-- + dAtA[i] = 0x28 + } + if m.StorageDiskTotal != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.StorageDiskTotal)) + i-- + dAtA[i] = 0x20 + } + if m.StorageCap != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.StorageCap)) + i-- + dAtA[i] = 0x18 + } + if m.StorageUsed != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.StorageUsed)) + i-- + dAtA[i] = 0x10 + } + if m.Online { + i-- + if m.Online { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *StorageStat_Renter) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StorageStat_Renter) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StorageStat_Renter) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Reserved) > 0 { + i -= len(m.Reserved) + copy(dAtA[i:], m.Reserved) + i = encodeVarintScore(dAtA, i, uint64(len(m.Reserved))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Node) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Node) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Node) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + { + size, err := m.Node_ExperimentalFlags.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintScore(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xda + { + size, err := m.Node_Geo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintScore(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xd2 + if len(m.HVal) > 0 { + i -= len(m.HVal) + copy(dAtA[i:], m.HVal) + i = encodeVarintScore(dAtA, i, uint64(len(m.HVal))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xca + } + n19, err19 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.TimeCreated, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.TimeCreated):]) + if err19 != nil { + return 0, err19 + } + i -= n19 + i = encodeVarintScore(dAtA, i, uint64(n19)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xc2 + if m.PeersConnected != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.PeersConnected)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb8 + } + if len(m.CpuInfo) > 0 { + i -= len(m.CpuInfo) + copy(dAtA[i:], m.CpuInfo) + i = encodeVarintScore(dAtA, i, uint64(len(m.CpuInfo))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xaa + } + if len(m.ArchType) > 0 { + i -= len(m.ArchType) + copy(dAtA[i:], m.ArchType) + i = encodeVarintScore(dAtA, i, uint64(len(m.ArchType))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa2 + } + if len(m.OsType) > 0 { + i -= len(m.OsType) + copy(dAtA[i:], m.OsType) + i = encodeVarintScore(dAtA, i, uint64(len(m.OsType))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x9a + } + if m.BlocksDown != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.BlocksDown)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x90 + } + if m.BlocksUp != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.BlocksUp)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x88 + } + if m.Reputation != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Reputation)))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x81 + } + { + size, err := m.Node_Settings.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintScore(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x7a + if m.BandwidthPriceDeal != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.BandwidthPriceDeal)) + i-- + dAtA[i] = 0x70 + } + if m.StoragePriceDeal != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.StoragePriceDeal)) + i-- + dAtA[i] = 0x68 + } + if m.TotalDownload != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.TotalDownload)) + i-- + dAtA[i] = 0x60 + } + if m.TotalUpload != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.TotalUpload)) + i-- + dAtA[i] = 0x58 + } + if m.Download != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.Download)) + i-- + dAtA[i] = 0x50 + } + if m.Upload != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.Upload)) + i-- + dAtA[i] = 0x48 + } + if m.CpuUsed != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.CpuUsed)))) + i-- + dAtA[i] = 0x41 + } + if m.MemoryUsed != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.MemoryUsed)) + i-- + dAtA[i] = 0x38 + } + if m.StorageVolumeCap != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.StorageVolumeCap)) + i-- + dAtA[i] = 0x30 + } + if m.StorageUsed != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.StorageUsed)) + i-- + dAtA[i] = 0x28 + } + if m.UpTime != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.UpTime)) + i-- + dAtA[i] = 0x20 + } + if len(m.BtfsVersion) > 0 { + i -= len(m.BtfsVersion) + copy(dAtA[i:], m.BtfsVersion) + i = encodeVarintScore(dAtA, i, uint64(len(m.BtfsVersion))) + i-- + dAtA[i] = 0x1a + } + if len(m.NodeId) > 0 { + i -= len(m.NodeId) + copy(dAtA[i:], m.NodeId) + i = encodeVarintScore(dAtA, i, uint64(len(m.NodeId))) + i-- + dAtA[i] = 0x12 + } + if len(m.TableName) > 0 { + i -= len(m.TableName) + copy(dAtA[i:], m.TableName) + i = encodeVarintScore(dAtA, i, uint64(len(m.TableName))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Node_Settings) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Node_Settings) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Node_Settings) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.ChallengeCustomizedPricing { + i-- + if m.ChallengeCustomizedPricing { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x70 + } + if m.ChallengePriceCustomized != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.ChallengePriceCustomized)) + i-- + dAtA[i] = 0x68 + } + if m.ChallengePriceDefault != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.ChallengePriceDefault)) + i-- + dAtA[i] = 0x60 + } + if m.RepairCustomizedPricing { + i-- + if m.RepairCustomizedPricing { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x58 + } + if m.RepairPriceCustomized != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.RepairPriceCustomized)) + i-- + dAtA[i] = 0x50 + } + if m.RepairPriceDefault != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.RepairPriceDefault)) + i-- + dAtA[i] = 0x48 + } + if len(m.Roles) > 0 { + dAtA22 := make([]byte, len(m.Roles)*10) + var j21 int + for _, num := range m.Roles { + for num >= 1<<7 { + dAtA22[j21] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j21++ + } + dAtA22[j21] = uint8(num) + j21++ + } + i -= j21 + copy(dAtA[i:], dAtA22[:j21]) + i = encodeVarintScore(dAtA, i, uint64(j21)) + i-- + dAtA[i] = 0x42 + } + if m.CustomizedPricing { + i-- + if m.CustomizedPricing { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x38 + } + if m.StoragePriceDefault != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.StoragePriceDefault)) + i-- + dAtA[i] = 0x30 + } + if m.CollateralStake != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.CollateralStake)) + i-- + dAtA[i] = 0x28 + } + if m.BandwidthLimit != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.BandwidthLimit)))) + i-- + dAtA[i] = 0x21 + } + if m.StorageTimeMin != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.StorageTimeMin)) + i-- + dAtA[i] = 0x18 + } + if m.BandwidthPriceAsk != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.BandwidthPriceAsk)) + i-- + dAtA[i] = 0x10 + } + if m.StoragePriceAsk != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.StoragePriceAsk)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Node_Geo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Node_Geo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Node_Geo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Longitude != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Longitude)))) + i-- + dAtA[i] = 0x25 + } + if m.Latitude != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Latitude)))) + i-- + dAtA[i] = 0x1d + } + if len(m.Region) > 0 { + i -= len(m.Region) + copy(dAtA[i:], m.Region) + i = encodeVarintScore(dAtA, i, uint64(len(m.Region))) + i-- + dAtA[i] = 0x12 + } + if len(m.CountryShort) > 0 { + i -= len(m.CountryShort) + copy(dAtA[i:], m.CountryShort) + i = encodeVarintScore(dAtA, i, uint64(len(m.CountryShort))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Node_ExperimentalFlags) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Node_ExperimentalFlags) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Node_ExperimentalFlags) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.ChallengeHostEnabled { + i-- + if m.ChallengeHostEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x90 + } + if m.RepairHostEnabled { + i-- + if m.RepairHostEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x88 + } + if m.GraphsyncEnabled { + i-- + if m.GraphsyncEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x80 + } + if m.DisableAutoUpdate { + i-- + if m.DisableAutoUpdate { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x78 + } + if m.UrlStoreEnabled { + i-- + if m.UrlStoreEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x70 + } + if m.StrategicProviding { + i-- + if m.StrategicProviding { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x68 + } + if m.StorageHostEnabled { + i-- + if m.StorageHostEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x60 + } + if m.StorageClientEnabled { + i-- + if m.StorageClientEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x58 + } + if m.ShardingEnabled { + i-- + if m.ShardingEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x50 + } + if m.RemoveOnUnpin { + i-- + if m.RemoveOnUnpin { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x48 + } + if m.Quic { + i-- + if m.Quic { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x40 + } + if m.PreferTls { + i-- + if m.PreferTls { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x38 + } + if m.P2PHttpProxy { + i-- + if m.P2PHttpProxy { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if m.Libp2PStreamMounting { + i-- + if m.Libp2PStreamMounting { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if len(m.HostsSyncMode) > 0 { + i -= len(m.HostsSyncMode) + copy(dAtA[i:], m.HostsSyncMode) + i = encodeVarintScore(dAtA, i, uint64(len(m.HostsSyncMode))) + i-- + dAtA[i] = 0x22 + } + if m.HostsSyncEnabled { + i-- + if m.HostsSyncEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if m.FilestoreEnabled { + i-- + if m.FilestoreEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if m.Analytics { + i-- + if m.Analytics { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintScore(dAtA []byte, offset int, v uint64) int { + offset -= sovScore(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *NodesReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.NodeId) > 0 { + for _, s := range m.NodeId { + l = len(s) + n += 1 + l + sovScore(uint64(l)) + } + } + l = len(m.RequesterId) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SettingsReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + if m.RespSize != 0 { + n += 1 + sovScore(uint64(m.RespSize)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SettingsResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Code != 0 { + n += 1 + sovScore(uint64(m.Code)) + } + l = len(m.Message) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime) + n += 1 + l + sovScore(uint64(l)) + if m.SettingsData != nil { + l = m.SettingsData.Size() + n += 1 + l + sovScore(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SettingsData) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.StoragePriceAsk != 0 { + n += 9 + } + if m.BandwidthPriceAsk != 0 { + n += 9 + } + if m.StorageTimeMin != 0 { + n += 9 + } + if m.BandwidthLimit != 0 { + n += 9 + } + if m.CollateralStake != 0 { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *HostsReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + if m.RespSize != 0 { + n += 1 + sovScore(uint64(m.RespSize)) + } + if m.Mode != 0 { + n += 1 + sovScore(uint64(m.Mode)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *RolesHostsReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + if m.RespSize != 0 { + n += 1 + sovScore(uint64(m.RespSize)) + } + if m.Role != 0 { + n += 1 + sovScore(uint64(m.Role)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *HostsResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Code != 0 { + n += 1 + sovScore(uint64(m.Code)) + } + l = len(m.Message) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + if m.Hosts != nil { + l = m.Hosts.Size() + n += 1 + l + sovScore(uint64(l)) + } + if m.RespSize != 0 { + n += 1 + sovScore(uint64(m.RespSize)) + } + l = len(m.Mode) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime) + n += 1 + l + sovScore(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *StatsReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *StatsResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Code != 0 { + n += 1 + sovScore(uint64(m.Code)) + } + l = len(m.Message) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime) + n += 1 + l + sovScore(uint64(l)) + l = m.StorageStat_HostStats.Size() + n += 1 + l + sovScore(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Host) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.NodeId) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.CreateTimestamp) + n += 1 + l + sovScore(uint64(l)) + l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.UpdateTimestamp) + n += 1 + l + sovScore(uint64(l)) + l = len(m.Region) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + l = len(m.BtfsVersion) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + if m.Score != 0 { + n += 5 + } + if m.HeartBeats != 0 { + n += 1 + sovScore(uint64(m.HeartBeats)) + } + if m.Uptime != 0 { + n += 5 + } + if m.Age != 0 { + n += 1 + sovScore(uint64(m.Age)) + } + if m.Reputation != 0 { + n += 5 + } + if m.UploadAverage != 0 { + n += 5 + } + if m.UploadVariance != 0 { + n += 5 + } + if m.DownloadAverage != 0 { + n += 5 + } + if m.DownloadVariance != 0 { + n += 5 + } + l = m.Location.Size() + n += 1 + l + sovScore(uint64(l)) + if m.StorageVolumeCap != 0 { + n += 6 + } + if m.StorageVolumeLeft != 0 { + n += 6 + } + if m.StorageTimeMin != 0 { + n += 2 + sovScore(uint64(m.StorageTimeMin)) + } + if m.StoragePriceAsk != 0 { + n += 2 + sovScore(uint64(m.StoragePriceAsk)) + } + if m.StoragePriceEst != 0 { + n += 2 + sovScore(uint64(m.StoragePriceEst)) + } + if m.BandwidthLimit != 0 { + n += 10 + } + if m.BandwidthPriceAsk != 0 { + n += 2 + sovScore(uint64(m.BandwidthPriceAsk)) + } + if m.BandwidthPriceEst != 0 { + n += 2 + sovScore(uint64(m.BandwidthPriceEst)) + } + if m.CollateralStake != 0 { + n += 2 + sovScore(uint64(m.CollateralStake)) + } + if m.CollateralLost != 0 { + n += 2 + sovScore(uint64(m.CollateralLost)) + } + if m.CollateralBurn != 0 { + n += 2 + sovScore(uint64(m.CollateralBurn)) + } + l = len(m.CountryShort) + if l > 0 { + n += 2 + l + sovScore(uint64(l)) + } + l = m.Node_ExperimentalFlags.Size() + n += 2 + l + sovScore(uint64(l)) + if m.Discovery != 0 { + n += 6 + } + if m.UptimeScore != 0 { + n += 6 + } + if m.AgeScore != 0 { + n += 6 + } + if m.VersionScore != 0 { + n += 6 + } + if m.UploadSpeedScore != 0 { + n += 6 + } + if m.DownloadSpeedScore != 0 { + n += 6 + } + if len(m.Roles) > 0 { + l = 0 + for _, e := range m.Roles { + l += sovScore(uint64(e)) + } + n += 2 + sovScore(uint64(l)) + l + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *HostsData) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Hosts) > 0 { + for _, e := range m.Hosts { + l = e.Size() + n += 1 + l + sovScore(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Location) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Lat != 0 { + n += 9 + } + if m.Lon != 0 { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *StorageStat) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.HostStats.Size() + n += 1 + l + sovScore(uint64(l)) + l = m.RenterStats.Size() + n += 1 + l + sovScore(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *StorageStat_HostStats) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Uptime != 0 { + n += 5 + } + if m.Score != 0 { + n += 5 + } + if m.UptimeScore != 0 { + n += 5 + } + if m.AgeScore != 0 { + n += 5 + } + if m.VersionScore != 0 { + n += 5 + } + if m.SpeedScore != 0 { + n += 5 + } + if m.UploadSpeedScore != 0 { + n += 5 + } + if m.DownloadSpeedScore != 0 { + n += 5 + } + if m.UptimeWeight != 0 { + n += 5 + } + if m.AgeWeight != 0 { + n += 5 + } + if m.VersionWeight != 0 { + n += 5 + } + if m.SpeedWeight != 0 { + n += 5 + } + if m.UploadSpeedWeight != 0 { + n += 5 + } + if m.DownloadSpeedWeight != 0 { + n += 5 + } + l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.LastUpdated) + n += 1 + l + sovScore(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *StorageStat_Host) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Online { + n += 2 + } + if m.StorageUsed != 0 { + n += 1 + sovScore(uint64(m.StorageUsed)) + } + if m.StorageCap != 0 { + n += 1 + sovScore(uint64(m.StorageCap)) + } + if m.StorageDiskTotal != 0 { + n += 1 + sovScore(uint64(m.StorageDiskTotal)) + } + if m.StorageDiskAvailable != 0 { + n += 1 + sovScore(uint64(m.StorageDiskAvailable)) + } + l = m.StorageStat_HostStats.Size() + n += 1 + l + sovScore(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *StorageStat_Renter) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Reserved) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Node) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.TableName) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + l = len(m.NodeId) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + l = len(m.BtfsVersion) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + if m.UpTime != 0 { + n += 1 + sovScore(uint64(m.UpTime)) + } + if m.StorageUsed != 0 { + n += 1 + sovScore(uint64(m.StorageUsed)) + } + if m.StorageVolumeCap != 0 { + n += 1 + sovScore(uint64(m.StorageVolumeCap)) + } + if m.MemoryUsed != 0 { + n += 1 + sovScore(uint64(m.MemoryUsed)) + } + if m.CpuUsed != 0 { + n += 9 + } + if m.Upload != 0 { + n += 1 + sovScore(uint64(m.Upload)) + } + if m.Download != 0 { + n += 1 + sovScore(uint64(m.Download)) + } + if m.TotalUpload != 0 { + n += 1 + sovScore(uint64(m.TotalUpload)) + } + if m.TotalDownload != 0 { + n += 1 + sovScore(uint64(m.TotalDownload)) + } + if m.StoragePriceDeal != 0 { + n += 1 + sovScore(uint64(m.StoragePriceDeal)) + } + if m.BandwidthPriceDeal != 0 { + n += 1 + sovScore(uint64(m.BandwidthPriceDeal)) + } + l = m.Node_Settings.Size() + n += 1 + l + sovScore(uint64(l)) + if m.Reputation != 0 { + n += 10 + } + if m.BlocksUp != 0 { + n += 2 + sovScore(uint64(m.BlocksUp)) + } + if m.BlocksDown != 0 { + n += 2 + sovScore(uint64(m.BlocksDown)) + } + l = len(m.OsType) + if l > 0 { + n += 2 + l + sovScore(uint64(l)) + } + l = len(m.ArchType) + if l > 0 { + n += 2 + l + sovScore(uint64(l)) + } + l = len(m.CpuInfo) + if l > 0 { + n += 2 + l + sovScore(uint64(l)) + } + if m.PeersConnected != 0 { + n += 2 + sovScore(uint64(m.PeersConnected)) + } + l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.TimeCreated) + n += 2 + l + sovScore(uint64(l)) + l = len(m.HVal) + if l > 0 { + n += 2 + l + sovScore(uint64(l)) + } + l = m.Node_Geo.Size() + n += 2 + l + sovScore(uint64(l)) + l = m.Node_ExperimentalFlags.Size() + n += 2 + l + sovScore(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Node_Settings) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.StoragePriceAsk != 0 { + n += 1 + sovScore(uint64(m.StoragePriceAsk)) + } + if m.BandwidthPriceAsk != 0 { + n += 1 + sovScore(uint64(m.BandwidthPriceAsk)) + } + if m.StorageTimeMin != 0 { + n += 1 + sovScore(uint64(m.StorageTimeMin)) + } + if m.BandwidthLimit != 0 { + n += 9 + } + if m.CollateralStake != 0 { + n += 1 + sovScore(uint64(m.CollateralStake)) + } + if m.StoragePriceDefault != 0 { + n += 1 + sovScore(uint64(m.StoragePriceDefault)) + } + if m.CustomizedPricing { + n += 2 + } + if len(m.Roles) > 0 { + l = 0 + for _, e := range m.Roles { + l += sovScore(uint64(e)) + } + n += 1 + sovScore(uint64(l)) + l + } + if m.RepairPriceDefault != 0 { + n += 1 + sovScore(uint64(m.RepairPriceDefault)) + } + if m.RepairPriceCustomized != 0 { + n += 1 + sovScore(uint64(m.RepairPriceCustomized)) + } + if m.RepairCustomizedPricing { + n += 2 + } + if m.ChallengePriceDefault != 0 { + n += 1 + sovScore(uint64(m.ChallengePriceDefault)) + } + if m.ChallengePriceCustomized != 0 { + n += 1 + sovScore(uint64(m.ChallengePriceCustomized)) + } + if m.ChallengeCustomizedPricing { + n += 2 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Node_Geo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.CountryShort) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + l = len(m.Region) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + if m.Latitude != 0 { + n += 5 + } + if m.Longitude != 0 { + n += 5 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Node_ExperimentalFlags) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Analytics { + n += 2 + } + if m.FilestoreEnabled { + n += 2 + } + if m.HostsSyncEnabled { + n += 2 + } + l = len(m.HostsSyncMode) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + if m.Libp2PStreamMounting { + n += 2 + } + if m.P2PHttpProxy { + n += 2 + } + if m.PreferTls { + n += 2 + } + if m.Quic { + n += 2 + } + if m.RemoveOnUnpin { + n += 2 + } + if m.ShardingEnabled { + n += 2 + } + if m.StorageClientEnabled { + n += 2 + } + if m.StorageHostEnabled { + n += 2 + } + if m.StrategicProviding { + n += 2 + } + if m.UrlStoreEnabled { + n += 2 + } + if m.DisableAutoUpdate { + n += 2 + } + if m.GraphsyncEnabled { + n += 3 + } + if m.RepairHostEnabled { + n += 3 + } + if m.ChallengeHostEnabled { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovScore(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozScore(x uint64) (n int) { + return sovScore(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *NodesReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NodesReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NodesReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NodeId = append(m.NodeId, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequesterId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequesterId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SettingsReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SettingsReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SettingsReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RespSize", wireType) + } + m.RespSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RespSize |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SettingsResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SettingsResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SettingsResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= ResponseCode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.ResponseTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SettingsData", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SettingsData == nil { + m.SettingsData = &SettingsData{} + } + if err := m.SettingsData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SettingsData) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SettingsData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SettingsData: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field StoragePriceAsk", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.StoragePriceAsk = float64(math.Float64frombits(v)) + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field BandwidthPriceAsk", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.BandwidthPriceAsk = float64(math.Float64frombits(v)) + case 3: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageTimeMin", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.StorageTimeMin = float64(math.Float64frombits(v)) + case 4: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field BandwidthLimit", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.BandwidthLimit = float64(math.Float64frombits(v)) + case 5: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field CollateralStake", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.CollateralStake = float64(math.Float64frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HostsReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HostsReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HostsReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RespSize", wireType) + } + m.RespSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RespSize |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) + } + m.Mode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Mode |= HostsReq_Mode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RolesHostsReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RolesHostsReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RolesHostsReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RespSize", wireType) + } + m.RespSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RespSize |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) + } + m.Role = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Role |= NodeRole(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HostsResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HostsResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HostsResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= ResponseCode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hosts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Hosts == nil { + m.Hosts = &HostsData{} + } + if err := m.Hosts.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RespSize", wireType) + } + m.RespSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RespSize |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Mode = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.ResponseTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StatsReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StatsReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StatsReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StatsResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StatsResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StatsResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= ResponseCode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.ResponseTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageStat_HostStats", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.StorageStat_HostStats.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Host) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Host: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Host: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NodeId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreateTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.CreateTimestamp, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdateTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.UpdateTimestamp, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Region", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Region = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BtfsVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BtfsVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Score", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Score = float32(math.Float32frombits(v)) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HeartBeats", wireType) + } + m.HeartBeats = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HeartBeats |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Uptime", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Uptime = float32(math.Float32frombits(v)) + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Age", wireType) + } + m.Age = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Age |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Reputation", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Reputation = float32(math.Float32frombits(v)) + case 11: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field UploadAverage", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.UploadAverage = float32(math.Float32frombits(v)) + case 12: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field UploadVariance", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.UploadVariance = float32(math.Float32frombits(v)) + case 13: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field DownloadAverage", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.DownloadAverage = float32(math.Float32frombits(v)) + case 14: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field DownloadVariance", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.DownloadVariance = float32(math.Float32frombits(v)) + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Location", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Location.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 16: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageVolumeCap", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.StorageVolumeCap = float32(math.Float32frombits(v)) + case 17: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageVolumeLeft", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.StorageVolumeLeft = float32(math.Float32frombits(v)) + case 18: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageTimeMin", wireType) + } + m.StorageTimeMin = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageTimeMin |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 19: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StoragePriceAsk", wireType) + } + m.StoragePriceAsk = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StoragePriceAsk |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 20: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StoragePriceEst", wireType) + } + m.StoragePriceEst = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StoragePriceEst |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 21: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field BandwidthLimit", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.BandwidthLimit = float64(math.Float64frombits(v)) + case 22: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BandwidthPriceAsk", wireType) + } + m.BandwidthPriceAsk = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BandwidthPriceAsk |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 23: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BandwidthPriceEst", wireType) + } + m.BandwidthPriceEst = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BandwidthPriceEst |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 24: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CollateralStake", wireType) + } + m.CollateralStake = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CollateralStake |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 25: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CollateralLost", wireType) + } + m.CollateralLost = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CollateralLost |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 26: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CollateralBurn", wireType) + } + m.CollateralBurn = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CollateralBurn |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 27: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CountryShort", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CountryShort = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 28: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Node_ExperimentalFlags", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Node_ExperimentalFlags.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 29: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Discovery", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Discovery = float32(math.Float32frombits(v)) + case 30: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field UptimeScore", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.UptimeScore = float32(math.Float32frombits(v)) + case 31: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field AgeScore", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.AgeScore = float32(math.Float32frombits(v)) + case 32: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field VersionScore", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.VersionScore = float32(math.Float32frombits(v)) + case 33: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field UploadSpeedScore", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.UploadSpeedScore = float32(math.Float32frombits(v)) + case 34: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field DownloadSpeedScore", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.DownloadSpeedScore = float32(math.Float32frombits(v)) + case 35: + if wireType == 0 { + var v NodeRole + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= NodeRole(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Roles = append(m.Roles, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.Roles) == 0 { + m.Roles = make([]NodeRole, 0, elementCount) + } + for iNdEx < postIndex { + var v NodeRole + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= NodeRole(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Roles = append(m.Roles, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Roles", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HostsData) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HostsData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HostsData: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hosts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hosts = append(m.Hosts, &Host{}) + if err := m.Hosts[len(m.Hosts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Location) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Location: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Location: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Lat", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Lat = float64(math.Float64frombits(v)) + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Lon", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Lon = float64(math.Float64frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StorageStat) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StorageStat: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StorageStat: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HostStats", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.HostStats.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RenterStats", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.RenterStats.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StorageStat_HostStats) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HostStats: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HostStats: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Uptime", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Uptime = float32(math.Float32frombits(v)) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Score", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Score = float32(math.Float32frombits(v)) + case 3: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field UptimeScore", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.UptimeScore = float32(math.Float32frombits(v)) + case 4: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field AgeScore", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.AgeScore = float32(math.Float32frombits(v)) + case 5: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field VersionScore", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.VersionScore = float32(math.Float32frombits(v)) + case 6: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field SpeedScore", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.SpeedScore = float32(math.Float32frombits(v)) + case 7: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field UploadSpeedScore", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.UploadSpeedScore = float32(math.Float32frombits(v)) + case 8: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field DownloadSpeedScore", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.DownloadSpeedScore = float32(math.Float32frombits(v)) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field UptimeWeight", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.UptimeWeight = float32(math.Float32frombits(v)) + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field AgeWeight", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.AgeWeight = float32(math.Float32frombits(v)) + case 11: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field VersionWeight", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.VersionWeight = float32(math.Float32frombits(v)) + case 12: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field SpeedWeight", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.SpeedWeight = float32(math.Float32frombits(v)) + case 13: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field UploadSpeedWeight", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.UploadSpeedWeight = float32(math.Float32frombits(v)) + case 14: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field DownloadSpeedWeight", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.DownloadSpeedWeight = float32(math.Float32frombits(v)) + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastUpdated", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.LastUpdated, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StorageStat_Host) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Host: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Host: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Online", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Online = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageUsed", wireType) + } + m.StorageUsed = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageUsed |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageCap", wireType) + } + m.StorageCap = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageCap |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageDiskTotal", wireType) + } + m.StorageDiskTotal = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageDiskTotal |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageDiskAvailable", wireType) + } + m.StorageDiskAvailable = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageDiskAvailable |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageStat_HostStats", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.StorageStat_HostStats.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StorageStat_Renter) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Renter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Renter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reserved", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Reserved = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Node) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Node: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Node: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TableName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TableName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NodeId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BtfsVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BtfsVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UpTime", wireType) + } + m.UpTime = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.UpTime |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageUsed", wireType) + } + m.StorageUsed = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageUsed |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageVolumeCap", wireType) + } + m.StorageVolumeCap = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageVolumeCap |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemoryUsed", wireType) + } + m.MemoryUsed = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MemoryUsed |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field CpuUsed", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.CpuUsed = float64(math.Float64frombits(v)) + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Upload", wireType) + } + m.Upload = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Upload |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Download", wireType) + } + m.Download = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Download |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalUpload", wireType) + } + m.TotalUpload = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TotalUpload |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalDownload", wireType) + } + m.TotalDownload = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TotalDownload |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StoragePriceDeal", wireType) + } + m.StoragePriceDeal = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StoragePriceDeal |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BandwidthPriceDeal", wireType) + } + m.BandwidthPriceDeal = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BandwidthPriceDeal |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Node_Settings", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Node_Settings.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 16: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Reputation", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Reputation = float64(math.Float64frombits(v)) + case 17: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlocksUp", wireType) + } + m.BlocksUp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlocksUp |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 18: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlocksDown", wireType) + } + m.BlocksDown = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlocksDown |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OsType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OsType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 20: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ArchType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ArchType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 21: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CpuInfo", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CpuInfo = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 23: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PeersConnected", wireType) + } + m.PeersConnected = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PeersConnected |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 24: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeCreated", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.TimeCreated, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 25: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HVal", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HVal = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 26: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Node_Geo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Node_Geo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 27: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Node_ExperimentalFlags", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Node_ExperimentalFlags.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Node_Settings) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Settings: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Settings: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StoragePriceAsk", wireType) + } + m.StoragePriceAsk = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StoragePriceAsk |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BandwidthPriceAsk", wireType) + } + m.BandwidthPriceAsk = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BandwidthPriceAsk |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageTimeMin", wireType) + } + m.StorageTimeMin = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageTimeMin |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field BandwidthLimit", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.BandwidthLimit = float64(math.Float64frombits(v)) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CollateralStake", wireType) + } + m.CollateralStake = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CollateralStake |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StoragePriceDefault", wireType) + } + m.StoragePriceDefault = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StoragePriceDefault |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CustomizedPricing", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.CustomizedPricing = bool(v != 0) + case 8: + if wireType == 0 { + var v NodeRole + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= NodeRole(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Roles = append(m.Roles, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.Roles) == 0 { + m.Roles = make([]NodeRole, 0, elementCount) + } + for iNdEx < postIndex { + var v NodeRole + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= NodeRole(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Roles = append(m.Roles, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Roles", wireType) + } + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RepairPriceDefault", wireType) + } + m.RepairPriceDefault = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RepairPriceDefault |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RepairPriceCustomized", wireType) + } + m.RepairPriceCustomized = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RepairPriceCustomized |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RepairCustomizedPricing", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.RepairCustomizedPricing = bool(v != 0) + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ChallengePriceDefault", wireType) + } + m.ChallengePriceDefault = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ChallengePriceDefault |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ChallengePriceCustomized", wireType) + } + m.ChallengePriceCustomized = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ChallengePriceCustomized |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ChallengeCustomizedPricing", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ChallengeCustomizedPricing = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Node_Geo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Geo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Geo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CountryShort", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CountryShort = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Region", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Region = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Latitude", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Latitude = float32(math.Float32frombits(v)) + case 4: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Longitude", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Longitude = float32(math.Float32frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Node_ExperimentalFlags) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExperimentalFlags: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExperimentalFlags: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Analytics", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Analytics = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FilestoreEnabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.FilestoreEnabled = bool(v != 0) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HostsSyncEnabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.HostsSyncEnabled = bool(v != 0) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HostsSyncMode", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HostsSyncMode = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Libp2PStreamMounting", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Libp2PStreamMounting = bool(v != 0) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field P2PHttpProxy", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.P2PHttpProxy = bool(v != 0) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PreferTls", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.PreferTls = bool(v != 0) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Quic", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Quic = bool(v != 0) + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RemoveOnUnpin", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.RemoveOnUnpin = bool(v != 0) + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ShardingEnabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ShardingEnabled = bool(v != 0) + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageClientEnabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.StorageClientEnabled = bool(v != 0) + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageHostEnabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.StorageHostEnabled = bool(v != 0) + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StrategicProviding", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.StrategicProviding = bool(v != 0) + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UrlStoreEnabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.UrlStoreEnabled = bool(v != 0) + case 15: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DisableAutoUpdate", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.DisableAutoUpdate = bool(v != 0) + case 16: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GraphsyncEnabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.GraphsyncEnabled = bool(v != 0) + case 17: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RepairHostEnabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.RepairHostEnabled = bool(v != 0) + case 18: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ChallengeHostEnabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ChallengeHostEnabled = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipScore(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowScore + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowScore + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowScore + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthScore + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupScore + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthScore + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthScore = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowScore = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupScore = fmt.Errorf("proto: unexpected end of group") +) diff --git a/protos/score/score.proto b/protos/score/score.proto new file mode 100644 index 0000000..1bbc68d --- /dev/null +++ b/protos/score/score.proto @@ -0,0 +1,313 @@ +syntax = "proto3"; + +package score; + +// gogo plugin toggles +option (gogoproto.gogoproto_import) = true; +option (gogoproto.goproto_registration) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.messagename_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.unmarshaler_all) = true; +// golang option +option go_package = "score"; +// java options +option java_multiple_files = true; +option java_outer_classname = "ScoreProto"; +option java_package = "io.btfs.score"; + +import "github.com/tron-us/protobuf/gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; + +// HubQueryService are interface for score-query +service ScoreService { + rpc GetSettings(SettingsReq) returns (SettingsResp); + rpc GetHosts(HostsReq) returns (HostsResp); + rpc GetStats(StatsReq) returns (StatsResp); + rpc QueryNodes(NodesReq) returns (HostsResp); //used by internal services + rpc GetHostsByRoles(RolesHostsReq) returns (HostsResp); +} + +message NodesReq { + repeated string node_id = 1; + string requester_id = 2; + bytes signature = 3; +} + +message SettingsReq { + string id = 1; + int32 resp_size = 2; +} + +enum ResponseCode { + SUCCESS = 0; + SIGNATURE_FORMAT_ERROR = 1; + COMPUTE_ADDRESS_ERROR = 2; + TIMEOUT_ERROR = 3; + OTHER_ERROR = 20; +} + +message SettingsResp { + ResponseCode code = 1; + string message = 2; + google.protobuf.Timestamp response_time = 3 [ + (gogoproto.nullable) = false, + (gogoproto.stdtime) = true + ]; + SettingsData settings_data = 4; +} + +message SettingsData { + double storage_price_ask = 1; + double bandwidth_price_ask = 2; + double storage_time_min = 3; + double bandwidth_limit = 4; + double collateral_stake = 5; +} + +message HostsReq { + string id = 1; + int32 resp_size = 2; + enum Mode { + SCORE = 0; // default + GEO = 1; + REP = 2; + PRICE = 3; + SPEED = 4; + TESTNET = 5; + } + Mode mode = 3; + string version = 4; +} + +message RolesHostsReq { + string id = 1; + int32 resp_size = 2; + NodeRole role = 3; +} + +message HostsResp { + ResponseCode code = 1; + string message = 2; + HostsData hosts = 3; + int32 resp_size = 4; + string mode = 5; + google.protobuf.Timestamp response_time = 6 [ + (gogoproto.nullable) = false, + (gogoproto.stdtime) = true + ]; +} + +message StatsReq { + string id = 1; +} + +message StatsResp { + ResponseCode code = 1; + string message = 2; + google.protobuf.Timestamp response_time = 3 [ + (gogoproto.nullable) = false, + (gogoproto.stdtime) = true + ]; + StorageStat.HostStats stats = 4 [ + (gogoproto.embed) = true, + (gogoproto.nullable) = false + ]; +} + +message Host { + option (gogoproto.json_no_omit_empty) = true; + string node_id = 1; + google.protobuf.Timestamp create_timestamp = 2 [ + (gogoproto.nullable) = false, + (gogoproto.stdtime) = true + ]; + google.protobuf.Timestamp update_timestamp = 3 [ + (gogoproto.nullable) = false, + (gogoproto.stdtime) = true + ]; + string region = 4; + string btfs_version = 5; + float score = 6; + uint64 heart_beats = 7; + float uptime = 8; + uint64 age = 9; + float reputation = 10; + float upload_average = 11; + float upload_variance = 12; + float download_average = 13; + float download_variance = 14; + Location location = 15 [(gogoproto.nullable) = false]; + float storage_volume_cap = 16; + float storage_volume_left = 17; + uint64 storage_time_min = 18; + uint64 storage_price_ask = 19; + uint64 storage_price_est = 20; + double bandwidth_limit = 21; + uint64 bandwidth_price_ask = 22; + uint64 bandwidth_price_est = 23; + uint64 collateral_stake = 24; + uint64 collateral_lost = 25; + uint64 collateral_burn = 26; + string country_short = 27; //if it is "", means no data related node_id find + Node.ExperimentalFlags flg = 28 [ + (gogoproto.embed) = true, + (gogoproto.nullable) = false + ]; + float discovery = 29; + float uptime_score = 30; + float age_score = 31; + float version_score = 32; + float upload_speed_score = 33; + float download_speed_score = 34; + repeated NodeRole roles = 35 [(gogoproto.pgtag) = "roles,array"]; +} + +message HostsData { + repeated Host hosts = 1; +} + +message Location { + double lat = 1; + double lon = 2; +} + +//------------node + +enum NodeRole { + RENTER = 0; + HOST = 1; + REPAIRER = 2; + CHALLENGER = 3; + NETWORK_CHECKER = 4; + REPUTATION_CHECKER = 5; + CDN_PROVIDER = 6; + OTHER = 20; +} + +message StorageStat { + option (gogoproto.json_no_omit_empty) = true; + message HostStats { + option (gogoproto.json_no_omit_empty) = true; + float uptime = 1; + float score = 2; + float uptime_score = 3; + float age_score = 4; + float version_score = 5; + float speed_score = 6; + float upload_speed_score = 7; + float download_speed_score = 8; + float uptime_weight = 9; + float age_weight = 10; + float version_weight = 11; + float speed_weight = 12; + float upload_speed_weight = 13; + float download_speed_weight = 14; + google.protobuf.Timestamp last_updated = 15 [ + (gogoproto.nullable) = false, + (gogoproto.stdtime) = true + ]; + } + message Host { + option (gogoproto.json_no_omit_empty) = true; + bool online = 1; + int64 storage_used = 2; + int64 storage_cap = 3; + int64 storage_disk_total = 4; + int64 storage_disk_available = 5; + HostStats stats = 6 [ + (gogoproto.embed) = true, + (gogoproto.jsontag) = "", + (gogoproto.nullable) = false + ]; + } + message Renter { + option (gogoproto.json_no_omit_empty) = true; + string reserved = 1; + } + Host host_stats = 1 [(gogoproto.nullable) = false]; + Renter renter_stats = 2 [(gogoproto.nullable) = false]; +} + +message Node { + message Settings { + uint64 storage_price_ask = 1; + uint64 bandwidth_price_ask = 2; + uint64 storage_time_min = 3; + double bandwidth_limit = 4; + uint64 collateral_stake = 5; + uint64 storage_price_default = 6; // network default + bool customized_pricing = 7; // whether to use storage_price_ask + repeated NodeRole roles = 8 [(gogoproto.pgtag) = "roles,array"]; + uint64 repair_price_default = 9; + uint64 repair_price_customized = 10; + bool repair_customized_pricing = 11; + uint64 challenge_price_default = 12; + uint64 challenge_price_customized = 13; + bool challenge_customized_pricing = 14; + } + message Geo { + string country_short = 1; + string region = 2; + float latitude = 3; + float longitude = 4; + } + message ExperimentalFlags { + bool analytics = 1; + bool filestore_enabled = 2; + bool hosts_sync_enabled = 3; + string hosts_sync_mode = 4; + bool libp2p_stream_mounting = 5; + bool p2p_http_proxy = 6; + bool prefer_tls = 7; // deprecated + bool quic = 8; + bool remove_on_unpin = 9; + bool sharding_enabled = 10; + bool storage_client_enabled = 11; + bool storage_host_enabled = 12; + bool strategic_providing = 13; + bool url_store_enabled = 14; + bool disable_auto_update = 15; + bool graphsync_enabled = 16; + bool repair_host_enabled = 17; + bool challenge_host_enabled = 18; + } + string table_name = 1 [(gogoproto.moretags) = "pg:\"node_metrics,alias:t,discard_unknown_columns\""]; + string node_id = 2; + string btfs_version = 3; + uint64 up_time = 4; + uint64 storage_used = 5; + uint64 storage_volume_cap = 6; + uint64 memory_used = 7; + double cpu_used = 8; + uint64 upload = 9; + uint64 download = 10; + uint64 total_upload = 11; + uint64 total_download = 12; + uint64 storage_price_deal = 13; + uint64 bandwidth_price_deal = 14; + Settings settings = 15 [ + (gogoproto.embed) = true, + (gogoproto.nullable) = false + ]; + double reputation = 16; + uint64 blocks_up = 17; + uint64 blocks_down = 18; + string os_type = 19; + string arch_type = 20; + string cpu_info = 21; + uint64 peers_connected = 23; + google.protobuf.Timestamp time_created = 24 [ + (gogoproto.nullable) = false, + (gogoproto.stdtime) = true + ]; + string h_val = 25; + Geo geo = 26 [ + (gogoproto.embed) = true, + (gogoproto.nullable) = false + ]; + ExperimentalFlags flg = 27 [ + (gogoproto.embed) = true, + (gogoproto.nullable) = false + ]; +} diff --git a/utils/grpc/client.go b/utils/grpc/client.go index eafbf49..adf4d33 100644 --- a/utils/grpc/client.go +++ b/utils/grpc/client.go @@ -6,6 +6,7 @@ import ( "errors" "fmt" "github.com/tron-us/go-btfs-common/protos/online" + "github.com/tron-us/go-btfs-common/protos/score" "net/url" "strconv" "strings" @@ -51,6 +52,8 @@ func (g *ClientBuilder) doWithContext(ctx context.Context, f interface{}) error return err } switch v := f.(type) { + case func(context.Context, score.ScoreServiceClient) error: + return wrapError("ScoreClient", v(ctx, score.NewScoreServiceClient(conn))) case func(context.Context, online.OnlineServiceClient) error: return wrapError("OnlineClient", v(ctx, online.NewOnlineServiceClient(conn))) case func(context.Context, statuspb.StatusServiceClient) error: diff --git a/utils/grpc/score.go b/utils/grpc/score.go new file mode 100644 index 0000000..1f1fb8d --- /dev/null +++ b/utils/grpc/score.go @@ -0,0 +1,19 @@ +package grpc + +import ( + "context" + "github.com/tron-us/go-btfs-common/protos/score" +) + +func ScoreClient(addr string) *ScoreClientBuilder { + return &ScoreClientBuilder{builder(addr)} +} + +type ScoreClientBuilder struct { + ClientBuilder +} + +func (g *ScoreClientBuilder) WithContext(ctx context.Context, f func(ctx context.Context, + client score.ScoreServiceClient) error) error { + return g.doWithContext(ctx, f) +} diff --git a/utils/grpc/setup_server.go b/utils/grpc/setup_server.go index cdae74e..867fc9b 100644 --- a/utils/grpc/setup_server.go +++ b/utils/grpc/setup_server.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "github.com/tron-us/go-btfs-common/protos/online" + "github.com/tron-us/go-btfs-common/protos/score" "net" "net/http" "os" @@ -56,6 +57,8 @@ type GrpcServer struct { func (s *GrpcServer) serverTypeToServerName(server interface{}) { switch t := server.(type) { + case score.ScoreServiceServer: + s.serverName = "score-server" case online.OnlineServiceServer: s.serverName = "online-server" case status.StatusServiceServer: @@ -176,6 +179,8 @@ func (s *GrpcServer) CreateHealthServer() *GrpcServer { func (s *GrpcServer) RegisterServer(server interface{}) *GrpcServer { switch server.(type) { + case score.ScoreServiceServer: + score.RegisterScoreServiceServer(s.server, server.(score.ScoreServiceServer)) case online.OnlineServiceServer: online.RegisterOnlineServiceServer(s.server, server.(online.OnlineServiceServer)) case status.StatusServiceServer: