UNPKG

@routerprotocol/chain-api

Version:

Router Chain API Query client with generated gRPC bindings.

445 lines (385 loc) 13.5 kB
// source: routerprotocol/routerchain/pricefeed/params.proto /** * @fileoverview * @enhanceable * @suppress {missingRequire} reports error on implicit type usages. * @suppress {messageConventions} JS Compiler reports an error if a variable or * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! /* eslint-disable */ // @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); goog.exportSymbol('proto.routerprotocol.routerchain.pricefeed.Params', 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.routerprotocol.routerchain.pricefeed.Params = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.routerprotocol.routerchain.pricefeed.Params.repeatedFields_, null); }; goog.inherits(proto.routerprotocol.routerchain.pricefeed.Params, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.routerprotocol.routerchain.pricefeed.Params.displayName = 'proto.routerprotocol.routerchain.pricefeed.Params'; } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.routerprotocol.routerchain.pricefeed.Params.repeatedFields_ = [9]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.routerprotocol.routerchain.pricefeed.Params.prototype.toObject = function(opt_includeInstance) { return proto.routerprotocol.routerchain.pricefeed.Params.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.routerprotocol.routerchain.pricefeed.Params} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.routerprotocol.routerchain.pricefeed.Params.toObject = function(includeInstance, msg) { var f, obj = { askCount: jspb.Message.getFieldWithDefault(msg, 1, 0), minCount: jspb.Message.getFieldWithDefault(msg, 2, 0), minDsCount: jspb.Message.getFieldWithDefault(msg, 3, 0), prepareGasBase: jspb.Message.getFieldWithDefault(msg, 4, 0), prepareGasEach: jspb.Message.getFieldWithDefault(msg, 5, 0), executeGasBase: jspb.Message.getFieldWithDefault(msg, 6, 0), executeGasEach: jspb.Message.getFieldWithDefault(msg, 7, 0), sourceChannel: jspb.Message.getFieldWithDefault(msg, 8, ""), feeLimitList: jspb.Message.toObjectList(msg.getFeeLimitList(), cosmos_base_v1beta1_coin_pb.Coin.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.routerprotocol.routerchain.pricefeed.Params} */ proto.routerprotocol.routerchain.pricefeed.Params.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.routerprotocol.routerchain.pricefeed.Params; return proto.routerprotocol.routerchain.pricefeed.Params.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.routerprotocol.routerchain.pricefeed.Params} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.routerprotocol.routerchain.pricefeed.Params} */ proto.routerprotocol.routerchain.pricefeed.Params.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.setAskCount(value); break; case 2: var value = /** @type {number} */ (reader.readUint64()); msg.setMinCount(value); break; case 3: var value = /** @type {number} */ (reader.readUint64()); msg.setMinDsCount(value); break; case 4: var value = /** @type {number} */ (reader.readUint64()); msg.setPrepareGasBase(value); break; case 5: var value = /** @type {number} */ (reader.readUint64()); msg.setPrepareGasEach(value); break; case 6: var value = /** @type {number} */ (reader.readUint64()); msg.setExecuteGasBase(value); break; case 7: var value = /** @type {number} */ (reader.readUint64()); msg.setExecuteGasEach(value); break; case 8: var value = /** @type {string} */ (reader.readString()); msg.setSourceChannel(value); break; case 9: var value = new cosmos_base_v1beta1_coin_pb.Coin; reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); msg.addFeeLimit(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.routerprotocol.routerchain.pricefeed.Params.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.routerprotocol.routerchain.pricefeed.Params.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.routerprotocol.routerchain.pricefeed.Params} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.routerprotocol.routerchain.pricefeed.Params.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getAskCount(); if (f !== 0) { writer.writeUint64( 1, f ); } f = message.getMinCount(); if (f !== 0) { writer.writeUint64( 2, f ); } f = message.getMinDsCount(); if (f !== 0) { writer.writeUint64( 3, f ); } f = message.getPrepareGasBase(); if (f !== 0) { writer.writeUint64( 4, f ); } f = message.getPrepareGasEach(); if (f !== 0) { writer.writeUint64( 5, f ); } f = message.getExecuteGasBase(); if (f !== 0) { writer.writeUint64( 6, f ); } f = message.getExecuteGasEach(); if (f !== 0) { writer.writeUint64( 7, f ); } f = message.getSourceChannel(); if (f.length > 0) { writer.writeString( 8, f ); } f = message.getFeeLimitList(); if (f.length > 0) { writer.writeRepeatedMessage( 9, f, cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter ); } }; /** * optional uint64 ask_count = 1; * @return {number} */ proto.routerprotocol.routerchain.pricefeed.Params.prototype.getAskCount = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.routerprotocol.routerchain.pricefeed.Params} returns this */ proto.routerprotocol.routerchain.pricefeed.Params.prototype.setAskCount = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional uint64 min_count = 2; * @return {number} */ proto.routerprotocol.routerchain.pricefeed.Params.prototype.getMinCount = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value * @return {!proto.routerprotocol.routerchain.pricefeed.Params} returns this */ proto.routerprotocol.routerchain.pricefeed.Params.prototype.setMinCount = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; /** * optional uint64 min_ds_count = 3; * @return {number} */ proto.routerprotocol.routerchain.pricefeed.Params.prototype.getMinDsCount = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value * @return {!proto.routerprotocol.routerchain.pricefeed.Params} returns this */ proto.routerprotocol.routerchain.pricefeed.Params.prototype.setMinDsCount = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; /** * optional uint64 prepare_gas_base = 4; * @return {number} */ proto.routerprotocol.routerchain.pricefeed.Params.prototype.getPrepareGasBase = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value * @return {!proto.routerprotocol.routerchain.pricefeed.Params} returns this */ proto.routerprotocol.routerchain.pricefeed.Params.prototype.setPrepareGasBase = function(value) { return jspb.Message.setProto3IntField(this, 4, value); }; /** * optional uint64 prepare_gas_each = 5; * @return {number} */ proto.routerprotocol.routerchain.pricefeed.Params.prototype.getPrepareGasEach = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** * @param {number} value * @return {!proto.routerprotocol.routerchain.pricefeed.Params} returns this */ proto.routerprotocol.routerchain.pricefeed.Params.prototype.setPrepareGasEach = function(value) { return jspb.Message.setProto3IntField(this, 5, value); }; /** * optional uint64 execute_gas_base = 6; * @return {number} */ proto.routerprotocol.routerchain.pricefeed.Params.prototype.getExecuteGasBase = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** * @param {number} value * @return {!proto.routerprotocol.routerchain.pricefeed.Params} returns this */ proto.routerprotocol.routerchain.pricefeed.Params.prototype.setExecuteGasBase = function(value) { return jspb.Message.setProto3IntField(this, 6, value); }; /** * optional uint64 execute_gas_each = 7; * @return {number} */ proto.routerprotocol.routerchain.pricefeed.Params.prototype.getExecuteGasEach = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** * @param {number} value * @return {!proto.routerprotocol.routerchain.pricefeed.Params} returns this */ proto.routerprotocol.routerchain.pricefeed.Params.prototype.setExecuteGasEach = function(value) { return jspb.Message.setProto3IntField(this, 7, value); }; /** * optional string source_channel = 8; * @return {string} */ proto.routerprotocol.routerchain.pricefeed.Params.prototype.getSourceChannel = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); }; /** * @param {string} value * @return {!proto.routerprotocol.routerchain.pricefeed.Params} returns this */ proto.routerprotocol.routerchain.pricefeed.Params.prototype.setSourceChannel = function(value) { return jspb.Message.setProto3StringField(this, 8, value); }; /** * repeated cosmos.base.v1beta1.Coin fee_limit = 9; * @return {!Array<!proto.cosmos.base.v1beta1.Coin>} */ proto.routerprotocol.routerchain.pricefeed.Params.prototype.getFeeLimitList = function() { return /** @type{!Array<!proto.cosmos.base.v1beta1.Coin>} */ ( jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 9)); }; /** * @param {!Array<!proto.cosmos.base.v1beta1.Coin>} value * @return {!proto.routerprotocol.routerchain.pricefeed.Params} returns this */ proto.routerprotocol.routerchain.pricefeed.Params.prototype.setFeeLimitList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 9, value); }; /** * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value * @param {number=} opt_index * @return {!proto.cosmos.base.v1beta1.Coin} */ proto.routerprotocol.routerchain.pricefeed.Params.prototype.addFeeLimit = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.routerprotocol.routerchain.pricefeed.Params} returns this */ proto.routerprotocol.routerchain.pricefeed.Params.prototype.clearFeeLimitList = function() { return this.setFeeLimitList([]); }; goog.object.extend(exports, proto.routerprotocol.routerchain.pricefeed);