UNPKG

@routerprotocol/chain-api

Version:

Router Chain API Query client with generated gRPC bindings.

265 lines (229 loc) 9.94 kB
// source: routerprotocol/routerchain/pricefeed/update_symbol_request_proposal.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 routerprotocol_routerchain_pricefeed_symbol_request_pb = require('../../../routerprotocol/routerchain/pricefeed/symbol_request_pb.js'); goog.object.extend(proto, routerprotocol_routerchain_pricefeed_symbol_request_pb); goog.exportSymbol('proto.routerprotocol.routerchain.pricefeed.UpdateSymbolRequestProposal', 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.UpdateSymbolRequestProposal = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.routerprotocol.routerchain.pricefeed.UpdateSymbolRequestProposal.repeatedFields_, null); }; goog.inherits(proto.routerprotocol.routerchain.pricefeed.UpdateSymbolRequestProposal, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.routerprotocol.routerchain.pricefeed.UpdateSymbolRequestProposal.displayName = 'proto.routerprotocol.routerchain.pricefeed.UpdateSymbolRequestProposal'; } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.routerprotocol.routerchain.pricefeed.UpdateSymbolRequestProposal.repeatedFields_ = [3]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.routerprotocol.routerchain.pricefeed.UpdateSymbolRequestProposal.prototype.toObject = function(opt_includeInstance) { return proto.routerprotocol.routerchain.pricefeed.UpdateSymbolRequestProposal.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.UpdateSymbolRequestProposal} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.routerprotocol.routerchain.pricefeed.UpdateSymbolRequestProposal.toObject = function(includeInstance, msg) { var f, obj = { title: jspb.Message.getFieldWithDefault(msg, 1, ""), description: jspb.Message.getFieldWithDefault(msg, 2, ""), symbolRequestsList: jspb.Message.toObjectList(msg.getSymbolRequestsList(), routerprotocol_routerchain_pricefeed_symbol_request_pb.SymbolRequest.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.UpdateSymbolRequestProposal} */ proto.routerprotocol.routerchain.pricefeed.UpdateSymbolRequestProposal.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.routerprotocol.routerchain.pricefeed.UpdateSymbolRequestProposal; return proto.routerprotocol.routerchain.pricefeed.UpdateSymbolRequestProposal.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.routerprotocol.routerchain.pricefeed.UpdateSymbolRequestProposal} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.routerprotocol.routerchain.pricefeed.UpdateSymbolRequestProposal} */ proto.routerprotocol.routerchain.pricefeed.UpdateSymbolRequestProposal.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setTitle(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setDescription(value); break; case 3: var value = new routerprotocol_routerchain_pricefeed_symbol_request_pb.SymbolRequest; reader.readMessage(value,routerprotocol_routerchain_pricefeed_symbol_request_pb.SymbolRequest.deserializeBinaryFromReader); msg.addSymbolRequests(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.routerprotocol.routerchain.pricefeed.UpdateSymbolRequestProposal.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.routerprotocol.routerchain.pricefeed.UpdateSymbolRequestProposal.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.UpdateSymbolRequestProposal} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.routerprotocol.routerchain.pricefeed.UpdateSymbolRequestProposal.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getTitle(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getDescription(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getSymbolRequestsList(); if (f.length > 0) { writer.writeRepeatedMessage( 3, f, routerprotocol_routerchain_pricefeed_symbol_request_pb.SymbolRequest.serializeBinaryToWriter ); } }; /** * optional string title = 1; * @return {string} */ proto.routerprotocol.routerchain.pricefeed.UpdateSymbolRequestProposal.prototype.getTitle = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.routerprotocol.routerchain.pricefeed.UpdateSymbolRequestProposal} returns this */ proto.routerprotocol.routerchain.pricefeed.UpdateSymbolRequestProposal.prototype.setTitle = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string description = 2; * @return {string} */ proto.routerprotocol.routerchain.pricefeed.UpdateSymbolRequestProposal.prototype.getDescription = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.routerprotocol.routerchain.pricefeed.UpdateSymbolRequestProposal} returns this */ proto.routerprotocol.routerchain.pricefeed.UpdateSymbolRequestProposal.prototype.setDescription = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * repeated SymbolRequest symbol_requests = 3; * @return {!Array<!proto.routerprotocol.routerchain.pricefeed.SymbolRequest>} */ proto.routerprotocol.routerchain.pricefeed.UpdateSymbolRequestProposal.prototype.getSymbolRequestsList = function() { return /** @type{!Array<!proto.routerprotocol.routerchain.pricefeed.SymbolRequest>} */ ( jspb.Message.getRepeatedWrapperField(this, routerprotocol_routerchain_pricefeed_symbol_request_pb.SymbolRequest, 3)); }; /** * @param {!Array<!proto.routerprotocol.routerchain.pricefeed.SymbolRequest>} value * @return {!proto.routerprotocol.routerchain.pricefeed.UpdateSymbolRequestProposal} returns this */ proto.routerprotocol.routerchain.pricefeed.UpdateSymbolRequestProposal.prototype.setSymbolRequestsList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 3, value); }; /** * @param {!proto.routerprotocol.routerchain.pricefeed.SymbolRequest=} opt_value * @param {number=} opt_index * @return {!proto.routerprotocol.routerchain.pricefeed.SymbolRequest} */ proto.routerprotocol.routerchain.pricefeed.UpdateSymbolRequestProposal.prototype.addSymbolRequests = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.routerprotocol.routerchain.pricefeed.SymbolRequest, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.routerprotocol.routerchain.pricefeed.UpdateSymbolRequestProposal} returns this */ proto.routerprotocol.routerchain.pricefeed.UpdateSymbolRequestProposal.prototype.clearSymbolRequestsList = function() { return this.setSymbolRequestsList([]); }; goog.object.extend(exports, proto.routerprotocol.routerchain.pricefeed);