UNPKG

@routerprotocol/chain-api

Version:

Router Chain API Query client with generated gRPC bindings.

341 lines (294 loc) 12.5 kB
// source: routerprotocol/routerchain/pricefeed/packet.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')(); goog.exportSymbol('proto.routerprotocol.routerchain.pricefeed.NoData', null, global); goog.exportSymbol('proto.routerprotocol.routerchain.pricefeed.PricefeedPacketData', null, global); goog.exportSymbol('proto.routerprotocol.routerchain.pricefeed.PricefeedPacketData.PacketCase', 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.PricefeedPacketData = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.routerprotocol.routerchain.pricefeed.PricefeedPacketData.oneofGroups_); }; goog.inherits(proto.routerprotocol.routerchain.pricefeed.PricefeedPacketData, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.routerprotocol.routerchain.pricefeed.PricefeedPacketData.displayName = 'proto.routerprotocol.routerchain.pricefeed.PricefeedPacketData'; } /** * 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.NoData = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.routerprotocol.routerchain.pricefeed.NoData, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.routerprotocol.routerchain.pricefeed.NoData.displayName = 'proto.routerprotocol.routerchain.pricefeed.NoData'; } /** * Oneof group definitions for this message. Each group defines the field * numbers belonging to that group. When of these fields' value is set, all * other fields in the group are cleared. During deserialization, if multiple * fields are encountered for a group, only the last value seen will be kept. * @private {!Array<!Array<number>>} * @const */ proto.routerprotocol.routerchain.pricefeed.PricefeedPacketData.oneofGroups_ = [[1]]; /** * @enum {number} */ proto.routerprotocol.routerchain.pricefeed.PricefeedPacketData.PacketCase = { PACKET_NOT_SET: 0, NODATA: 1 }; /** * @return {proto.routerprotocol.routerchain.pricefeed.PricefeedPacketData.PacketCase} */ proto.routerprotocol.routerchain.pricefeed.PricefeedPacketData.prototype.getPacketCase = function() { return /** @type {proto.routerprotocol.routerchain.pricefeed.PricefeedPacketData.PacketCase} */(jspb.Message.computeOneofCase(this, proto.routerprotocol.routerchain.pricefeed.PricefeedPacketData.oneofGroups_[0])); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.routerprotocol.routerchain.pricefeed.PricefeedPacketData.prototype.toObject = function(opt_includeInstance) { return proto.routerprotocol.routerchain.pricefeed.PricefeedPacketData.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.PricefeedPacketData} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.routerprotocol.routerchain.pricefeed.PricefeedPacketData.toObject = function(includeInstance, msg) { var f, obj = { nodata: (f = msg.getNodata()) && proto.routerprotocol.routerchain.pricefeed.NoData.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.routerprotocol.routerchain.pricefeed.PricefeedPacketData} */ proto.routerprotocol.routerchain.pricefeed.PricefeedPacketData.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.routerprotocol.routerchain.pricefeed.PricefeedPacketData; return proto.routerprotocol.routerchain.pricefeed.PricefeedPacketData.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.routerprotocol.routerchain.pricefeed.PricefeedPacketData} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.routerprotocol.routerchain.pricefeed.PricefeedPacketData} */ proto.routerprotocol.routerchain.pricefeed.PricefeedPacketData.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.routerprotocol.routerchain.pricefeed.NoData; reader.readMessage(value,proto.routerprotocol.routerchain.pricefeed.NoData.deserializeBinaryFromReader); msg.setNodata(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.routerprotocol.routerchain.pricefeed.PricefeedPacketData.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.routerprotocol.routerchain.pricefeed.PricefeedPacketData.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.PricefeedPacketData} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.routerprotocol.routerchain.pricefeed.PricefeedPacketData.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getNodata(); if (f != null) { writer.writeMessage( 1, f, proto.routerprotocol.routerchain.pricefeed.NoData.serializeBinaryToWriter ); } }; /** * optional NoData noData = 1; * @return {?proto.routerprotocol.routerchain.pricefeed.NoData} */ proto.routerprotocol.routerchain.pricefeed.PricefeedPacketData.prototype.getNodata = function() { return /** @type{?proto.routerprotocol.routerchain.pricefeed.NoData} */ ( jspb.Message.getWrapperField(this, proto.routerprotocol.routerchain.pricefeed.NoData, 1)); }; /** * @param {?proto.routerprotocol.routerchain.pricefeed.NoData|undefined} value * @return {!proto.routerprotocol.routerchain.pricefeed.PricefeedPacketData} returns this */ proto.routerprotocol.routerchain.pricefeed.PricefeedPacketData.prototype.setNodata = function(value) { return jspb.Message.setOneofWrapperField(this, 1, proto.routerprotocol.routerchain.pricefeed.PricefeedPacketData.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.routerprotocol.routerchain.pricefeed.PricefeedPacketData} returns this */ proto.routerprotocol.routerchain.pricefeed.PricefeedPacketData.prototype.clearNodata = function() { return this.setNodata(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.routerprotocol.routerchain.pricefeed.PricefeedPacketData.prototype.hasNodata = function() { return jspb.Message.getField(this, 1) != 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_<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.NoData.prototype.toObject = function(opt_includeInstance) { return proto.routerprotocol.routerchain.pricefeed.NoData.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.NoData} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.routerprotocol.routerchain.pricefeed.NoData.toObject = function(includeInstance, msg) { var f, obj = { }; 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.NoData} */ proto.routerprotocol.routerchain.pricefeed.NoData.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.routerprotocol.routerchain.pricefeed.NoData; return proto.routerprotocol.routerchain.pricefeed.NoData.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.routerprotocol.routerchain.pricefeed.NoData} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.routerprotocol.routerchain.pricefeed.NoData} */ proto.routerprotocol.routerchain.pricefeed.NoData.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.routerprotocol.routerchain.pricefeed.NoData.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.routerprotocol.routerchain.pricefeed.NoData.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.NoData} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.routerprotocol.routerchain.pricefeed.NoData.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; goog.object.extend(exports, proto.routerprotocol.routerchain.pricefeed);