// source: config/chainmaker_server.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.config.ChainMakerVersionRequest', null, global); goog.exportSymbol('proto.config.ChainMakerVersionResponse', 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.config.ChainMakerVersionRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.config.ChainMakerVersionRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.config.ChainMakerVersionRequest.displayName = 'proto.config.ChainMakerVersionRequest'; } /** * 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.config.ChainMakerVersionResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.config.ChainMakerVersionResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.config.ChainMakerVersionResponse.displayName = 'proto.config.ChainMakerVersionResponse'; } 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.config.ChainMakerVersionRequest.prototype.toObject = function(opt_includeInstance) { return proto.config.ChainMakerVersionRequest.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.config.ChainMakerVersionRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.config.ChainMakerVersionRequest.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.config.ChainMakerVersionRequest} */ proto.config.ChainMakerVersionRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.config.ChainMakerVersionRequest; return proto.config.ChainMakerVersionRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.config.ChainMakerVersionRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.config.ChainMakerVersionRequest} */ proto.config.ChainMakerVersionRequest.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.config.ChainMakerVersionRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.config.ChainMakerVersionRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.config.ChainMakerVersionRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.config.ChainMakerVersionRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; 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.config.ChainMakerVersionResponse.prototype.toObject = function(opt_includeInstance) { return proto.config.ChainMakerVersionResponse.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.config.ChainMakerVersionResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.config.ChainMakerVersionResponse.toObject = function(includeInstance, msg) { var f, obj = { code: jspb.Message.getFieldWithDefault(msg, 1, 0), message: jspb.Message.getFieldWithDefault(msg, 2, ""), version: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.config.ChainMakerVersionResponse} */ proto.config.ChainMakerVersionResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.config.ChainMakerVersionResponse; return proto.config.ChainMakerVersionResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.config.ChainMakerVersionResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.config.ChainMakerVersionResponse} */ proto.config.ChainMakerVersionResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readInt32()); msg.setCode(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setMessage(value); break; case 3: 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.config.ChainMakerVersionResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.config.ChainMakerVersionResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.config.ChainMakerVersionResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.config.ChainMakerVersionResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getCode(); if (f !== 0) { writer.writeInt32( 1, f ); } f = message.getMessage(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getVersion(); if (f.length > 0) { writer.writeString( 3, f ); } }; /** * optional int32 code = 1; * @return {number} */ proto.config.ChainMakerVersionResponse.prototype.getCode = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.config.ChainMakerVersionResponse} returns this */ proto.config.ChainMakerVersionResponse.prototype.setCode = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional string message = 2; * @return {string} */ proto.config.ChainMakerVersionResponse.prototype.getMessage = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.config.ChainMakerVersionResponse} returns this */ proto.config.ChainMakerVersionResponse.prototype.setMessage = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string version = 3; * @return {string} */ proto.config.ChainMakerVersionResponse.prototype.getVersion = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.config.ChainMakerVersionResponse} returns this */ proto.config.ChainMakerVersionResponse.prototype.setVersion = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; goog.object.extend(exports, proto.config);