UNPKG

@bandprotocol/bandchain.js

Version:

Library for interacting with BandChain in browser and Node.js environments

724 lines (680 loc) 22.3 kB
// source: cosmos/app/v1alpha1/module.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 google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js') goog.object.extend(proto, google_protobuf_descriptor_pb) goog.exportSymbol('proto.cosmos.app.v1alpha1.MigrateFromInfo', null, global) goog.exportSymbol('proto.cosmos.app.v1alpha1.ModuleDescriptor', null, global) goog.exportSymbol('proto.cosmos.app.v1alpha1.PackageReference', null, global) goog.exportSymbol('proto.cosmos.app.v1alpha1.module', 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.cosmos.app.v1alpha1.ModuleDescriptor = function (opt_data) { jspb.Message.initialize( this, opt_data, 0, -1, proto.cosmos.app.v1alpha1.ModuleDescriptor.repeatedFields_, null, ) } goog.inherits(proto.cosmos.app.v1alpha1.ModuleDescriptor, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.app.v1alpha1.ModuleDescriptor.displayName = 'proto.cosmos.app.v1alpha1.ModuleDescriptor' } /** * 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.cosmos.app.v1alpha1.PackageReference = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.cosmos.app.v1alpha1.PackageReference, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.app.v1alpha1.PackageReference.displayName = 'proto.cosmos.app.v1alpha1.PackageReference' } /** * 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.cosmos.app.v1alpha1.MigrateFromInfo = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.cosmos.app.v1alpha1.MigrateFromInfo, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.app.v1alpha1.MigrateFromInfo.displayName = 'proto.cosmos.app.v1alpha1.MigrateFromInfo' } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.cosmos.app.v1alpha1.ModuleDescriptor.repeatedFields_ = [2, 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.cosmos.app.v1alpha1.ModuleDescriptor.prototype.toObject = function ( opt_includeInstance, ) { return proto.cosmos.app.v1alpha1.ModuleDescriptor.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.cosmos.app.v1alpha1.ModuleDescriptor} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.app.v1alpha1.ModuleDescriptor.toObject = function ( includeInstance, msg, ) { var f, obj = { goImport: jspb.Message.getFieldWithDefault(msg, 1, ''), usePackageList: jspb.Message.toObjectList( msg.getUsePackageList(), proto.cosmos.app.v1alpha1.PackageReference.toObject, includeInstance, ), canMigrateFromList: jspb.Message.toObjectList( msg.getCanMigrateFromList(), proto.cosmos.app.v1alpha1.MigrateFromInfo.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.cosmos.app.v1alpha1.ModuleDescriptor} */ proto.cosmos.app.v1alpha1.ModuleDescriptor.deserializeBinary = function ( bytes, ) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.cosmos.app.v1alpha1.ModuleDescriptor() return proto.cosmos.app.v1alpha1.ModuleDescriptor.deserializeBinaryFromReader( msg, reader, ) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.cosmos.app.v1alpha1.ModuleDescriptor} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.cosmos.app.v1alpha1.ModuleDescriptor} */ proto.cosmos.app.v1alpha1.ModuleDescriptor.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.setGoImport(value) break case 2: var value = new proto.cosmos.app.v1alpha1.PackageReference() reader.readMessage( value, proto.cosmos.app.v1alpha1.PackageReference .deserializeBinaryFromReader, ) msg.addUsePackage(value) break case 3: var value = new proto.cosmos.app.v1alpha1.MigrateFromInfo() reader.readMessage( value, proto.cosmos.app.v1alpha1.MigrateFromInfo .deserializeBinaryFromReader, ) msg.addCanMigrateFrom(value) break default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.cosmos.app.v1alpha1.ModuleDescriptor.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.cosmos.app.v1alpha1.ModuleDescriptor.serializeBinaryToWriter( this, writer, ) return writer.getResultBuffer() } /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.cosmos.app.v1alpha1.ModuleDescriptor} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.app.v1alpha1.ModuleDescriptor.serializeBinaryToWriter = function ( message, writer, ) { var f = undefined f = message.getGoImport() if (f.length > 0) { writer.writeString(1, f) } f = message.getUsePackageList() if (f.length > 0) { writer.writeRepeatedMessage( 2, f, proto.cosmos.app.v1alpha1.PackageReference.serializeBinaryToWriter, ) } f = message.getCanMigrateFromList() if (f.length > 0) { writer.writeRepeatedMessage( 3, f, proto.cosmos.app.v1alpha1.MigrateFromInfo.serializeBinaryToWriter, ) } } /** * optional string go_import = 1; * @return {string} */ proto.cosmos.app.v1alpha1.ModuleDescriptor.prototype.getGoImport = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) } /** * @param {string} value * @return {!proto.cosmos.app.v1alpha1.ModuleDescriptor} returns this */ proto.cosmos.app.v1alpha1.ModuleDescriptor.prototype.setGoImport = function ( value, ) { return jspb.Message.setProto3StringField(this, 1, value) } /** * repeated PackageReference use_package = 2; * @return {!Array<!proto.cosmos.app.v1alpha1.PackageReference>} */ proto.cosmos.app.v1alpha1.ModuleDescriptor.prototype.getUsePackageList = function () { return /** @type{!Array<!proto.cosmos.app.v1alpha1.PackageReference>} */ ( jspb.Message.getRepeatedWrapperField( this, proto.cosmos.app.v1alpha1.PackageReference, 2, ) ) } /** * @param {!Array<!proto.cosmos.app.v1alpha1.PackageReference>} value * @return {!proto.cosmos.app.v1alpha1.ModuleDescriptor} returns this */ proto.cosmos.app.v1alpha1.ModuleDescriptor.prototype.setUsePackageList = function (value) { return jspb.Message.setRepeatedWrapperField(this, 2, value) } /** * @param {!proto.cosmos.app.v1alpha1.PackageReference=} opt_value * @param {number=} opt_index * @return {!proto.cosmos.app.v1alpha1.PackageReference} */ proto.cosmos.app.v1alpha1.ModuleDescriptor.prototype.addUsePackage = function ( opt_value, opt_index, ) { return jspb.Message.addToRepeatedWrapperField( this, 2, opt_value, proto.cosmos.app.v1alpha1.PackageReference, opt_index, ) } /** * Clears the list making it empty but non-null. * @return {!proto.cosmos.app.v1alpha1.ModuleDescriptor} returns this */ proto.cosmos.app.v1alpha1.ModuleDescriptor.prototype.clearUsePackageList = function () { return this.setUsePackageList([]) } /** * repeated MigrateFromInfo can_migrate_from = 3; * @return {!Array<!proto.cosmos.app.v1alpha1.MigrateFromInfo>} */ proto.cosmos.app.v1alpha1.ModuleDescriptor.prototype.getCanMigrateFromList = function () { return /** @type{!Array<!proto.cosmos.app.v1alpha1.MigrateFromInfo>} */ ( jspb.Message.getRepeatedWrapperField( this, proto.cosmos.app.v1alpha1.MigrateFromInfo, 3, ) ) } /** * @param {!Array<!proto.cosmos.app.v1alpha1.MigrateFromInfo>} value * @return {!proto.cosmos.app.v1alpha1.ModuleDescriptor} returns this */ proto.cosmos.app.v1alpha1.ModuleDescriptor.prototype.setCanMigrateFromList = function (value) { return jspb.Message.setRepeatedWrapperField(this, 3, value) } /** * @param {!proto.cosmos.app.v1alpha1.MigrateFromInfo=} opt_value * @param {number=} opt_index * @return {!proto.cosmos.app.v1alpha1.MigrateFromInfo} */ proto.cosmos.app.v1alpha1.ModuleDescriptor.prototype.addCanMigrateFrom = function (opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField( this, 3, opt_value, proto.cosmos.app.v1alpha1.MigrateFromInfo, opt_index, ) } /** * Clears the list making it empty but non-null. * @return {!proto.cosmos.app.v1alpha1.ModuleDescriptor} returns this */ proto.cosmos.app.v1alpha1.ModuleDescriptor.prototype.clearCanMigrateFromList = function () { return this.setCanMigrateFromList([]) } 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.cosmos.app.v1alpha1.PackageReference.prototype.toObject = function ( opt_includeInstance, ) { return proto.cosmos.app.v1alpha1.PackageReference.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.cosmos.app.v1alpha1.PackageReference} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.app.v1alpha1.PackageReference.toObject = function ( includeInstance, msg, ) { var f, obj = { name: jspb.Message.getFieldWithDefault(msg, 1, ''), revision: 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.cosmos.app.v1alpha1.PackageReference} */ proto.cosmos.app.v1alpha1.PackageReference.deserializeBinary = function ( bytes, ) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.cosmos.app.v1alpha1.PackageReference() return proto.cosmos.app.v1alpha1.PackageReference.deserializeBinaryFromReader( msg, reader, ) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.cosmos.app.v1alpha1.PackageReference} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.cosmos.app.v1alpha1.PackageReference} */ proto.cosmos.app.v1alpha1.PackageReference.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.setName(value) break case 2: var value = /** @type {number} */ (reader.readUint32()) msg.setRevision(value) break default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.cosmos.app.v1alpha1.PackageReference.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.cosmos.app.v1alpha1.PackageReference.serializeBinaryToWriter( this, writer, ) return writer.getResultBuffer() } /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.cosmos.app.v1alpha1.PackageReference} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.app.v1alpha1.PackageReference.serializeBinaryToWriter = function ( message, writer, ) { var f = undefined f = message.getName() if (f.length > 0) { writer.writeString(1, f) } f = message.getRevision() if (f !== 0) { writer.writeUint32(2, f) } } /** * optional string name = 1; * @return {string} */ proto.cosmos.app.v1alpha1.PackageReference.prototype.getName = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) } /** * @param {string} value * @return {!proto.cosmos.app.v1alpha1.PackageReference} returns this */ proto.cosmos.app.v1alpha1.PackageReference.prototype.setName = function ( value, ) { return jspb.Message.setProto3StringField(this, 1, value) } /** * optional uint32 revision = 2; * @return {number} */ proto.cosmos.app.v1alpha1.PackageReference.prototype.getRevision = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)) } /** * @param {number} value * @return {!proto.cosmos.app.v1alpha1.PackageReference} returns this */ proto.cosmos.app.v1alpha1.PackageReference.prototype.setRevision = 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_<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.cosmos.app.v1alpha1.MigrateFromInfo.prototype.toObject = function ( opt_includeInstance, ) { return proto.cosmos.app.v1alpha1.MigrateFromInfo.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.cosmos.app.v1alpha1.MigrateFromInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.app.v1alpha1.MigrateFromInfo.toObject = function ( includeInstance, msg, ) { var f, obj = { module: 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.cosmos.app.v1alpha1.MigrateFromInfo} */ proto.cosmos.app.v1alpha1.MigrateFromInfo.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.cosmos.app.v1alpha1.MigrateFromInfo() return proto.cosmos.app.v1alpha1.MigrateFromInfo.deserializeBinaryFromReader( msg, reader, ) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.cosmos.app.v1alpha1.MigrateFromInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.cosmos.app.v1alpha1.MigrateFromInfo} */ proto.cosmos.app.v1alpha1.MigrateFromInfo.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.setModule(value) break default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.cosmos.app.v1alpha1.MigrateFromInfo.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.cosmos.app.v1alpha1.MigrateFromInfo.serializeBinaryToWriter( this, writer, ) return writer.getResultBuffer() } /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.cosmos.app.v1alpha1.MigrateFromInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.app.v1alpha1.MigrateFromInfo.serializeBinaryToWriter = function ( message, writer, ) { var f = undefined f = message.getModule() if (f.length > 0) { writer.writeString(1, f) } } /** * optional string module = 1; * @return {string} */ proto.cosmos.app.v1alpha1.MigrateFromInfo.prototype.getModule = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) } /** * @param {string} value * @return {!proto.cosmos.app.v1alpha1.MigrateFromInfo} returns this */ proto.cosmos.app.v1alpha1.MigrateFromInfo.prototype.setModule = function ( value, ) { return jspb.Message.setProto3StringField(this, 1, value) } /** * A tuple of {field number, class constructor} for the extension * field named `module`. * @type {!jspb.ExtensionFieldInfo<!proto.cosmos.app.v1alpha1.ModuleDescriptor>} */ proto.cosmos.app.v1alpha1.module = new jspb.ExtensionFieldInfo( 57193479, { module: 0 }, proto.cosmos.app.v1alpha1.ModuleDescriptor, /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( proto.cosmos.app.v1alpha1.ModuleDescriptor.toObject ), 0, ) google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[57193479] = new jspb.ExtensionFieldBinaryInfo( proto.cosmos.app.v1alpha1.module, jspb.BinaryReader.prototype.readMessage, jspb.BinaryWriter.prototype.writeMessage, proto.cosmos.app.v1alpha1.ModuleDescriptor.serializeBinaryToWriter, proto.cosmos.app.v1alpha1.ModuleDescriptor.deserializeBinaryFromReader, false, ) // This registers the extension field with the extended class, so that // toObject() will function correctly. google_protobuf_descriptor_pb.MessageOptions.extensions[57193479] = proto.cosmos.app.v1alpha1.module goog.object.extend(exports, proto.cosmos.app.v1alpha1)