@routerprotocol/chain-api
Version:
Router Chain API Query client with generated gRPC bindings.
1,498 lines (1,325 loc) • 104 kB
JavaScript
// source: cosmos/gov/v1/query.proto
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var cosmos_base_query_v1beta1_pagination_pb = require('../../../cosmos/base/query/v1beta1/pagination_pb.js');
goog.object.extend(proto, cosmos_base_query_v1beta1_pagination_pb);
var google_api_annotations_pb = require('../../../google/api/annotations_pb.js');
goog.object.extend(proto, google_api_annotations_pb);
var cosmos_gov_v1_gov_pb = require('../../../cosmos/gov/v1/gov_pb.js');
goog.object.extend(proto, cosmos_gov_v1_gov_pb);
var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js');
goog.object.extend(proto, cosmos_proto_cosmos_pb);
goog.exportSymbol('proto.cosmos.gov.v1.QueryDepositRequest', null, global);
goog.exportSymbol('proto.cosmos.gov.v1.QueryDepositResponse', null, global);
goog.exportSymbol('proto.cosmos.gov.v1.QueryDepositsRequest', null, global);
goog.exportSymbol('proto.cosmos.gov.v1.QueryDepositsResponse', null, global);
goog.exportSymbol('proto.cosmos.gov.v1.QueryParamsRequest', null, global);
goog.exportSymbol('proto.cosmos.gov.v1.QueryParamsResponse', null, global);
goog.exportSymbol('proto.cosmos.gov.v1.QueryProposalRequest', null, global);
goog.exportSymbol('proto.cosmos.gov.v1.QueryProposalResponse', null, global);
goog.exportSymbol('proto.cosmos.gov.v1.QueryProposalsRequest', null, global);
goog.exportSymbol('proto.cosmos.gov.v1.QueryProposalsResponse', null, global);
goog.exportSymbol('proto.cosmos.gov.v1.QueryTallyResultRequest', null, global);
goog.exportSymbol('proto.cosmos.gov.v1.QueryTallyResultResponse', null, global);
goog.exportSymbol('proto.cosmos.gov.v1.QueryVoteRequest', null, global);
goog.exportSymbol('proto.cosmos.gov.v1.QueryVoteResponse', null, global);
goog.exportSymbol('proto.cosmos.gov.v1.QueryVotesRequest', null, global);
goog.exportSymbol('proto.cosmos.gov.v1.QueryVotesResponse', 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.QueryProposalRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.gov.v1.QueryProposalRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.gov.v1.QueryProposalRequest.displayName = 'proto.cosmos.gov.v1.QueryProposalRequest';
}
/**
* 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.QueryProposalResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.gov.v1.QueryProposalResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.gov.v1.QueryProposalResponse.displayName = 'proto.cosmos.gov.v1.QueryProposalResponse';
}
/**
* 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.QueryProposalsRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.gov.v1.QueryProposalsRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.gov.v1.QueryProposalsRequest.displayName = 'proto.cosmos.gov.v1.QueryProposalsRequest';
}
/**
* 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.QueryProposalsResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.gov.v1.QueryProposalsResponse.repeatedFields_, null);
};
goog.inherits(proto.cosmos.gov.v1.QueryProposalsResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.gov.v1.QueryProposalsResponse.displayName = 'proto.cosmos.gov.v1.QueryProposalsResponse';
}
/**
* 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.QueryVoteRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.gov.v1.QueryVoteRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.gov.v1.QueryVoteRequest.displayName = 'proto.cosmos.gov.v1.QueryVoteRequest';
}
/**
* 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.QueryVoteResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.gov.v1.QueryVoteResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.gov.v1.QueryVoteResponse.displayName = 'proto.cosmos.gov.v1.QueryVoteResponse';
}
/**
* 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.QueryVotesRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.gov.v1.QueryVotesRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.gov.v1.QueryVotesRequest.displayName = 'proto.cosmos.gov.v1.QueryVotesRequest';
}
/**
* 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.QueryVotesResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.gov.v1.QueryVotesResponse.repeatedFields_, null);
};
goog.inherits(proto.cosmos.gov.v1.QueryVotesResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.gov.v1.QueryVotesResponse.displayName = 'proto.cosmos.gov.v1.QueryVotesResponse';
}
/**
* 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.QueryParamsRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.gov.v1.QueryParamsRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.gov.v1.QueryParamsRequest.displayName = 'proto.cosmos.gov.v1.QueryParamsRequest';
}
/**
* 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.QueryParamsResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.gov.v1.QueryParamsResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.gov.v1.QueryParamsResponse.displayName = 'proto.cosmos.gov.v1.QueryParamsResponse';
}
/**
* 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.QueryDepositRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.gov.v1.QueryDepositRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.gov.v1.QueryDepositRequest.displayName = 'proto.cosmos.gov.v1.QueryDepositRequest';
}
/**
* 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.QueryDepositResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.gov.v1.QueryDepositResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.gov.v1.QueryDepositResponse.displayName = 'proto.cosmos.gov.v1.QueryDepositResponse';
}
/**
* 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.QueryDepositsRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.gov.v1.QueryDepositsRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.gov.v1.QueryDepositsRequest.displayName = 'proto.cosmos.gov.v1.QueryDepositsRequest';
}
/**
* 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.QueryDepositsResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.gov.v1.QueryDepositsResponse.repeatedFields_, null);
};
goog.inherits(proto.cosmos.gov.v1.QueryDepositsResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.gov.v1.QueryDepositsResponse.displayName = 'proto.cosmos.gov.v1.QueryDepositsResponse';
}
/**
* 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.QueryTallyResultRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.gov.v1.QueryTallyResultRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.gov.v1.QueryTallyResultRequest.displayName = 'proto.cosmos.gov.v1.QueryTallyResultRequest';
}
/**
* 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.QueryTallyResultResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.gov.v1.QueryTallyResultResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.gov.v1.QueryTallyResultResponse.displayName = 'proto.cosmos.gov.v1.QueryTallyResultResponse';
}
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.QueryProposalRequest.prototype.toObject = function(opt_includeInstance) {
return proto.cosmos.gov.v1.QueryProposalRequest.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.QueryProposalRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.gov.v1.QueryProposalRequest.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.QueryProposalRequest}
*/
proto.cosmos.gov.v1.QueryProposalRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmos.gov.v1.QueryProposalRequest;
return proto.cosmos.gov.v1.QueryProposalRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.gov.v1.QueryProposalRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.gov.v1.QueryProposalRequest}
*/
proto.cosmos.gov.v1.QueryProposalRequest.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.QueryProposalRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.cosmos.gov.v1.QueryProposalRequest.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.QueryProposalRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.gov.v1.QueryProposalRequest.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.QueryProposalRequest.prototype.getProposalId = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.cosmos.gov.v1.QueryProposalRequest} returns this
*/
proto.cosmos.gov.v1.QueryProposalRequest.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.QueryProposalResponse.prototype.toObject = function(opt_includeInstance) {
return proto.cosmos.gov.v1.QueryProposalResponse.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.QueryProposalResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.gov.v1.QueryProposalResponse.toObject = function(includeInstance, msg) {
var f, obj = {
proposal: (f = msg.getProposal()) && cosmos_gov_v1_gov_pb.Proposal.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.cosmos.gov.v1.QueryProposalResponse}
*/
proto.cosmos.gov.v1.QueryProposalResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmos.gov.v1.QueryProposalResponse;
return proto.cosmos.gov.v1.QueryProposalResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.gov.v1.QueryProposalResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.gov.v1.QueryProposalResponse}
*/
proto.cosmos.gov.v1.QueryProposalResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new cosmos_gov_v1_gov_pb.Proposal;
reader.readMessage(value,cosmos_gov_v1_gov_pb.Proposal.deserializeBinaryFromReader);
msg.setProposal(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmos.gov.v1.QueryProposalResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.cosmos.gov.v1.QueryProposalResponse.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.QueryProposalResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.gov.v1.QueryProposalResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getProposal();
if (f != null) {
writer.writeMessage(
1,
f,
cosmos_gov_v1_gov_pb.Proposal.serializeBinaryToWriter
);
}
};
/**
* optional Proposal proposal = 1;
* @return {?proto.cosmos.gov.v1.Proposal}
*/
proto.cosmos.gov.v1.QueryProposalResponse.prototype.getProposal = function() {
return /** @type{?proto.cosmos.gov.v1.Proposal} */ (
jspb.Message.getWrapperField(this, cosmos_gov_v1_gov_pb.Proposal, 1));
};
/**
* @param {?proto.cosmos.gov.v1.Proposal|undefined} value
* @return {!proto.cosmos.gov.v1.QueryProposalResponse} returns this
*/
proto.cosmos.gov.v1.QueryProposalResponse.prototype.setProposal = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.cosmos.gov.v1.QueryProposalResponse} returns this
*/
proto.cosmos.gov.v1.QueryProposalResponse.prototype.clearProposal = function() {
return this.setProposal(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cosmos.gov.v1.QueryProposalResponse.prototype.hasProposal = 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.cosmos.gov.v1.QueryProposalsRequest.prototype.toObject = function(opt_includeInstance) {
return proto.cosmos.gov.v1.QueryProposalsRequest.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.QueryProposalsRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.gov.v1.QueryProposalsRequest.toObject = function(includeInstance, msg) {
var f, obj = {
proposalStatus: jspb.Message.getFieldWithDefault(msg, 1, 0),
voter: jspb.Message.getFieldWithDefault(msg, 2, ""),
depositor: jspb.Message.getFieldWithDefault(msg, 3, ""),
pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.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.cosmos.gov.v1.QueryProposalsRequest}
*/
proto.cosmos.gov.v1.QueryProposalsRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmos.gov.v1.QueryProposalsRequest;
return proto.cosmos.gov.v1.QueryProposalsRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.gov.v1.QueryProposalsRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.gov.v1.QueryProposalsRequest}
*/
proto.cosmos.gov.v1.QueryProposalsRequest.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!proto.cosmos.gov.v1.ProposalStatus} */ (reader.readEnum());
msg.setProposalStatus(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setVoter(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setDepositor(value);
break;
case 4:
var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest;
reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader);
msg.setPagination(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmos.gov.v1.QueryProposalsRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.cosmos.gov.v1.QueryProposalsRequest.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.QueryProposalsRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.gov.v1.QueryProposalsRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getProposalStatus();
if (f !== 0.0) {
writer.writeEnum(
1,
f
);
}
f = message.getVoter();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getDepositor();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getPagination();
if (f != null) {
writer.writeMessage(
4,
f,
cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter
);
}
};
/**
* optional ProposalStatus proposal_status = 1;
* @return {!proto.cosmos.gov.v1.ProposalStatus}
*/
proto.cosmos.gov.v1.QueryProposalsRequest.prototype.getProposalStatus = function() {
return /** @type {!proto.cosmos.gov.v1.ProposalStatus} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {!proto.cosmos.gov.v1.ProposalStatus} value
* @return {!proto.cosmos.gov.v1.QueryProposalsRequest} returns this
*/
proto.cosmos.gov.v1.QueryProposalsRequest.prototype.setProposalStatus = function(value) {
return jspb.Message.setProto3EnumField(this, 1, value);
};
/**
* optional string voter = 2;
* @return {string}
*/
proto.cosmos.gov.v1.QueryProposalsRequest.prototype.getVoter = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.cosmos.gov.v1.QueryProposalsRequest} returns this
*/
proto.cosmos.gov.v1.QueryProposalsRequest.prototype.setVoter = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string depositor = 3;
* @return {string}
*/
proto.cosmos.gov.v1.QueryProposalsRequest.prototype.getDepositor = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.cosmos.gov.v1.QueryProposalsRequest} returns this
*/
proto.cosmos.gov.v1.QueryProposalsRequest.prototype.setDepositor = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional cosmos.base.query.v1beta1.PageRequest pagination = 4;
* @return {?proto.cosmos.base.query.v1beta1.PageRequest}
*/
proto.cosmos.gov.v1.QueryProposalsRequest.prototype.getPagination = function() {
return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ (
jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 4));
};
/**
* @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value
* @return {!proto.cosmos.gov.v1.QueryProposalsRequest} returns this
*/
proto.cosmos.gov.v1.QueryProposalsRequest.prototype.setPagination = function(value) {
return jspb.Message.setWrapperField(this, 4, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.cosmos.gov.v1.QueryProposalsRequest} returns this
*/
proto.cosmos.gov.v1.QueryProposalsRequest.prototype.clearPagination = function() {
return this.setPagination(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cosmos.gov.v1.QueryProposalsRequest.prototype.hasPagination = function() {
return jspb.Message.getField(this, 4) != null;
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.cosmos.gov.v1.QueryProposalsResponse.repeatedFields_ = [1];
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.QueryProposalsResponse.prototype.toObject = function(opt_includeInstance) {
return proto.cosmos.gov.v1.QueryProposalsResponse.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.QueryProposalsResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.gov.v1.QueryProposalsResponse.toObject = function(includeInstance, msg) {
var f, obj = {
proposalsList: jspb.Message.toObjectList(msg.getProposalsList(),
cosmos_gov_v1_gov_pb.Proposal.toObject, includeInstance),
pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.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.cosmos.gov.v1.QueryProposalsResponse}
*/
proto.cosmos.gov.v1.QueryProposalsResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmos.gov.v1.QueryProposalsResponse;
return proto.cosmos.gov.v1.QueryProposalsResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.gov.v1.QueryProposalsResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.gov.v1.QueryProposalsResponse}
*/
proto.cosmos.gov.v1.QueryProposalsResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new cosmos_gov_v1_gov_pb.Proposal;
reader.readMessage(value,cosmos_gov_v1_gov_pb.Proposal.deserializeBinaryFromReader);
msg.addProposals(value);
break;
case 2:
var value = new cosmos_base_query_v1beta1_pagination_pb.PageResponse;
reader.readMessage(value,cosmos_base_query_v1beta1_pagination_pb.PageResponse.deserializeBinaryFromReader);
msg.setPagination(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmos.gov.v1.QueryProposalsResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.cosmos.gov.v1.QueryProposalsResponse.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.QueryProposalsResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.gov.v1.QueryProposalsResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getProposalsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
f,
cosmos_gov_v1_gov_pb.Proposal.serializeBinaryToWriter
);
}
f = message.getPagination();
if (f != null) {
writer.writeMessage(
2,
f,
cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter
);
}
};
/**
* repeated Proposal proposals = 1;
* @return {!Array<!proto.cosmos.gov.v1.Proposal>}
*/
proto.cosmos.gov.v1.QueryProposalsResponse.prototype.getProposalsList = function() {
return /** @type{!Array<!proto.cosmos.gov.v1.Proposal>} */ (
jspb.Message.getRepeatedWrapperField(this, cosmos_gov_v1_gov_pb.Proposal, 1));
};
/**
* @param {!Array<!proto.cosmos.gov.v1.Proposal>} value
* @return {!proto.cosmos.gov.v1.QueryProposalsResponse} returns this
*/
proto.cosmos.gov.v1.QueryProposalsResponse.prototype.setProposalsList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 1, value);
};
/**
* @param {!proto.cosmos.gov.v1.Proposal=} opt_value
* @param {number=} opt_index
* @return {!proto.cosmos.gov.v1.Proposal}
*/
proto.cosmos.gov.v1.QueryProposalsResponse.prototype.addProposals = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.gov.v1.Proposal, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.cosmos.gov.v1.QueryProposalsResponse} returns this
*/
proto.cosmos.gov.v1.QueryProposalsResponse.prototype.clearProposalsList = function() {
return this.setProposalsList([]);
};
/**
* optional cosmos.base.query.v1beta1.PageResponse pagination = 2;
* @return {?proto.cosmos.base.query.v1beta1.PageResponse}
*/
proto.cosmos.gov.v1.QueryProposalsResponse.prototype.getPagination = function() {
return /** @type{?proto.cosmos.base.query.v1beta1.PageResponse} */ (
jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageResponse, 2));
};
/**
* @param {?proto.cosmos.base.query.v1beta1.PageResponse|undefined} value
* @return {!proto.cosmos.gov.v1.QueryProposalsResponse} returns this
*/
proto.cosmos.gov.v1.QueryProposalsResponse.prototype.setPagination = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.cosmos.gov.v1.QueryProposalsResponse} returns this
*/
proto.cosmos.gov.v1.QueryProposalsResponse.prototype.clearPagination = function() {
return this.setPagination(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cosmos.gov.v1.QueryProposalsResponse.prototype.hasPagination = 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.cosmos.gov.v1.QueryVoteRequest.prototype.toObject = function(opt_includeInstance) {
return proto.cosmos.gov.v1.QueryVoteRequest.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.QueryVoteRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.gov.v1.QueryVoteRequest.toObject = function(includeInstance, msg) {
var f, obj = {
proposalId: jspb.Message.getFieldWithDefault(msg, 1, 0),
voter: 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.QueryVoteRequest}
*/
proto.cosmos.gov.v1.QueryVoteRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmos.gov.v1.QueryVoteRequest;
return proto.cosmos.gov.v1.QueryVoteRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.gov.v1.QueryVoteRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.gov.v1.QueryVoteRequest}
*/
proto.cosmos.gov.v1.QueryVoteRequest.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;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmos.gov.v1.QueryVoteRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.cosmos.gov.v1.QueryVoteRequest.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.QueryVoteRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.gov.v1.QueryVoteRequest.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
);
}
};
/**
* optional uint64 proposal_id = 1;
* @return {number}
*/
proto.cosmos.gov.v1.QueryVoteRequest.prototype.getProposalId = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.cosmos.gov.v1.QueryVoteRequest} returns this
*/
proto.cosmos.gov.v1.QueryVoteRequest.prototype.setProposalId = function(value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional string voter = 2;
* @return {string}
*/
proto.cosmos.gov.v1.QueryVoteRequest.prototype.getVoter = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.cosmos.gov.v1.QueryVoteRequest} returns this
*/
proto.cosmos.gov.v1.QueryVoteRequest.prototype.setVoter = 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.QueryVoteResponse.prototype.toObject = function(opt_includeInstance) {
return proto.cosmos.gov.v1.QueryVoteResponse.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.QueryVoteResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.gov.v1.QueryVoteResponse.toObject = function(includeInstance, msg) {
var f, obj = {
vote: (f = msg.getVote()) && cosmos_gov_v1_gov_pb.Vote.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.cosmos.gov.v1.QueryVoteResponse}
*/
proto.cosmos.gov.v1.QueryVoteResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmos.gov.v1.QueryVoteResponse;
return proto.cosmos.gov.v1.QueryVoteResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.gov.v1.QueryVoteResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.gov.v1.QueryVoteResponse}
*/
proto.cosmos.gov.v1.QueryVoteResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new cosmos_gov_v1_gov_pb.Vote;
reader.readMessage(value,cosmos_gov_v1_gov_pb.Vote.deserializeBinaryFromReader);
msg.setVote(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmos.gov.v1.QueryVoteResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.cosmos.gov.v1.QueryVoteResponse.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.QueryVoteResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.gov.v1.QueryVoteResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getVote();
if (f != null) {
writer.writeMessage(
1,
f,
cosmos_gov_v1_gov_pb.Vote.serializeBinaryToWriter
);
}
};
/**
* optional Vote vote = 1;
* @return {?proto.cosmos.gov.v1.Vote}
*/
proto.cosmos.gov.v1.QueryVoteResponse.prototype.getVote = function() {
return /** @type{?proto.cosmos.gov.v1.Vote} */ (
jspb.Message.getWrapperField(this, cosmos_gov_v1_gov_pb.Vote, 1));
};
/**
* @param {?proto.cosmos.gov.v1.Vote|undefined} value
* @return {!proto.cosmos.gov.v1.QueryVoteResponse} returns this
*/
proto.cosmos.gov.v1.QueryVoteResponse.prototype.setVote = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.cosmos.gov.v1.QueryVoteResponse} returns this
*/
proto.cosmos.gov.v1.QueryVoteResponse.prototype.clearVote = function() {
return this.setVote(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cosmos.gov.v1.QueryVoteResponse.prototype.hasVote = 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.cosmos.gov.v1.QueryVotesRequest.prototype.toObject = function(opt_includeInstance) {
return proto.cosmos.gov.v1.QueryVotesRequest.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.QueryVotesRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.gov.v1.QueryVotesRequest.toObject = function(includeInstance, msg) {
var f, obj = {
proposalId: jspb.Message.getFieldWithDefault(msg, 1, 0),
pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.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.cosmos.gov.v1.QueryVotesRequest}
*/
proto.cosmos.gov.v1.QueryVotesRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmos.gov.v1.QueryVotesRequest;
return proto.cosmos.gov.v1.QueryVotesRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.gov.v1.QueryVotesRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.gov.v1.QueryVotesRequest}
*/
proto.cosmos.gov.v1.QueryVotesRequest.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 cosmos_base_query_v1beta1_pagination_pb.PageRequest;
reader.readMessage(value,cosmos_base_query_v1beta1_pa