UNPKG

@kaiachain/kss-bridges-celer

Version:
1,088 lines (943 loc) 33 kB
// source: sgn/gov/v1/tx.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() { if (this) { return this; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } if (typeof self !== 'undefined') { return self; } return Function('return this')(); }.call(null)); var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); goog.object.extend(proto, google_protobuf_any_pb); var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); goog.object.extend(proto, cosmos_proto_cosmos_pb); var sgn_gov_v1_gov_pb = require('../../../sgn/gov/v1/gov_pb.js'); goog.object.extend(proto, sgn_gov_v1_gov_pb); goog.exportSymbol('proto.sgn.gov.v1.MsgDeposit', null, global); goog.exportSymbol('proto.sgn.gov.v1.MsgDepositResponse', null, global); goog.exportSymbol('proto.sgn.gov.v1.MsgSubmitProposal', null, global); goog.exportSymbol('proto.sgn.gov.v1.MsgSubmitProposalResponse', null, global); goog.exportSymbol('proto.sgn.gov.v1.MsgVote', null, global); goog.exportSymbol('proto.sgn.gov.v1.MsgVoteResponse', 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.sgn.gov.v1.MsgSubmitProposal = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.sgn.gov.v1.MsgSubmitProposal, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.sgn.gov.v1.MsgSubmitProposal.displayName = 'proto.sgn.gov.v1.MsgSubmitProposal'; } /** * 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.sgn.gov.v1.MsgSubmitProposalResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.sgn.gov.v1.MsgSubmitProposalResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.sgn.gov.v1.MsgSubmitProposalResponse.displayName = 'proto.sgn.gov.v1.MsgSubmitProposalResponse'; } /** * 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.sgn.gov.v1.MsgVote = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.sgn.gov.v1.MsgVote, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.sgn.gov.v1.MsgVote.displayName = 'proto.sgn.gov.v1.MsgVote'; } /** * 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.sgn.gov.v1.MsgVoteResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.sgn.gov.v1.MsgVoteResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.sgn.gov.v1.MsgVoteResponse.displayName = 'proto.sgn.gov.v1.MsgVoteResponse'; } /** * 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.sgn.gov.v1.MsgDeposit = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.sgn.gov.v1.MsgDeposit, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.sgn.gov.v1.MsgDeposit.displayName = 'proto.sgn.gov.v1.MsgDeposit'; } /** * 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.sgn.gov.v1.MsgDepositResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.sgn.gov.v1.MsgDepositResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.sgn.gov.v1.MsgDepositResponse.displayName = 'proto.sgn.gov.v1.MsgDepositResponse'; } 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.sgn.gov.v1.MsgSubmitProposal.prototype.toObject = function(opt_includeInstance) { return proto.sgn.gov.v1.MsgSubmitProposal.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.sgn.gov.v1.MsgSubmitProposal} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.sgn.gov.v1.MsgSubmitProposal.toObject = function(includeInstance, msg) { var f, obj = { content: (f = msg.getContent()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), initialDeposit: jspb.Message.getFieldWithDefault(msg, 2, ""), proposer: 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.sgn.gov.v1.MsgSubmitProposal} */ proto.sgn.gov.v1.MsgSubmitProposal.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.sgn.gov.v1.MsgSubmitProposal; return proto.sgn.gov.v1.MsgSubmitProposal.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.sgn.gov.v1.MsgSubmitProposal} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.sgn.gov.v1.MsgSubmitProposal} */ proto.sgn.gov.v1.MsgSubmitProposal.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new google_protobuf_any_pb.Any; reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); msg.setContent(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setInitialDeposit(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setProposer(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.sgn.gov.v1.MsgSubmitProposal.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.sgn.gov.v1.MsgSubmitProposal.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.sgn.gov.v1.MsgSubmitProposal} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.sgn.gov.v1.MsgSubmitProposal.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getContent(); if (f != null) { writer.writeMessage( 1, f, google_protobuf_any_pb.Any.serializeBinaryToWriter ); } f = message.getInitialDeposit(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getProposer(); if (f.length > 0) { writer.writeString( 3, f ); } }; /** * optional google.protobuf.Any content = 1; * @return {?proto.google.protobuf.Any} */ proto.sgn.gov.v1.MsgSubmitProposal.prototype.getContent = function() { return /** @type{?proto.google.protobuf.Any} */ ( jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 1)); }; /** * @param {?proto.google.protobuf.Any|undefined} value * @return {!proto.sgn.gov.v1.MsgSubmitProposal} returns this */ proto.sgn.gov.v1.MsgSubmitProposal.prototype.setContent = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.sgn.gov.v1.MsgSubmitProposal} returns this */ proto.sgn.gov.v1.MsgSubmitProposal.prototype.clearContent = function() { return this.setContent(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.sgn.gov.v1.MsgSubmitProposal.prototype.hasContent = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional string initial_deposit = 2; * @return {string} */ proto.sgn.gov.v1.MsgSubmitProposal.prototype.getInitialDeposit = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.sgn.gov.v1.MsgSubmitProposal} returns this */ proto.sgn.gov.v1.MsgSubmitProposal.prototype.setInitialDeposit = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string proposer = 3; * @return {string} */ proto.sgn.gov.v1.MsgSubmitProposal.prototype.getProposer = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.sgn.gov.v1.MsgSubmitProposal} returns this */ proto.sgn.gov.v1.MsgSubmitProposal.prototype.setProposer = function(value) { return jspb.Message.setProto3StringField(this, 3, 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.sgn.gov.v1.MsgSubmitProposalResponse.prototype.toObject = function(opt_includeInstance) { return proto.sgn.gov.v1.MsgSubmitProposalResponse.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.sgn.gov.v1.MsgSubmitProposalResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.sgn.gov.v1.MsgSubmitProposalResponse.toObject = function(includeInstance, msg) { var f, obj = { proposalId: jspb.Message.getFieldWithDefault(msg, 1, 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.sgn.gov.v1.MsgSubmitProposalResponse} */ proto.sgn.gov.v1.MsgSubmitProposalResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.sgn.gov.v1.MsgSubmitProposalResponse; return proto.sgn.gov.v1.MsgSubmitProposalResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.sgn.gov.v1.MsgSubmitProposalResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.sgn.gov.v1.MsgSubmitProposalResponse} */ proto.sgn.gov.v1.MsgSubmitProposalResponse.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.setProposalId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.sgn.gov.v1.MsgSubmitProposalResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.sgn.gov.v1.MsgSubmitProposalResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.sgn.gov.v1.MsgSubmitProposalResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.sgn.gov.v1.MsgSubmitProposalResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getProposalId(); if (f !== 0) { writer.writeUint64( 1, f ); } }; /** * optional uint64 proposal_id = 1; * @return {number} */ proto.sgn.gov.v1.MsgSubmitProposalResponse.prototype.getProposalId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.sgn.gov.v1.MsgSubmitProposalResponse} returns this */ proto.sgn.gov.v1.MsgSubmitProposalResponse.prototype.setProposalId = function(value) { return jspb.Message.setProto3IntField(this, 1, 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.sgn.gov.v1.MsgVote.prototype.toObject = function(opt_includeInstance) { return proto.sgn.gov.v1.MsgVote.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.sgn.gov.v1.MsgVote} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.sgn.gov.v1.MsgVote.toObject = function(includeInstance, msg) { var f, obj = { proposalId: jspb.Message.getFieldWithDefault(msg, 1, 0), voter: jspb.Message.getFieldWithDefault(msg, 2, ""), option: jspb.Message.getFieldWithDefault(msg, 3, 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.sgn.gov.v1.MsgVote} */ proto.sgn.gov.v1.MsgVote.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.sgn.gov.v1.MsgVote; return proto.sgn.gov.v1.MsgVote.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.sgn.gov.v1.MsgVote} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.sgn.gov.v1.MsgVote} */ proto.sgn.gov.v1.MsgVote.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.setProposalId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setVoter(value); break; case 3: var value = /** @type {!proto.sgn.gov.v1.VoteOption} */ (reader.readEnum()); msg.setOption(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.sgn.gov.v1.MsgVote.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.sgn.gov.v1.MsgVote.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.sgn.gov.v1.MsgVote} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.sgn.gov.v1.MsgVote.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getProposalId(); if (f !== 0) { writer.writeUint64( 1, f ); } f = message.getVoter(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getOption(); if (f !== 0.0) { writer.writeEnum( 3, f ); } }; /** * optional uint64 proposal_id = 1; * @return {number} */ proto.sgn.gov.v1.MsgVote.prototype.getProposalId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.sgn.gov.v1.MsgVote} returns this */ proto.sgn.gov.v1.MsgVote.prototype.setProposalId = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional string voter = 2; * @return {string} */ proto.sgn.gov.v1.MsgVote.prototype.getVoter = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.sgn.gov.v1.MsgVote} returns this */ proto.sgn.gov.v1.MsgVote.prototype.setVoter = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional VoteOption option = 3; * @return {!proto.sgn.gov.v1.VoteOption} */ proto.sgn.gov.v1.MsgVote.prototype.getOption = function() { return /** @type {!proto.sgn.gov.v1.VoteOption} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {!proto.sgn.gov.v1.VoteOption} value * @return {!proto.sgn.gov.v1.MsgVote} returns this */ proto.sgn.gov.v1.MsgVote.prototype.setOption = function(value) { return jspb.Message.setProto3EnumField(this, 3, 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.sgn.gov.v1.MsgVoteResponse.prototype.toObject = function(opt_includeInstance) { return proto.sgn.gov.v1.MsgVoteResponse.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.sgn.gov.v1.MsgVoteResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.sgn.gov.v1.MsgVoteResponse.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.sgn.gov.v1.MsgVoteResponse} */ proto.sgn.gov.v1.MsgVoteResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.sgn.gov.v1.MsgVoteResponse; return proto.sgn.gov.v1.MsgVoteResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.sgn.gov.v1.MsgVoteResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.sgn.gov.v1.MsgVoteResponse} */ proto.sgn.gov.v1.MsgVoteResponse.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.sgn.gov.v1.MsgVoteResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.sgn.gov.v1.MsgVoteResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.sgn.gov.v1.MsgVoteResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.sgn.gov.v1.MsgVoteResponse.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.sgn.gov.v1.MsgDeposit.prototype.toObject = function(opt_includeInstance) { return proto.sgn.gov.v1.MsgDeposit.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.sgn.gov.v1.MsgDeposit} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.sgn.gov.v1.MsgDeposit.toObject = function(includeInstance, msg) { var f, obj = { proposalId: jspb.Message.getFieldWithDefault(msg, 1, 0), depositor: jspb.Message.getFieldWithDefault(msg, 2, ""), amount: 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.sgn.gov.v1.MsgDeposit} */ proto.sgn.gov.v1.MsgDeposit.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.sgn.gov.v1.MsgDeposit; return proto.sgn.gov.v1.MsgDeposit.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.sgn.gov.v1.MsgDeposit} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.sgn.gov.v1.MsgDeposit} */ proto.sgn.gov.v1.MsgDeposit.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.setProposalId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setDepositor(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setAmount(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.sgn.gov.v1.MsgDeposit.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.sgn.gov.v1.MsgDeposit.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.sgn.gov.v1.MsgDeposit} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.sgn.gov.v1.MsgDeposit.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getProposalId(); if (f !== 0) { writer.writeUint64( 1, f ); } f = message.getDepositor(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getAmount(); if (f.length > 0) { writer.writeString( 3, f ); } }; /** * optional uint64 proposal_id = 1; * @return {number} */ proto.sgn.gov.v1.MsgDeposit.prototype.getProposalId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.sgn.gov.v1.MsgDeposit} returns this */ proto.sgn.gov.v1.MsgDeposit.prototype.setProposalId = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional string depositor = 2; * @return {string} */ proto.sgn.gov.v1.MsgDeposit.prototype.getDepositor = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.sgn.gov.v1.MsgDeposit} returns this */ proto.sgn.gov.v1.MsgDeposit.prototype.setDepositor = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string amount = 3; * @return {string} */ proto.sgn.gov.v1.MsgDeposit.prototype.getAmount = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.sgn.gov.v1.MsgDeposit} returns this */ proto.sgn.gov.v1.MsgDeposit.prototype.setAmount = function(value) { return jspb.Message.setProto3StringField(this, 3, 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.sgn.gov.v1.MsgDepositResponse.prototype.toObject = function(opt_includeInstance) { return proto.sgn.gov.v1.MsgDepositResponse.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.sgn.gov.v1.MsgDepositResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.sgn.gov.v1.MsgDepositResponse.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.sgn.gov.v1.MsgDepositResponse} */ proto.sgn.gov.v1.MsgDepositResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.sgn.gov.v1.MsgDepositResponse; return proto.sgn.gov.v1.MsgDepositResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.sgn.gov.v1.MsgDepositResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.sgn.gov.v1.MsgDepositResponse} */ proto.sgn.gov.v1.MsgDepositResponse.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.sgn.gov.v1.MsgDepositResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.sgn.gov.v1.MsgDepositResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.sgn.gov.v1.MsgDepositResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.sgn.gov.v1.MsgDepositResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; goog.object.extend(exports, proto.sgn.gov.v1);