@provenanceio/wallet-utils
Version:
Typescript Utilities for Provenance Blockchain Wallet
1,646 lines (1,355 loc) • 62 kB
JavaScript
// source: cosmos/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 () {
return this || window || global || self || Function('return this')();
}.call(null);
var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js');
goog.object.extend(proto, cosmos_base_v1beta1_coin_pb);
var cosmos_gov_v1_gov_pb = require('../../../cosmos/gov/v1/gov_pb.js');
goog.object.extend(proto, cosmos_gov_v1_gov_pb);
var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js');
goog.object.extend(proto, gogoproto_gogo_pb);
var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js');
goog.object.extend(proto, cosmos_proto_cosmos_pb);
var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js');
goog.object.extend(proto, google_protobuf_any_pb);
var cosmos_msg_v1_msg_pb = require('../../../cosmos/msg/v1/msg_pb.js');
goog.object.extend(proto, cosmos_msg_v1_msg_pb);
goog.exportSymbol('proto.cosmos.gov.v1.MsgDeposit', null, global);
goog.exportSymbol('proto.cosmos.gov.v1.MsgDepositResponse', null, global);
goog.exportSymbol('proto.cosmos.gov.v1.MsgExecLegacyContent', null, global);
goog.exportSymbol('proto.cosmos.gov.v1.MsgExecLegacyContentResponse', null, global);
goog.exportSymbol('proto.cosmos.gov.v1.MsgSubmitProposal', null, global);
goog.exportSymbol('proto.cosmos.gov.v1.MsgSubmitProposalResponse', null, global);
goog.exportSymbol('proto.cosmos.gov.v1.MsgVote', null, global);
goog.exportSymbol('proto.cosmos.gov.v1.MsgVoteResponse', null, global);
goog.exportSymbol('proto.cosmos.gov.v1.MsgVoteWeighted', null, global);
goog.exportSymbol('proto.cosmos.gov.v1.MsgVoteWeightedResponse', 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.gov.v1.MsgSubmitProposal = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.gov.v1.MsgSubmitProposal.repeatedFields_, null);
};
goog.inherits(proto.cosmos.gov.v1.MsgSubmitProposal, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.gov.v1.MsgSubmitProposal.displayName = 'proto.cosmos.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.cosmos.gov.v1.MsgSubmitProposalResponse = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.gov.v1.MsgSubmitProposalResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.gov.v1.MsgSubmitProposalResponse.displayName = 'proto.cosmos.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.cosmos.gov.v1.MsgExecLegacyContent = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.gov.v1.MsgExecLegacyContent, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.gov.v1.MsgExecLegacyContent.displayName = 'proto.cosmos.gov.v1.MsgExecLegacyContent';
}
/**
* 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.gov.v1.MsgExecLegacyContentResponse = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.gov.v1.MsgExecLegacyContentResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.gov.v1.MsgExecLegacyContentResponse.displayName = 'proto.cosmos.gov.v1.MsgExecLegacyContentResponse';
}
/**
* 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.gov.v1.MsgVote = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.gov.v1.MsgVote, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.gov.v1.MsgVote.displayName = 'proto.cosmos.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.cosmos.gov.v1.MsgVoteResponse = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.gov.v1.MsgVoteResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.gov.v1.MsgVoteResponse.displayName = 'proto.cosmos.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.cosmos.gov.v1.MsgVoteWeighted = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.gov.v1.MsgVoteWeighted.repeatedFields_, null);
};
goog.inherits(proto.cosmos.gov.v1.MsgVoteWeighted, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.gov.v1.MsgVoteWeighted.displayName = 'proto.cosmos.gov.v1.MsgVoteWeighted';
}
/**
* 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.gov.v1.MsgVoteWeightedResponse = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.gov.v1.MsgVoteWeightedResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.gov.v1.MsgVoteWeightedResponse.displayName = 'proto.cosmos.gov.v1.MsgVoteWeightedResponse';
}
/**
* 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.gov.v1.MsgDeposit = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.gov.v1.MsgDeposit.repeatedFields_, null);
};
goog.inherits(proto.cosmos.gov.v1.MsgDeposit, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.gov.v1.MsgDeposit.displayName = 'proto.cosmos.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.cosmos.gov.v1.MsgDepositResponse = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.gov.v1.MsgDepositResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.gov.v1.MsgDepositResponse.displayName = 'proto.cosmos.gov.v1.MsgDepositResponse';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.cosmos.gov.v1.MsgSubmitProposal.repeatedFields_ = [1, 2];
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.gov.v1.MsgSubmitProposal.prototype.toObject = function (opt_includeInstance) {
return proto.cosmos.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.cosmos.gov.v1.MsgSubmitProposal} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.gov.v1.MsgSubmitProposal.toObject = function (includeInstance, msg) {
var f,
obj = {
messagesList: jspb.Message.toObjectList(msg.getMessagesList(), google_protobuf_any_pb.Any.toObject, includeInstance),
initialDepositList: jspb.Message.toObjectList(msg.getInitialDepositList(), cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance),
proposer: jspb.Message.getFieldWithDefault(msg, 3, ""),
metadata: jspb.Message.getFieldWithDefault(msg, 4, "")
};
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.gov.v1.MsgSubmitProposal}
*/
proto.cosmos.gov.v1.MsgSubmitProposal.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmos.gov.v1.MsgSubmitProposal();
return proto.cosmos.gov.v1.MsgSubmitProposal.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.gov.v1.MsgSubmitProposal} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.gov.v1.MsgSubmitProposal}
*/
proto.cosmos.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.addMessages(value);
break;
case 2:
var value = new cosmos_base_v1beta1_coin_pb.Coin();
reader.readMessage(value, cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader);
msg.addInitialDeposit(value);
break;
case 3:
var value =
/** @type {string} */
reader.readString();
msg.setProposer(value);
break;
case 4:
var value =
/** @type {string} */
reader.readString();
msg.setMetadata(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmos.gov.v1.MsgSubmitProposal.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmos.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.cosmos.gov.v1.MsgSubmitProposal} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.gov.v1.MsgSubmitProposal.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getMessagesList();
if (f.length > 0) {
writer.writeRepeatedMessage(1, f, google_protobuf_any_pb.Any.serializeBinaryToWriter);
}
f = message.getInitialDepositList();
if (f.length > 0) {
writer.writeRepeatedMessage(2, f, cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter);
}
f = message.getProposer();
if (f.length > 0) {
writer.writeString(3, f);
}
f = message.getMetadata();
if (f.length > 0) {
writer.writeString(4, f);
}
};
/**
* repeated google.protobuf.Any messages = 1;
* @return {!Array<!proto.google.protobuf.Any>}
*/
proto.cosmos.gov.v1.MsgSubmitProposal.prototype.getMessagesList = function () {
return (
/** @type{!Array<!proto.google.protobuf.Any>} */
jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 1)
);
};
/**
* @param {!Array<!proto.google.protobuf.Any>} value
* @return {!proto.cosmos.gov.v1.MsgSubmitProposal} returns this
*/
proto.cosmos.gov.v1.MsgSubmitProposal.prototype.setMessagesList = function (value) {
return jspb.Message.setRepeatedWrapperField(this, 1, value);
};
/**
* @param {!proto.google.protobuf.Any=} opt_value
* @param {number=} opt_index
* @return {!proto.google.protobuf.Any}
*/
proto.cosmos.gov.v1.MsgSubmitProposal.prototype.addMessages = function (opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.protobuf.Any, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.cosmos.gov.v1.MsgSubmitProposal} returns this
*/
proto.cosmos.gov.v1.MsgSubmitProposal.prototype.clearMessagesList = function () {
return this.setMessagesList([]);
};
/**
* repeated cosmos.base.v1beta1.Coin initial_deposit = 2;
* @return {!Array<!proto.cosmos.base.v1beta1.Coin>}
*/
proto.cosmos.gov.v1.MsgSubmitProposal.prototype.getInitialDepositList = function () {
return (
/** @type{!Array<!proto.cosmos.base.v1beta1.Coin>} */
jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)
);
};
/**
* @param {!Array<!proto.cosmos.base.v1beta1.Coin>} value
* @return {!proto.cosmos.gov.v1.MsgSubmitProposal} returns this
*/
proto.cosmos.gov.v1.MsgSubmitProposal.prototype.setInitialDepositList = function (value) {
return jspb.Message.setRepeatedWrapperField(this, 2, value);
};
/**
* @param {!proto.cosmos.base.v1beta1.Coin=} opt_value
* @param {number=} opt_index
* @return {!proto.cosmos.base.v1beta1.Coin}
*/
proto.cosmos.gov.v1.MsgSubmitProposal.prototype.addInitialDeposit = function (opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.cosmos.gov.v1.MsgSubmitProposal} returns this
*/
proto.cosmos.gov.v1.MsgSubmitProposal.prototype.clearInitialDepositList = function () {
return this.setInitialDepositList([]);
};
/**
* optional string proposer = 3;
* @return {string}
*/
proto.cosmos.gov.v1.MsgSubmitProposal.prototype.getProposer = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 3, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmos.gov.v1.MsgSubmitProposal} returns this
*/
proto.cosmos.gov.v1.MsgSubmitProposal.prototype.setProposer = function (value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional string metadata = 4;
* @return {string}
*/
proto.cosmos.gov.v1.MsgSubmitProposal.prototype.getMetadata = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 4, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmos.gov.v1.MsgSubmitProposal} returns this
*/
proto.cosmos.gov.v1.MsgSubmitProposal.prototype.setMetadata = function (value) {
return jspb.Message.setProto3StringField(this, 4, 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.gov.v1.MsgSubmitProposalResponse.prototype.toObject = function (opt_includeInstance) {
return proto.cosmos.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.cosmos.gov.v1.MsgSubmitProposalResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.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.cosmos.gov.v1.MsgSubmitProposalResponse}
*/
proto.cosmos.gov.v1.MsgSubmitProposalResponse.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmos.gov.v1.MsgSubmitProposalResponse();
return proto.cosmos.gov.v1.MsgSubmitProposalResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.gov.v1.MsgSubmitProposalResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.gov.v1.MsgSubmitProposalResponse}
*/
proto.cosmos.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.cosmos.gov.v1.MsgSubmitProposalResponse.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmos.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.cosmos.gov.v1.MsgSubmitProposalResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.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.cosmos.gov.v1.MsgSubmitProposalResponse.prototype.getProposalId = function () {
return (
/** @type {number} */
jspb.Message.getFieldWithDefault(this, 1, 0)
);
};
/**
* @param {number} value
* @return {!proto.cosmos.gov.v1.MsgSubmitProposalResponse} returns this
*/
proto.cosmos.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.cosmos.gov.v1.MsgExecLegacyContent.prototype.toObject = function (opt_includeInstance) {
return proto.cosmos.gov.v1.MsgExecLegacyContent.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.gov.v1.MsgExecLegacyContent} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.gov.v1.MsgExecLegacyContent.toObject = function (includeInstance, msg) {
var f,
obj = {
content: (f = msg.getContent()) && google_protobuf_any_pb.Any.toObject(includeInstance, f),
authority: jspb.Message.getFieldWithDefault(msg, 2, "")
};
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.gov.v1.MsgExecLegacyContent}
*/
proto.cosmos.gov.v1.MsgExecLegacyContent.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmos.gov.v1.MsgExecLegacyContent();
return proto.cosmos.gov.v1.MsgExecLegacyContent.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.gov.v1.MsgExecLegacyContent} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.gov.v1.MsgExecLegacyContent}
*/
proto.cosmos.gov.v1.MsgExecLegacyContent.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.setAuthority(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmos.gov.v1.MsgExecLegacyContent.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmos.gov.v1.MsgExecLegacyContent.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.gov.v1.MsgExecLegacyContent} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.gov.v1.MsgExecLegacyContent.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.getAuthority();
if (f.length > 0) {
writer.writeString(2, f);
}
};
/**
* optional google.protobuf.Any content = 1;
* @return {?proto.google.protobuf.Any}
*/
proto.cosmos.gov.v1.MsgExecLegacyContent.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.cosmos.gov.v1.MsgExecLegacyContent} returns this
*/
proto.cosmos.gov.v1.MsgExecLegacyContent.prototype.setContent = function (value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.cosmos.gov.v1.MsgExecLegacyContent} returns this
*/
proto.cosmos.gov.v1.MsgExecLegacyContent.prototype.clearContent = function () {
return this.setContent(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cosmos.gov.v1.MsgExecLegacyContent.prototype.hasContent = function () {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional string authority = 2;
* @return {string}
*/
proto.cosmos.gov.v1.MsgExecLegacyContent.prototype.getAuthority = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 2, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmos.gov.v1.MsgExecLegacyContent} returns this
*/
proto.cosmos.gov.v1.MsgExecLegacyContent.prototype.setAuthority = function (value) {
return jspb.Message.setProto3StringField(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.gov.v1.MsgExecLegacyContentResponse.prototype.toObject = function (opt_includeInstance) {
return proto.cosmos.gov.v1.MsgExecLegacyContentResponse.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.gov.v1.MsgExecLegacyContentResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.gov.v1.MsgExecLegacyContentResponse.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.cosmos.gov.v1.MsgExecLegacyContentResponse}
*/
proto.cosmos.gov.v1.MsgExecLegacyContentResponse.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmos.gov.v1.MsgExecLegacyContentResponse();
return proto.cosmos.gov.v1.MsgExecLegacyContentResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.gov.v1.MsgExecLegacyContentResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.gov.v1.MsgExecLegacyContentResponse}
*/
proto.cosmos.gov.v1.MsgExecLegacyContentResponse.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.cosmos.gov.v1.MsgExecLegacyContentResponse.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmos.gov.v1.MsgExecLegacyContentResponse.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.gov.v1.MsgExecLegacyContentResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.gov.v1.MsgExecLegacyContentResponse.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.cosmos.gov.v1.MsgVote.prototype.toObject = function (opt_includeInstance) {
return proto.cosmos.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.cosmos.gov.v1.MsgVote} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.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),
metadata: jspb.Message.getFieldWithDefault(msg, 4, "")
};
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.gov.v1.MsgVote}
*/
proto.cosmos.gov.v1.MsgVote.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmos.gov.v1.MsgVote();
return proto.cosmos.gov.v1.MsgVote.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.gov.v1.MsgVote} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.gov.v1.MsgVote}
*/
proto.cosmos.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.cosmos.gov.v1.VoteOption} */
reader.readEnum();
msg.setOption(value);
break;
case 4:
var value =
/** @type {string} */
reader.readString();
msg.setMetadata(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmos.gov.v1.MsgVote.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmos.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.cosmos.gov.v1.MsgVote} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.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);
}
f = message.getMetadata();
if (f.length > 0) {
writer.writeString(4, f);
}
};
/**
* optional uint64 proposal_id = 1;
* @return {number}
*/
proto.cosmos.gov.v1.MsgVote.prototype.getProposalId = function () {
return (
/** @type {number} */
jspb.Message.getFieldWithDefault(this, 1, 0)
);
};
/**
* @param {number} value
* @return {!proto.cosmos.gov.v1.MsgVote} returns this
*/
proto.cosmos.gov.v1.MsgVote.prototype.setProposalId = function (value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional string voter = 2;
* @return {string}
*/
proto.cosmos.gov.v1.MsgVote.prototype.getVoter = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 2, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmos.gov.v1.MsgVote} returns this
*/
proto.cosmos.gov.v1.MsgVote.prototype.setVoter = function (value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional VoteOption option = 3;
* @return {!proto.cosmos.gov.v1.VoteOption}
*/
proto.cosmos.gov.v1.MsgVote.prototype.getOption = function () {
return (
/** @type {!proto.cosmos.gov.v1.VoteOption} */
jspb.Message.getFieldWithDefault(this, 3, 0)
);
};
/**
* @param {!proto.cosmos.gov.v1.VoteOption} value
* @return {!proto.cosmos.gov.v1.MsgVote} returns this
*/
proto.cosmos.gov.v1.MsgVote.prototype.setOption = function (value) {
return jspb.Message.setProto3EnumField(this, 3, value);
};
/**
* optional string metadata = 4;
* @return {string}
*/
proto.cosmos.gov.v1.MsgVote.prototype.getMetadata = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 4, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmos.gov.v1.MsgVote} returns this
*/
proto.cosmos.gov.v1.MsgVote.prototype.setMetadata = function (value) {
return jspb.Message.setProto3StringField(this, 4, 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.gov.v1.MsgVoteResponse.prototype.toObject = function (opt_includeInstance) {
return proto.cosmos.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.cosmos.gov.v1.MsgVoteResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.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.cosmos.gov.v1.MsgVoteResponse}
*/
proto.cosmos.gov.v1.MsgVoteResponse.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmos.gov.v1.MsgVoteResponse();
return proto.cosmos.gov.v1.MsgVoteResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.gov.v1.MsgVoteResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.gov.v1.MsgVoteResponse}
*/
proto.cosmos.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.cosmos.gov.v1.MsgVoteResponse.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmos.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.cosmos.gov.v1.MsgVoteResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.gov.v1.MsgVoteResponse.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.cosmos.gov.v1.MsgVoteWeighted.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.cosmos.gov.v1.MsgVoteWeighted.prototype.toObject = function (opt_includeInstance) {
return proto.cosmos.gov.v1.MsgVoteWeighted.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.gov.v1.MsgVoteWeighted} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.gov.v1.MsgVoteWeighted.toObject = function (includeInstance, msg) {
var f,
obj = {
proposalId: jspb.Message.getFieldWithDefault(msg, 1, 0),
voter: jspb.Message.getFieldWithDefault(msg, 2, ""),
optionsList: jspb.Message.toObjectList(msg.getOptionsList(), cosmos_gov_v1_gov_pb.WeightedVoteOption.toObject, includeInstance),
metadata: jspb.Message.getFieldWithDefault(msg, 4, "")
};
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.gov.v1.MsgVoteWeighted}
*/
proto.cosmos.gov.v1.MsgVoteWeighted.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmos.gov.v1.MsgVoteWeighted();
return proto.cosmos.gov.v1.MsgVoteWeighted.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.gov.v1.MsgVoteWeighted} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.gov.v1.MsgVoteWeighted}
*/
proto.cosmos.gov.v1.MsgVoteWeighted.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 = new cosmos_gov_v1_gov_pb.WeightedVoteOption();
reader.readMessage(value, cosmos_gov_v1_gov_pb.WeightedVoteOption.deserializeBinaryFromReader);
msg.addOptions(value);
break;
case 4:
var value =
/** @type {string} */
reader.readString();
msg.setMetadata(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmos.gov.v1.MsgVoteWeighted.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmos.gov.v1.MsgVoteWeighted.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.gov.v1.MsgVoteWeighted} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.gov.v1.MsgVoteWeighted.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.getOptionsList();
if (f.length > 0) {
writer.writeRepeatedMessage(3, f, cosmos_gov_v1_gov_pb.WeightedVoteOption.serializeBinaryToWriter);
}
f = message.getMetadata();
if (f.length > 0) {
writer.writeString(4, f);
}
};
/**
* optional uint64 proposal_id = 1;
* @return {number}
*/
proto.cosmos.gov.v1.MsgVoteWeighted.prototype.getProposalId = function () {
return (
/** @type {number} */
jspb.Message.getFieldWithDefault(this, 1, 0)
);
};
/**
* @param {number} value
* @return {!proto.cosmos.gov.v1.MsgVoteWeighted} returns this
*/
proto.cosmos.gov.v1.MsgVoteWeighted.prototype.setProposalId = function (value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional string voter = 2;
* @return {string}
*/
proto.cosmos.gov.v1.MsgVoteWeighted.prototype.getVoter = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 2, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmos.gov.v1.MsgVoteWeighted} returns this
*/
proto.cosmos.gov.v1.MsgVoteWeighted.prototype.setVoter = function (value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* repeated WeightedVoteOption options = 3;
* @return {!Array<!proto.cosmos.gov.v1.WeightedVoteOption>}
*/
proto.cosmos.gov.v1.MsgVoteWeighted.prototype.getOptionsList = function () {
return (
/** @type{!Array<!proto.cosmos.gov.v1.WeightedVoteOption>} */
jspb.Message.getRepeatedWrapperField(this, cosmos_gov_v1_gov_pb.WeightedVoteOption, 3)
);
};
/**
* @param {!Array<!proto.cosmos.gov.v1.WeightedVoteOption>} value
* @return {!proto.cosmos.gov.v1.MsgVoteWeighted} returns this
*/
proto.cosmos.gov.v1.MsgVoteWeighted.prototype.setOptionsList = function (value) {
return jspb.Message.setRepeatedWrapperField(this, 3, value);
};
/**
* @param {!proto.cosmos.gov.v1.WeightedVoteOption=} opt_value
* @param {number=} opt_index
* @return {!proto.cosmos.gov.v1.WeightedVoteOption}
*/
proto.cosmos.gov.v1.MsgVoteWeighted.prototype.addOptions = function (opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.gov.v1.WeightedVoteOption, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.cosmos.gov.v1.MsgVoteWeighted} returns this
*/
proto.cosmos.gov.v1.MsgVoteWeighted.prototype.clearOptionsList = function () {
return this.setOptionsList([]);
};
/**
* optional string metadata = 4;
* @return {string}
*/
proto.cosmos.gov.v1.MsgVoteWeighted.prototype.getMetadata = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 4, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmos.gov.v1.MsgVoteWeighted} returns this
*/
proto.cosmos.gov.v1.MsgVoteWeighted.prototype.setMetadata = function (value) {
return jspb.Message.setProto3StringField(this, 4, 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.gov.v1.MsgVoteWeightedResponse.prototype.toObject = function (opt_includeInstance) {
return proto.cosmos.gov.v1.MsgVoteWeightedResponse.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.gov.v1.MsgVoteWeightedResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.gov.v1.MsgVoteWeightedResponse.toObject = function (includeInstance, msg) {