@kaiachain/kss-bridges-celer
Version:
TypeScript client and use-cases for cBridge
3,203 lines • 93.4 kB
JavaScript
// source: sgn/gov/v1/gov.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 cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js');
goog.object.extend(proto, cosmos_proto_cosmos_pb);
var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
goog.object.extend(proto, google_protobuf_timestamp_pb);
var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js');
goog.object.extend(proto, google_protobuf_any_pb);
var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js');
goog.object.extend(proto, google_protobuf_duration_pb);
goog.exportSymbol('proto.sgn.gov.v1.AccTotalDeposit', null, global);
goog.exportSymbol('proto.sgn.gov.v1.Deposit', null, global);
goog.exportSymbol('proto.sgn.gov.v1.DepositParams', null, global);
goog.exportSymbol('proto.sgn.gov.v1.ParamChange', null, global);
goog.exportSymbol('proto.sgn.gov.v1.ParameterProposal', null, global);
goog.exportSymbol('proto.sgn.gov.v1.Params', null, global);
goog.exportSymbol('proto.sgn.gov.v1.Proposal', null, global);
goog.exportSymbol('proto.sgn.gov.v1.ProposalStatus', null, global);
goog.exportSymbol('proto.sgn.gov.v1.TallyParams', null, global);
goog.exportSymbol('proto.sgn.gov.v1.TallyResult', null, global);
goog.exportSymbol('proto.sgn.gov.v1.TextProposal', null, global);
goog.exportSymbol('proto.sgn.gov.v1.UpgradeProposal', null, global);
goog.exportSymbol('proto.sgn.gov.v1.Vote', null, global);
goog.exportSymbol('proto.sgn.gov.v1.VoteOption', null, global);
goog.exportSymbol('proto.sgn.gov.v1.VotingParams', 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.TextProposal = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.gov.v1.TextProposal, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.gov.v1.TextProposal.displayName = 'proto.sgn.gov.v1.TextProposal';
}
/**
* 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.ParamChange = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.gov.v1.ParamChange, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.gov.v1.ParamChange.displayName = 'proto.sgn.gov.v1.ParamChange';
}
/**
* 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.ParameterProposal = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.sgn.gov.v1.ParameterProposal.repeatedFields_, null);
};
goog.inherits(proto.sgn.gov.v1.ParameterProposal, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.gov.v1.ParameterProposal.displayName = 'proto.sgn.gov.v1.ParameterProposal';
}
/**
* 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.UpgradeProposal = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.gov.v1.UpgradeProposal, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.gov.v1.UpgradeProposal.displayName = 'proto.sgn.gov.v1.UpgradeProposal';
}
/**
* 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.Deposit = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.gov.v1.Deposit, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.gov.v1.Deposit.displayName = 'proto.sgn.gov.v1.Deposit';
}
/**
* 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.AccTotalDeposit = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.gov.v1.AccTotalDeposit, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.gov.v1.AccTotalDeposit.displayName = 'proto.sgn.gov.v1.AccTotalDeposit';
}
/**
* 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.Proposal = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.gov.v1.Proposal, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.gov.v1.Proposal.displayName = 'proto.sgn.gov.v1.Proposal';
}
/**
* 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.TallyResult = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.gov.v1.TallyResult, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.gov.v1.TallyResult.displayName = 'proto.sgn.gov.v1.TallyResult';
}
/**
* 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.Vote = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.gov.v1.Vote, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.gov.v1.Vote.displayName = 'proto.sgn.gov.v1.Vote';
}
/**
* 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.DepositParams = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.gov.v1.DepositParams, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.gov.v1.DepositParams.displayName = 'proto.sgn.gov.v1.DepositParams';
}
/**
* 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.VotingParams = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.gov.v1.VotingParams, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.gov.v1.VotingParams.displayName = 'proto.sgn.gov.v1.VotingParams';
}
/**
* 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.TallyParams = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.gov.v1.TallyParams, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.gov.v1.TallyParams.displayName = 'proto.sgn.gov.v1.TallyParams';
}
/**
* 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.Params = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.gov.v1.Params, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.gov.v1.Params.displayName = 'proto.sgn.gov.v1.Params';
}
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.TextProposal.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.gov.v1.TextProposal.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.TextProposal} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.gov.v1.TextProposal.toObject = function(includeInstance, msg) {
var f, obj = {
title: jspb.Message.getFieldWithDefault(msg, 1, ""),
description: 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.sgn.gov.v1.TextProposal}
*/
proto.sgn.gov.v1.TextProposal.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.gov.v1.TextProposal;
return proto.sgn.gov.v1.TextProposal.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.gov.v1.TextProposal} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.gov.v1.TextProposal}
*/
proto.sgn.gov.v1.TextProposal.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setTitle(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setDescription(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.gov.v1.TextProposal.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.gov.v1.TextProposal.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.TextProposal} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.gov.v1.TextProposal.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getTitle();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getDescription();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* optional string title = 1;
* @return {string}
*/
proto.sgn.gov.v1.TextProposal.prototype.getTitle = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.gov.v1.TextProposal} returns this
*/
proto.sgn.gov.v1.TextProposal.prototype.setTitle = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string description = 2;
* @return {string}
*/
proto.sgn.gov.v1.TextProposal.prototype.getDescription = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.gov.v1.TextProposal} returns this
*/
proto.sgn.gov.v1.TextProposal.prototype.setDescription = 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.sgn.gov.v1.ParamChange.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.gov.v1.ParamChange.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.ParamChange} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.gov.v1.ParamChange.toObject = function(includeInstance, msg) {
var f, obj = {
subspace: jspb.Message.getFieldWithDefault(msg, 1, ""),
key: jspb.Message.getFieldWithDefault(msg, 2, ""),
value: 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.ParamChange}
*/
proto.sgn.gov.v1.ParamChange.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.gov.v1.ParamChange;
return proto.sgn.gov.v1.ParamChange.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.gov.v1.ParamChange} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.gov.v1.ParamChange}
*/
proto.sgn.gov.v1.ParamChange.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.setSubspace(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setKey(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setValue(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.gov.v1.ParamChange.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.gov.v1.ParamChange.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.ParamChange} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.gov.v1.ParamChange.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSubspace();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getKey();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getValue();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
};
/**
* optional string subspace = 1;
* @return {string}
*/
proto.sgn.gov.v1.ParamChange.prototype.getSubspace = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.gov.v1.ParamChange} returns this
*/
proto.sgn.gov.v1.ParamChange.prototype.setSubspace = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string key = 2;
* @return {string}
*/
proto.sgn.gov.v1.ParamChange.prototype.getKey = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.gov.v1.ParamChange} returns this
*/
proto.sgn.gov.v1.ParamChange.prototype.setKey = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string value = 3;
* @return {string}
*/
proto.sgn.gov.v1.ParamChange.prototype.getValue = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.gov.v1.ParamChange} returns this
*/
proto.sgn.gov.v1.ParamChange.prototype.setValue = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.sgn.gov.v1.ParameterProposal.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.sgn.gov.v1.ParameterProposal.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.gov.v1.ParameterProposal.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.ParameterProposal} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.gov.v1.ParameterProposal.toObject = function(includeInstance, msg) {
var f, obj = {
title: jspb.Message.getFieldWithDefault(msg, 1, ""),
description: jspb.Message.getFieldWithDefault(msg, 2, ""),
changesList: jspb.Message.toObjectList(msg.getChangesList(),
proto.sgn.gov.v1.ParamChange.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.sgn.gov.v1.ParameterProposal}
*/
proto.sgn.gov.v1.ParameterProposal.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.gov.v1.ParameterProposal;
return proto.sgn.gov.v1.ParameterProposal.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.gov.v1.ParameterProposal} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.gov.v1.ParameterProposal}
*/
proto.sgn.gov.v1.ParameterProposal.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setTitle(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setDescription(value);
break;
case 3:
var value = new proto.sgn.gov.v1.ParamChange;
reader.readMessage(value,proto.sgn.gov.v1.ParamChange.deserializeBinaryFromReader);
msg.addChanges(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.gov.v1.ParameterProposal.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.gov.v1.ParameterProposal.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.ParameterProposal} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.gov.v1.ParameterProposal.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getTitle();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getDescription();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getChangesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
3,
f,
proto.sgn.gov.v1.ParamChange.serializeBinaryToWriter
);
}
};
/**
* optional string title = 1;
* @return {string}
*/
proto.sgn.gov.v1.ParameterProposal.prototype.getTitle = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.gov.v1.ParameterProposal} returns this
*/
proto.sgn.gov.v1.ParameterProposal.prototype.setTitle = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string description = 2;
* @return {string}
*/
proto.sgn.gov.v1.ParameterProposal.prototype.getDescription = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.gov.v1.ParameterProposal} returns this
*/
proto.sgn.gov.v1.ParameterProposal.prototype.setDescription = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* repeated ParamChange changes = 3;
* @return {!Array<!proto.sgn.gov.v1.ParamChange>}
*/
proto.sgn.gov.v1.ParameterProposal.prototype.getChangesList = function() {
return /** @type{!Array<!proto.sgn.gov.v1.ParamChange>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.sgn.gov.v1.ParamChange, 3));
};
/**
* @param {!Array<!proto.sgn.gov.v1.ParamChange>} value
* @return {!proto.sgn.gov.v1.ParameterProposal} returns this
*/
proto.sgn.gov.v1.ParameterProposal.prototype.setChangesList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 3, value);
};
/**
* @param {!proto.sgn.gov.v1.ParamChange=} opt_value
* @param {number=} opt_index
* @return {!proto.sgn.gov.v1.ParamChange}
*/
proto.sgn.gov.v1.ParameterProposal.prototype.addChanges = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.sgn.gov.v1.ParamChange, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.sgn.gov.v1.ParameterProposal} returns this
*/
proto.sgn.gov.v1.ParameterProposal.prototype.clearChangesList = function() {
return this.setChangesList([]);
};
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.UpgradeProposal.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.gov.v1.UpgradeProposal.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.UpgradeProposal} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.gov.v1.UpgradeProposal.toObject = function(includeInstance, msg) {
var f, obj = {
title: jspb.Message.getFieldWithDefault(msg, 1, ""),
description: jspb.Message.getFieldWithDefault(msg, 2, ""),
plan: msg.getPlan_asB64()
};
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.UpgradeProposal}
*/
proto.sgn.gov.v1.UpgradeProposal.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.gov.v1.UpgradeProposal;
return proto.sgn.gov.v1.UpgradeProposal.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.gov.v1.UpgradeProposal} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.gov.v1.UpgradeProposal}
*/
proto.sgn.gov.v1.UpgradeProposal.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setTitle(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setDescription(value);
break;
case 3:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setPlan(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.gov.v1.UpgradeProposal.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.gov.v1.UpgradeProposal.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.UpgradeProposal} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.gov.v1.UpgradeProposal.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getTitle();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getDescription();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getPlan_asU8();
if (f.length > 0) {
writer.writeBytes(
3,
f
);
}
};
/**
* optional string title = 1;
* @return {string}
*/
proto.sgn.gov.v1.UpgradeProposal.prototype.getTitle = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.gov.v1.UpgradeProposal} returns this
*/
proto.sgn.gov.v1.UpgradeProposal.prototype.setTitle = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string description = 2;
* @return {string}
*/
proto.sgn.gov.v1.UpgradeProposal.prototype.getDescription = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.gov.v1.UpgradeProposal} returns this
*/
proto.sgn.gov.v1.UpgradeProposal.prototype.setDescription = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional bytes plan = 3;
* @return {!(string|Uint8Array)}
*/
proto.sgn.gov.v1.UpgradeProposal.prototype.getPlan = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* optional bytes plan = 3;
* This is a type-conversion wrapper around `getPlan()`
* @return {string}
*/
proto.sgn.gov.v1.UpgradeProposal.prototype.getPlan_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getPlan()));
};
/**
* optional bytes plan = 3;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getPlan()`
* @return {!Uint8Array}
*/
proto.sgn.gov.v1.UpgradeProposal.prototype.getPlan_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getPlan()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.sgn.gov.v1.UpgradeProposal} returns this
*/
proto.sgn.gov.v1.UpgradeProposal.prototype.setPlan = function(value) {
return jspb.Message.setProto3BytesField(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.Deposit.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.gov.v1.Deposit.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.Deposit} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.gov.v1.Deposit.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.Deposit}
*/
proto.sgn.gov.v1.Deposit.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.gov.v1.Deposit;
return proto.sgn.gov.v1.Deposit.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.gov.v1.Deposit} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.gov.v1.Deposit}
*/
proto.sgn.gov.v1.Deposit.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.Deposit.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.gov.v1.Deposit.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.Deposit} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.gov.v1.Deposit.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.Deposit.prototype.getProposalId = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.sgn.gov.v1.Deposit} returns this
*/
proto.sgn.gov.v1.Deposit.prototype.setProposalId = function(value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional string depositor = 2;
* @return {string}
*/
proto.sgn.gov.v1.Deposit.prototype.getDepositor = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.gov.v1.Deposit} returns this
*/
proto.sgn.gov.v1.Deposit.prototype.setDepositor = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string amount = 3;
* @return {string}
*/
proto.sgn.gov.v1.Deposit.prototype.getAmount = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.gov.v1.Deposit} returns this
*/
proto.sgn.gov.v1.Deposit.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.AccTotalDeposit.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.gov.v1.AccTotalDeposit.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.AccTotalDeposit} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.gov.v1.AccTotalDeposit.toObject = function(includeInstance, msg) {
var f, obj = {
amount: 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.sgn.gov.v1.AccTotalDeposit}
*/
proto.sgn.gov.v1.AccTotalDeposit.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.gov.v1.AccTotalDeposit;
return proto.sgn.gov.v1.AccTotalDeposit.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.gov.v1.AccTotalDeposit} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.gov.v1.AccTotalDeposit}
*/
proto.sgn.gov.v1.AccTotalDeposit.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.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.AccTotalDeposit.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.gov.v1.AccTotalDeposit.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.AccTotalDeposit} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.gov.v1.AccTotalDeposit.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getAmount();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
};
/**
* optional string amount = 1;
* @return {string}
*/
proto.sgn.gov.v1.AccTotalDeposit.prototype.getAmount = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.gov.v1.AccTotalDeposit} returns this
*/
proto.sgn.gov.v1.AccTotalDeposit.prototype.setAmount = function(value) {
return jspb.Message.setProto3StringField(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.Proposal.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.gov.v1.Proposal.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.Proposal} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.gov.v1.Proposal.toObject = function(includeInstance, msg) {
var f, obj = {
proposalId: jspb.Message.getFieldWithDefault(msg, 1, 0),
content: (f = msg.getContent()) && google_protobuf_any_pb.Any.toObject(includeInstance, f),
status: jspb.Message.getFieldWithDefault(msg, 3, 0),
finalTallyResult: (f = msg.getFinalTallyResult()) && proto.sgn.gov.v1.TallyResult.toObject(includeInstance, f),
submitTime: (f = msg.getSubmitTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
depositEndTime: (f = msg.getDepositEndTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
totalDeposit: jspb.Message.getFieldWithDefault(msg, 7, ""),
votingStartTime: (f = msg.getVotingStartTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
votingEndTime: (f = msg.getVotingEndTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
};
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.Proposal}
*/
proto.sgn.gov.v1.Proposal.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.gov.v1.Proposal;
return proto.sgn.gov.v1.Proposal.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.gov.v1.Proposal} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.gov.v1.Proposal}
*/
proto.sgn.gov.v1.Proposal.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 = new google_protobuf_any_pb.Any;
reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader);
msg.setContent(value);
break;
case 3:
var value = /** @type {!proto.sgn.gov.v1.ProposalStatus} */ (reader.readEnum());
msg.setStatus(value);
break;
case 4:
var value = new proto.sgn.gov.v1.TallyResult;
reader.readMessage(value,proto.sgn.gov.v1.TallyResult.deserializeBinaryFromReader);
msg.setFinalTallyResult(value);
break;
case 5:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setSubmitTime(value);
break;
case 6:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setDepositEndTime(value);
break;
case 7:
var value = /** @type {string} */ (reader.readString());
msg.setTotalDeposit(value);
break;
case 8:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setVotingStartTime(value);
break;
case 9:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setVotingEndTime(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.gov.v1.Proposal.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.gov.v1.Proposal.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.Proposal} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.gov.v1.Proposal.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getProposalId();
if (f !== 0) {
writer.writeUint64(
1,
f
);
}
f = message.getContent();
if (f != null) {
writer.writeMessage(
2,
f,
google_protobuf_any_pb.Any.serializeBinaryToWriter
);
}
f = message.getStatus();
if (f !== 0.0) {
writer.writeEnum(
3,
f
);
}
f = message.getFinalTallyResult();
if (f != null) {
writer.writeMessage(
4,
f,
proto.sgn.gov.v1.TallyResult.serializeBinaryToWriter
);
}
f = message.getSubmitTime();
if (f != null) {
writer.writeMessage(
5,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = message.getDepositEndTime();
if (f != null) {
writer.writeMessage(
6,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = message.getTotalDeposit();
if (f.length > 0) {
writer.writeString(
7,
f
);
}
f = message.getVotingStartTime();
if (f != null) {
writer.writeMessage(
8,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = message.getVotingEndTime();
if (f != null) {
writer.writeMessage(
9,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
};
/**
* optional uint64 proposal_id = 1;
* @return {number}
*/
proto.sgn.gov.v1.Proposal.prototype.getProposalId = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.sgn.gov.v1.Proposal} returns this
*/
proto.sgn.gov.v1.Proposal.prototype.setProposalId = function(value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional google.protobuf.Any content = 2;
* @return {?proto.google.protobuf.Any}
*/
proto.sgn.gov.v1.Proposal.prototype.getContent = function() {
return /** @type{?proto.google.protobuf.Any} */ (
jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 2));
};
/**
* @param {?proto.google.protobuf.Any|undefined} value
* @return {!proto.sgn.gov.v1.Proposal} returns this
*/
proto.sgn.gov.v1.Proposal.prototype.setContent = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.sgn.gov.v1.Proposal} returns this
*/
proto.sgn.gov.v1.Proposal.prototype.clearContent = function() {
return this.setContent(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.sgn.gov.v1.Proposal.prototype.hasContent = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional ProposalStatus status = 3;
* @return {!proto.sgn.gov.v1.ProposalStatus}
*/
proto.sgn.gov.v1.Proposal.prototype.getStatus = function() {
return /** @type {!proto.sgn.gov.v1.ProposalStatus} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/**
* @param {!proto.sgn.gov.v1.ProposalStatus} value
* @return {!proto.sgn.gov.v1.Proposal} returns this
*/
proto.sgn.gov.v1.Proposal.prototype.setStatus = function(value) {
return jspb.Message.setProto3EnumField(this, 3, value);
};
/**
* optional TallyResult final_tally_result = 4;
* @return {?proto.sgn.gov.v1.TallyResult}
*/
proto.sgn.gov.v1.Proposal.prototype.getFinalTallyResult = function() {
return /** @type{?proto.sgn.gov.v1.TallyResult} */ (
jspb.Message.getWrapperField(this, proto.sgn.gov.v1.TallyResult, 4));
};
/**
* @param {?proto.sgn.gov.v1.TallyResult|undefined} value
* @return {!proto.sgn.gov.v1.Proposal} returns this
*/
proto.sgn.gov.v1.Proposal.prototype.setFinalTallyResult = function(value) {
return jspb.Message.setWrapperField(this, 4, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.sgn.gov.v1.Proposal} returns this
*/
proto.sgn.gov.v1.Proposal.prototype.clearFinalTallyResult = function() {
return this.setFinalTallyResult(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.sgn.gov.v1.Proposal.prototype.hasFinalTallyResult = function() {
return jspb.Message.getField(this, 4) != null;
};
/**
* optional google.protobuf.Timestamp submit_time = 5;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.sgn.gov.v1.Proposal.prototype.getSubmitTime = function() {
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5));
};
/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.sgn.gov.v1.Proposal} returns this
*/
proto.sgn.gov.v1.Proposal.prototype.setSubmitTime = function(value) {
return jspb.Message.setWrapperField(this, 5, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.sgn.gov.v1.Proposal} returns this
*/
proto.sgn.gov.v1.Proposal.prototype.clearSubmitTime = function() {
return this.setSubmitTime(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.sgn.gov.v1.Proposal.prototype.hasSubmitTime = function() {
return jspb.Message.getField(this, 5) != null;
};
/**
* optional google.protobuf.Timestamp deposit_end_time = 6;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.sgn.gov.v1.Proposal.prototype.getDepositEndTime = function() {
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6));
};
/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.sgn.gov.v1.Proposal} returns this
*/
proto.sgn.gov.v1.Proposal.prototype.setDepositEndTime = function(value) {
return jspb.Message.setWrapperField(this, 6, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.sgn.gov.v1.Proposal} returns this
*/
proto.sgn.gov.v1.Proposal.prototype.clearDepositEndTime = function() {
return this.setDepositEndTime(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.sgn.gov.v1.Proposal.prototype.hasDepositEndTime = function() {
return jspb.Message.getField(this, 6) != null;
};
/**
* optional string total_deposit = 7;
* @return {string}
*/
proto.sgn.gov.v1.Proposal.prototype.getTotalDeposit = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.gov.v1.Proposal} returns this
*/
proto.sgn.gov.v1.Proposal.prototype.setTotalDeposit = function(value) {
return jspb.Message.setProto3StringField(this, 7, value);
};
/**
* optional google.protobuf.Timestamp voting_start_time = 8;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.sgn.gov.v1.Proposal.prototype.getVotingStartTime = function() {
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 8));
};
/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.sgn.gov.v1.Proposal} returns this
*/
proto.sgn.gov.v1.Proposal.prototype.setVotingStartTime = function(value) {
return jspb.Message.setWrapperField(this, 8, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.sgn.gov.v1.Proposal} returns this
*/
proto.sgn.gov.v1.Proposal.prototype.clearVotingStartTime = function() {
return this.setVotingStartTime(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.sgn.gov.v1.Proposal.prototype.hasVotingStartTime = function() {
return jspb.Message.getField(this, 8) != null;
};
/**
* optional google.protobuf.Timestamp voting_end_time = 9;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.sgn.gov.v1.Proposal.prototype.getVotingEndTime = function() {
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 9));
};
/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.sgn.gov.v1.Proposal} returns this
*/
proto.sgn.gov.v1.Proposal.prototype.setVotingEndTime = function(value) {
return jspb.Message.setWrapperField(this, 9, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.sgn.gov.v1.Proposal} returns this
*/
proto.sgn.gov.v1.Proposal.prototype.clearVotingEndTime = function() {
return this.setVotingEndTime(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.sgn.gov.v1.Proposal.prototype.hasVotingEndTime = function() {
return jspb.Message.getField(this, 9) != null;
};
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.TallyResult.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.gov.v1.TallyResult.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.TallyResult} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.gov.v1.TallyResult.toObject = function(includeInstance, msg) {
var f, obj = {
yes: jspb.Message.getFieldWithDefault(msg, 1, ""),
abstain: jspb.Message.getFieldWithDefault(msg, 2, ""),
no: jspb.Message.getFieldWithDefault(msg, 3, ""),
noWithVeto: 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.sgn.gov.v1.TallyResult}
*/
proto.sgn.gov.v1.TallyResult.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.gov.v1.TallyResult;
return proto.sgn.gov.v1.TallyResult.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.gov.v1.TallyResult} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.gov.v1.TallyResult}
*/
proto.sgn.gov.v1.TallyResult.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.setYes(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setAbstain(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setNo(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setNoWithVeto(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.gov.v1.TallyResult.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.gov.v1.TallyResult.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.TallyResult} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.gov.v1.TallyResult.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getYes();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getAbstain();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getNo();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getNoWithVeto();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
};
/**
* optional string yes = 1;
* @return {string}
*/
proto.sgn.gov.v1.TallyResult.prototype.getYes = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.gov.v1.TallyResult} returns this
*/
proto.sgn.gov.v1.TallyResult.prototype.setYes = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string abstain = 2;
* @return {string}
*/
proto.sgn.gov.v1.TallyResult.prototype.getAbstain = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.gov.v1.TallyResult} returns this
*/
proto.sgn.gov.v1.TallyResult.prototype.setAbstain = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string no = 3;
* @return {string}
*/
proto.sgn.gov.v1.TallyResult.prototype.getNo = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.gov.v1.TallyResult} returns this
*/
proto.sgn.gov.v1.TallyResult.prototype.setNo = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional string no_with_veto = 4;
* @return {string}
*/
proto.sgn.gov.v1.TallyResult.prototype.getNoWithVeto = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.gov.v1.TallyResult} returns this
*/
proto.sgn.gov.v1.TallyResult.prototype.setNoWithVeto = 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.sgn.gov.v1.Vote.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.gov.v1.Vote.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.Vote} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.gov.v1.Vote.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.Vote}
*/
proto.sgn.gov.v1.Vote.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.gov.v1.Vote;
return proto.sgn.gov.v1.Vote.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.gov.v1.Vote} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.gov.v1.Vote}
*/
proto.sgn.gov.v1.Vote.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.Vote.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.gov.v1.Vote.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.Vote} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.gov.v1.Vote.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.Vote.prototype.getProposalId = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.sgn.gov.v1.Vote} returns this
*/
proto.sgn.gov.v1.Vote.prototype.setProposalId = function(value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional string voter = 2;
* @return {string}
*/
proto.sgn.gov.v1.Vote.prototype.getVoter = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.gov.v1.Vote} returns this
*/
proto.sgn.gov.v1.Vote.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.Vote.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.Vote} returns this
*/
proto.sgn.gov.v1.Vote.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.DepositParams.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.gov.v1.DepositParams.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.DepositParams} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.gov.v1.DepositParams.toObject = function(includeInstance, msg) {
var f, obj = {
minDeposit: jspb.Message.getFieldWithDefault(msg, 1, ""),
maxDepositPeriod: (f = msg.getMaxDepositPeriod()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f)
};
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.DepositParams}
*/
proto.sgn.gov.v1.DepositParams.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.gov.v1.DepositParams;
return proto.sgn.gov.v1.DepositParams.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.gov.v1.DepositParams} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.gov.v1.DepositParams}
*/
proto.sgn.gov.v1.DepositParams.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.setMinDeposit(value);
break;
case 2:
var value = new google_protobuf_duration_pb.Duration;
reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader);
msg.setMaxDepositPeriod(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.gov.v1.DepositParams.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.gov.v1.DepositParams.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.DepositParams} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.gov.v1.DepositParams.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getMinDeposit();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getMaxDepositPeriod();
if (f != null) {
writer.writeMessage(
2,
f,
google_protobuf_duration_pb.Duration.serializeBinaryToWriter
);
}
};
/**
* optional string min_deposit = 1;
* @return {string}
*/
proto.sgn.gov.v1.DepositParams.prototype.getMinDeposit = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.gov.v1.DepositParams} returns this
*/
proto.sgn.gov.v1.DepositParams.prototype.setMinDeposit = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional google.protobuf.Duration max_deposit_period = 2;
* @return {?proto.google.protobuf.Duration}
*/
proto.sgn.gov.v1.DepositParams.prototype.getMaxDepositPeriod = function() {
return /** @type{?proto.google.protobuf.Duration} */ (
jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 2));
};
/**
* @param {?proto.google.protobuf.Duration|undefined} value
* @return {!proto.sgn.gov.v1.DepositParams} returns this
*/
proto.sgn.gov.v1.DepositParams.prototype.setMaxDepositPeriod = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.sgn.gov.v1.DepositParams} returns this
*/
proto.sgn.gov.v1.DepositParams.prototype.clearMaxDepositPeriod = function() {
return this.setMaxDepositPeriod(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.sgn.gov.v1.DepositParams.prototype.hasMaxDepositPeriod = function() {
return jspb.Message.getField(this, 2) != null;
};
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.VotingParams.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.gov.v1.VotingParams.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.VotingParams} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.gov.v1.VotingParams.toObject = function(includeInstance, msg) {
var f, obj = {
votingPeriod: (f = msg.getVotingPeriod()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f)
};
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.VotingParams}
*/
proto.sgn.gov.v1.VotingParams.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.gov.v1.VotingParams;
return proto.sgn.gov.v1.VotingParams.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.gov.v1.VotingParams} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.gov.v1.VotingParams}
*/
proto.sgn.gov.v1.VotingParams.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new google_protobuf_duration_pb.Duration;
reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader);
msg.setVotingPeriod(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.gov.v1.VotingParams.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.gov.v1.VotingParams.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.VotingParams} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.gov.v1.VotingParams.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getVotingPeriod();
if (f != null) {
writer.writeMessage(
1,
f,
google_protobuf_duration_pb.Duration.serializeBinaryToWriter
);
}
};
/**
* optional google.protobuf.Duration voting_period = 1;
* @return {?proto.google.protobuf.Duration}
*/
proto.sgn.gov.v1.VotingParams.prototype.getVotingPeriod = function() {
return /** @type{?proto.google.protobuf.Duration} */ (
jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 1));
};
/**
* @param {?proto.google.protobuf.Duration|undefined} value
* @return {!proto.sgn.gov.v1.VotingParams} returns this
*/
proto.sgn.gov.v1.VotingParams.prototype.setVotingPeriod = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.sgn.gov.v1.VotingParams} returns this
*/
proto.sgn.gov.v1.VotingParams.prototype.clearVotingPeriod = function() {
return this.setVotingPeriod(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.sgn.gov.v1.VotingParams.prototype.hasVotingPeriod = function() {
return jspb.Message.getField(this, 1) != null;
};
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.TallyParams.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.gov.v1.TallyParams.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.TallyParams} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.gov.v1.TallyParams.toObject = function(includeInstance, msg) {
var f, obj = {
quorum: msg.getQuorum_asB64(),
threshold: msg.getThreshold_asB64(),
veto: msg.getVeto_asB64()
};
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.TallyParams}
*/
proto.sgn.gov.v1.TallyParams.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.gov.v1.TallyParams;
return proto.sgn.gov.v1.TallyParams.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.gov.v1.TallyParams} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.gov.v1.TallyParams}
*/
proto.sgn.gov.v1.TallyParams.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setQuorum(value);
break;
case 2:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setThreshold(value);
break;
case 3:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setVeto(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.gov.v1.TallyParams.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.gov.v1.TallyParams.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.TallyParams} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.gov.v1.TallyParams.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getQuorum_asU8();
if (f.length > 0) {
writer.writeBytes(
1,
f
);
}
f = message.getThreshold_asU8();
if (f.length > 0) {
writer.writeBytes(
2,
f
);
}
f = message.getVeto_asU8();
if (f.length > 0) {
writer.writeBytes(
3,
f
);
}
};
/**
* optional bytes quorum = 1;
* @return {!(string|Uint8Array)}
*/
proto.sgn.gov.v1.TallyParams.prototype.getQuorum = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* optional bytes quorum = 1;
* This is a type-conversion wrapper around `getQuorum()`
* @return {string}
*/
proto.sgn.gov.v1.TallyParams.prototype.getQuorum_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getQuorum()));
};
/**
* optional bytes quorum = 1;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getQuorum()`
* @return {!Uint8Array}
*/
proto.sgn.gov.v1.TallyParams.prototype.getQuorum_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getQuorum()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.sgn.gov.v1.TallyParams} returns this
*/
proto.sgn.gov.v1.TallyParams.prototype.setQuorum = function(value) {
return jspb.Message.setProto3BytesField(this, 1, value);
};
/**
* optional bytes threshold = 2;
* @return {!(string|Uint8Array)}
*/
proto.sgn.gov.v1.TallyParams.prototype.getThreshold = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* optional bytes threshold = 2;
* This is a type-conversion wrapper around `getThreshold()`
* @return {string}
*/
proto.sgn.gov.v1.TallyParams.prototype.getThreshold_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getThreshold()));
};
/**
* optional bytes threshold = 2;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getThreshold()`
* @return {!Uint8Array}
*/
proto.sgn.gov.v1.TallyParams.prototype.getThreshold_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getThreshold()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.sgn.gov.v1.TallyParams} returns this
*/
proto.sgn.gov.v1.TallyParams.prototype.setThreshold = function(value) {
return jspb.Message.setProto3BytesField(this, 2, value);
};
/**
* optional bytes veto = 3;
* @return {!(string|Uint8Array)}
*/
proto.sgn.gov.v1.TallyParams.prototype.getVeto = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* optional bytes veto = 3;
* This is a type-conversion wrapper around `getVeto()`
* @return {string}
*/
proto.sgn.gov.v1.TallyParams.prototype.getVeto_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getVeto()));
};
/**
* optional bytes veto = 3;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getVeto()`
* @return {!Uint8Array}
*/
proto.sgn.gov.v1.TallyParams.prototype.getVeto_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getVeto()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.sgn.gov.v1.TallyParams} returns this
*/
proto.sgn.gov.v1.TallyParams.prototype.setVeto = function(value) {
return jspb.Message.setProto3BytesField(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.Params.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.gov.v1.Params.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.Params} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.gov.v1.Params.toObject = function(includeInstance, msg) {
var f, obj = {
votingParams: (f = msg.getVotingParams()) && proto.sgn.gov.v1.VotingParams.toObject(includeInstance, f),
tallyParams: (f = msg.getTallyParams()) && proto.sgn.gov.v1.TallyParams.toObject(includeInstance, f),
depositParams: (f = msg.getDepositParams()) && proto.sgn.gov.v1.DepositParams.toObject(includeInstance, f)
};
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.Params}
*/
proto.sgn.gov.v1.Params.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.gov.v1.Params;
return proto.sgn.gov.v1.Params.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.gov.v1.Params} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.gov.v1.Params}
*/
proto.sgn.gov.v1.Params.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.sgn.gov.v1.VotingParams;
reader.readMessage(value,proto.sgn.gov.v1.VotingParams.deserializeBinaryFromReader);
msg.setVotingParams(value);
break;
case 2:
var value = new proto.sgn.gov.v1.TallyParams;
reader.readMessage(value,proto.sgn.gov.v1.TallyParams.deserializeBinaryFromReader);
msg.setTallyParams(value);
break;
case 3:
var value = new proto.sgn.gov.v1.DepositParams;
reader.readMessage(value,proto.sgn.gov.v1.DepositParams.deserializeBinaryFromReader);
msg.setDepositParams(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.gov.v1.Params.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.gov.v1.Params.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.Params} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.gov.v1.Params.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getVotingParams();
if (f != null) {
writer.writeMessage(
1,
f,
proto.sgn.gov.v1.VotingParams.serializeBinaryToWriter
);
}
f = message.getTallyParams();
if (f != null) {
writer.writeMessage(
2,
f,
proto.sgn.gov.v1.TallyParams.serializeBinaryToWriter
);
}
f = message.getDepositParams();
if (f != null) {
writer.writeMessage(
3,
f,
proto.sgn.gov.v1.DepositParams.serializeBinaryToWriter
);
}
};
/**
* optional VotingParams voting_params = 1;
* @return {?proto.sgn.gov.v1.VotingParams}
*/
proto.sgn.gov.v1.Params.prototype.getVotingParams = function() {
return /** @type{?proto.sgn.gov.v1.VotingParams} */ (
jspb.Message.getWrapperField(this, proto.sgn.gov.v1.VotingParams, 1));
};
/**
* @param {?proto.sgn.gov.v1.VotingParams|undefined} value
* @return {!proto.sgn.gov.v1.Params} returns this
*/
proto.sgn.gov.v1.Params.prototype.setVotingParams = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.sgn.gov.v1.Params} returns this
*/
proto.sgn.gov.v1.Params.prototype.clearVotingParams = function() {
return this.setVotingParams(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.sgn.gov.v1.Params.prototype.hasVotingParams = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional TallyParams tally_params = 2;
* @return {?proto.sgn.gov.v1.TallyParams}
*/
proto.sgn.gov.v1.Params.prototype.getTallyParams = function() {
return /** @type{?proto.sgn.gov.v1.TallyParams} */ (
jspb.Message.getWrapperField(this, proto.sgn.gov.v1.TallyParams, 2));
};
/**
* @param {?proto.sgn.gov.v1.TallyParams|undefined} value
* @return {!proto.sgn.gov.v1.Params} returns this
*/
proto.sgn.gov.v1.Params.prototype.setTallyParams = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.sgn.gov.v1.Params} returns this
*/
proto.sgn.gov.v1.Params.prototype.clearTallyParams = function() {
return this.setTallyParams(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.sgn.gov.v1.Params.prototype.hasTallyParams = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional DepositParams deposit_params = 3;
* @return {?proto.sgn.gov.v1.DepositParams}
*/
proto.sgn.gov.v1.Params.prototype.getDepositParams = function() {
return /** @type{?proto.sgn.gov.v1.DepositParams} */ (
jspb.Message.getWrapperField(this, proto.sgn.gov.v1.DepositParams, 3));
};
/**
* @param {?proto.sgn.gov.v1.DepositParams|undefined} value
* @return {!proto.sgn.gov.v1.Params} returns this
*/
proto.sgn.gov.v1.Params.prototype.setDepositParams = function(value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.sgn.gov.v1.Params} returns this
*/
proto.sgn.gov.v1.Params.prototype.clearDepositParams = function() {
return this.setDepositParams(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.sgn.gov.v1.Params.prototype.hasDepositParams = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* @enum {number}
*/
proto.sgn.gov.v1.VoteOption = {
VOTE_OPTION_UNSPECIFIED: 0,
VOTE_OPTION_YES: 1,
VOTE_OPTION_ABSTAIN: 2,
VOTE_OPTION_NO: 3,
VOTE_OPTION_NO_WITH_VETO: 4
};
/**
* @enum {number}
*/
proto.sgn.gov.v1.ProposalStatus = {
PROPOSAL_STATUS_UNSPECIFIED: 0,
PROPOSAL_STATUS_DEPOSIT_PERIOD: 1,
PROPOSAL_STATUS_VOTING_PERIOD: 2,
PROPOSAL_STATUS_PASSED: 3,
PROPOSAL_STATUS_REJECTED: 4,
PROPOSAL_STATUS_FAILED: 5
};
goog.object.extend(exports, proto.sgn.gov.v1);