@kaiachain/kss-bridges-celer
Version:
TypeScript client and use-cases for cBridge
1,416 lines (1,256 loc) • 106 kB
JavaScript
// source: sgn/staking/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() {
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 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 gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js');
goog.object.extend(proto, gogoproto_gogo_pb);
var google_api_annotations_pb = require('../../../google/api/annotations_pb.js');
goog.object.extend(proto, google_api_annotations_pb);
var sgn_staking_v1_staking_pb = require('../../../sgn/staking/v1/staking_pb.js');
goog.object.extend(proto, sgn_staking_v1_staking_pb);
goog.exportSymbol('proto.sgn.staking.v1.QueryDelegationRequest', null, global);
goog.exportSymbol('proto.sgn.staking.v1.QueryDelegationResponse', null, global);
goog.exportSymbol('proto.sgn.staking.v1.QueryDelegatorDelegationsRequest', null, global);
goog.exportSymbol('proto.sgn.staking.v1.QueryDelegatorDelegationsResponse', null, global);
goog.exportSymbol('proto.sgn.staking.v1.QueryDelegatorValidatorRequest', null, global);
goog.exportSymbol('proto.sgn.staking.v1.QueryDelegatorValidatorResponse', null, global);
goog.exportSymbol('proto.sgn.staking.v1.QueryDelegatorValidatorsRequest', null, global);
goog.exportSymbol('proto.sgn.staking.v1.QueryDelegatorValidatorsResponse', null, global);
goog.exportSymbol('proto.sgn.staking.v1.QueryParamsRequest', null, global);
goog.exportSymbol('proto.sgn.staking.v1.QueryParamsResponse', null, global);
goog.exportSymbol('proto.sgn.staking.v1.QueryValidatorDelegationsRequest', null, global);
goog.exportSymbol('proto.sgn.staking.v1.QueryValidatorDelegationsResponse', null, global);
goog.exportSymbol('proto.sgn.staking.v1.QueryValidatorRequest', null, global);
goog.exportSymbol('proto.sgn.staking.v1.QueryValidatorResponse', null, global);
goog.exportSymbol('proto.sgn.staking.v1.QueryValidatorsRequest', null, global);
goog.exportSymbol('proto.sgn.staking.v1.QueryValidatorsResponse', 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.staking.v1.QueryValidatorsRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.staking.v1.QueryValidatorsRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.staking.v1.QueryValidatorsRequest.displayName = 'proto.sgn.staking.v1.QueryValidatorsRequest';
}
/**
* 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.staking.v1.QueryValidatorsResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.sgn.staking.v1.QueryValidatorsResponse.repeatedFields_, null);
};
goog.inherits(proto.sgn.staking.v1.QueryValidatorsResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.staking.v1.QueryValidatorsResponse.displayName = 'proto.sgn.staking.v1.QueryValidatorsResponse';
}
/**
* 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.staking.v1.QueryValidatorRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.staking.v1.QueryValidatorRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.staking.v1.QueryValidatorRequest.displayName = 'proto.sgn.staking.v1.QueryValidatorRequest';
}
/**
* 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.staking.v1.QueryValidatorResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.staking.v1.QueryValidatorResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.staking.v1.QueryValidatorResponse.displayName = 'proto.sgn.staking.v1.QueryValidatorResponse';
}
/**
* 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.staking.v1.QueryValidatorDelegationsRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.staking.v1.QueryValidatorDelegationsRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.staking.v1.QueryValidatorDelegationsRequest.displayName = 'proto.sgn.staking.v1.QueryValidatorDelegationsRequest';
}
/**
* 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.staking.v1.QueryValidatorDelegationsResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.sgn.staking.v1.QueryValidatorDelegationsResponse.repeatedFields_, null);
};
goog.inherits(proto.sgn.staking.v1.QueryValidatorDelegationsResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.staking.v1.QueryValidatorDelegationsResponse.displayName = 'proto.sgn.staking.v1.QueryValidatorDelegationsResponse';
}
/**
* 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.staking.v1.QueryDelegationRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.staking.v1.QueryDelegationRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.staking.v1.QueryDelegationRequest.displayName = 'proto.sgn.staking.v1.QueryDelegationRequest';
}
/**
* 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.staking.v1.QueryDelegationResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.staking.v1.QueryDelegationResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.staking.v1.QueryDelegationResponse.displayName = 'proto.sgn.staking.v1.QueryDelegationResponse';
}
/**
* 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.staking.v1.QueryDelegatorDelegationsRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.staking.v1.QueryDelegatorDelegationsRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.staking.v1.QueryDelegatorDelegationsRequest.displayName = 'proto.sgn.staking.v1.QueryDelegatorDelegationsRequest';
}
/**
* 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.staking.v1.QueryDelegatorDelegationsResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.sgn.staking.v1.QueryDelegatorDelegationsResponse.repeatedFields_, null);
};
goog.inherits(proto.sgn.staking.v1.QueryDelegatorDelegationsResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.staking.v1.QueryDelegatorDelegationsResponse.displayName = 'proto.sgn.staking.v1.QueryDelegatorDelegationsResponse';
}
/**
* 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.staking.v1.QueryDelegatorValidatorsRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.staking.v1.QueryDelegatorValidatorsRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.staking.v1.QueryDelegatorValidatorsRequest.displayName = 'proto.sgn.staking.v1.QueryDelegatorValidatorsRequest';
}
/**
* 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.staking.v1.QueryDelegatorValidatorsResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.sgn.staking.v1.QueryDelegatorValidatorsResponse.repeatedFields_, null);
};
goog.inherits(proto.sgn.staking.v1.QueryDelegatorValidatorsResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.staking.v1.QueryDelegatorValidatorsResponse.displayName = 'proto.sgn.staking.v1.QueryDelegatorValidatorsResponse';
}
/**
* 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.staking.v1.QueryDelegatorValidatorRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.staking.v1.QueryDelegatorValidatorRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.staking.v1.QueryDelegatorValidatorRequest.displayName = 'proto.sgn.staking.v1.QueryDelegatorValidatorRequest';
}
/**
* 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.staking.v1.QueryDelegatorValidatorResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.staking.v1.QueryDelegatorValidatorResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.staking.v1.QueryDelegatorValidatorResponse.displayName = 'proto.sgn.staking.v1.QueryDelegatorValidatorResponse';
}
/**
* 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.staking.v1.QueryParamsRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.staking.v1.QueryParamsRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.staking.v1.QueryParamsRequest.displayName = 'proto.sgn.staking.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.sgn.staking.v1.QueryParamsResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.sgn.staking.v1.QueryParamsResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.sgn.staking.v1.QueryParamsResponse.displayName = 'proto.sgn.staking.v1.QueryParamsResponse';
}
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.staking.v1.QueryValidatorsRequest.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.staking.v1.QueryValidatorsRequest.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.staking.v1.QueryValidatorsRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.staking.v1.QueryValidatorsRequest.toObject = function(includeInstance, msg) {
var f, obj = {
status: jspb.Message.getFieldWithDefault(msg, 1, ""),
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.sgn.staking.v1.QueryValidatorsRequest}
*/
proto.sgn.staking.v1.QueryValidatorsRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.staking.v1.QueryValidatorsRequest;
return proto.sgn.staking.v1.QueryValidatorsRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.staking.v1.QueryValidatorsRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.staking.v1.QueryValidatorsRequest}
*/
proto.sgn.staking.v1.QueryValidatorsRequest.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.setStatus(value);
break;
case 2:
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.sgn.staking.v1.QueryValidatorsRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.staking.v1.QueryValidatorsRequest.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.staking.v1.QueryValidatorsRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.staking.v1.QueryValidatorsRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getStatus();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getPagination();
if (f != null) {
writer.writeMessage(
2,
f,
cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter
);
}
};
/**
* optional string status = 1;
* @return {string}
*/
proto.sgn.staking.v1.QueryValidatorsRequest.prototype.getStatus = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.staking.v1.QueryValidatorsRequest} returns this
*/
proto.sgn.staking.v1.QueryValidatorsRequest.prototype.setStatus = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional cosmos.base.query.v1beta1.PageRequest pagination = 2;
* @return {?proto.cosmos.base.query.v1beta1.PageRequest}
*/
proto.sgn.staking.v1.QueryValidatorsRequest.prototype.getPagination = function() {
return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ (
jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 2));
};
/**
* @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value
* @return {!proto.sgn.staking.v1.QueryValidatorsRequest} returns this
*/
proto.sgn.staking.v1.QueryValidatorsRequest.prototype.setPagination = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.sgn.staking.v1.QueryValidatorsRequest} returns this
*/
proto.sgn.staking.v1.QueryValidatorsRequest.prototype.clearPagination = function() {
return this.setPagination(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.sgn.staking.v1.QueryValidatorsRequest.prototype.hasPagination = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.sgn.staking.v1.QueryValidatorsResponse.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.sgn.staking.v1.QueryValidatorsResponse.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.staking.v1.QueryValidatorsResponse.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.staking.v1.QueryValidatorsResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.staking.v1.QueryValidatorsResponse.toObject = function(includeInstance, msg) {
var f, obj = {
validatorsList: jspb.Message.toObjectList(msg.getValidatorsList(),
sgn_staking_v1_staking_pb.Validator.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.sgn.staking.v1.QueryValidatorsResponse}
*/
proto.sgn.staking.v1.QueryValidatorsResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.staking.v1.QueryValidatorsResponse;
return proto.sgn.staking.v1.QueryValidatorsResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.staking.v1.QueryValidatorsResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.staking.v1.QueryValidatorsResponse}
*/
proto.sgn.staking.v1.QueryValidatorsResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new sgn_staking_v1_staking_pb.Validator;
reader.readMessage(value,sgn_staking_v1_staking_pb.Validator.deserializeBinaryFromReader);
msg.addValidators(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.sgn.staking.v1.QueryValidatorsResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.staking.v1.QueryValidatorsResponse.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.staking.v1.QueryValidatorsResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.staking.v1.QueryValidatorsResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getValidatorsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
f,
sgn_staking_v1_staking_pb.Validator.serializeBinaryToWriter
);
}
f = message.getPagination();
if (f != null) {
writer.writeMessage(
2,
f,
cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter
);
}
};
/**
* repeated Validator validators = 1;
* @return {!Array<!proto.sgn.staking.v1.Validator>}
*/
proto.sgn.staking.v1.QueryValidatorsResponse.prototype.getValidatorsList = function() {
return /** @type{!Array<!proto.sgn.staking.v1.Validator>} */ (
jspb.Message.getRepeatedWrapperField(this, sgn_staking_v1_staking_pb.Validator, 1));
};
/**
* @param {!Array<!proto.sgn.staking.v1.Validator>} value
* @return {!proto.sgn.staking.v1.QueryValidatorsResponse} returns this
*/
proto.sgn.staking.v1.QueryValidatorsResponse.prototype.setValidatorsList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 1, value);
};
/**
* @param {!proto.sgn.staking.v1.Validator=} opt_value
* @param {number=} opt_index
* @return {!proto.sgn.staking.v1.Validator}
*/
proto.sgn.staking.v1.QueryValidatorsResponse.prototype.addValidators = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.sgn.staking.v1.Validator, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.sgn.staking.v1.QueryValidatorsResponse} returns this
*/
proto.sgn.staking.v1.QueryValidatorsResponse.prototype.clearValidatorsList = function() {
return this.setValidatorsList([]);
};
/**
* optional cosmos.base.query.v1beta1.PageResponse pagination = 2;
* @return {?proto.cosmos.base.query.v1beta1.PageResponse}
*/
proto.sgn.staking.v1.QueryValidatorsResponse.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.sgn.staking.v1.QueryValidatorsResponse} returns this
*/
proto.sgn.staking.v1.QueryValidatorsResponse.prototype.setPagination = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.sgn.staking.v1.QueryValidatorsResponse} returns this
*/
proto.sgn.staking.v1.QueryValidatorsResponse.prototype.clearPagination = function() {
return this.setPagination(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.sgn.staking.v1.QueryValidatorsResponse.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.sgn.staking.v1.QueryValidatorRequest.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.staking.v1.QueryValidatorRequest.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.staking.v1.QueryValidatorRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.staking.v1.QueryValidatorRequest.toObject = function(includeInstance, msg) {
var f, obj = {
validatorAddr: 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.staking.v1.QueryValidatorRequest}
*/
proto.sgn.staking.v1.QueryValidatorRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.staking.v1.QueryValidatorRequest;
return proto.sgn.staking.v1.QueryValidatorRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.staking.v1.QueryValidatorRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.staking.v1.QueryValidatorRequest}
*/
proto.sgn.staking.v1.QueryValidatorRequest.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.setValidatorAddr(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.staking.v1.QueryValidatorRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.staking.v1.QueryValidatorRequest.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.staking.v1.QueryValidatorRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.staking.v1.QueryValidatorRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getValidatorAddr();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
};
/**
* optional string validator_addr = 1;
* @return {string}
*/
proto.sgn.staking.v1.QueryValidatorRequest.prototype.getValidatorAddr = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.staking.v1.QueryValidatorRequest} returns this
*/
proto.sgn.staking.v1.QueryValidatorRequest.prototype.setValidatorAddr = 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.staking.v1.QueryValidatorResponse.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.staking.v1.QueryValidatorResponse.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.staking.v1.QueryValidatorResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.staking.v1.QueryValidatorResponse.toObject = function(includeInstance, msg) {
var f, obj = {
validator: (f = msg.getValidator()) && sgn_staking_v1_staking_pb.Validator.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.staking.v1.QueryValidatorResponse}
*/
proto.sgn.staking.v1.QueryValidatorResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.staking.v1.QueryValidatorResponse;
return proto.sgn.staking.v1.QueryValidatorResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.staking.v1.QueryValidatorResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.staking.v1.QueryValidatorResponse}
*/
proto.sgn.staking.v1.QueryValidatorResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new sgn_staking_v1_staking_pb.Validator;
reader.readMessage(value,sgn_staking_v1_staking_pb.Validator.deserializeBinaryFromReader);
msg.setValidator(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.sgn.staking.v1.QueryValidatorResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.staking.v1.QueryValidatorResponse.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.staking.v1.QueryValidatorResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.staking.v1.QueryValidatorResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getValidator();
if (f != null) {
writer.writeMessage(
1,
f,
sgn_staking_v1_staking_pb.Validator.serializeBinaryToWriter
);
}
};
/**
* optional Validator validator = 1;
* @return {?proto.sgn.staking.v1.Validator}
*/
proto.sgn.staking.v1.QueryValidatorResponse.prototype.getValidator = function() {
return /** @type{?proto.sgn.staking.v1.Validator} */ (
jspb.Message.getWrapperField(this, sgn_staking_v1_staking_pb.Validator, 1));
};
/**
* @param {?proto.sgn.staking.v1.Validator|undefined} value
* @return {!proto.sgn.staking.v1.QueryValidatorResponse} returns this
*/
proto.sgn.staking.v1.QueryValidatorResponse.prototype.setValidator = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.sgn.staking.v1.QueryValidatorResponse} returns this
*/
proto.sgn.staking.v1.QueryValidatorResponse.prototype.clearValidator = function() {
return this.setValidator(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.sgn.staking.v1.QueryValidatorResponse.prototype.hasValidator = 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.staking.v1.QueryValidatorDelegationsRequest.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.staking.v1.QueryValidatorDelegationsRequest.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.staking.v1.QueryValidatorDelegationsRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.staking.v1.QueryValidatorDelegationsRequest.toObject = function(includeInstance, msg) {
var f, obj = {
validatorAddr: jspb.Message.getFieldWithDefault(msg, 1, ""),
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.sgn.staking.v1.QueryValidatorDelegationsRequest}
*/
proto.sgn.staking.v1.QueryValidatorDelegationsRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.staking.v1.QueryValidatorDelegationsRequest;
return proto.sgn.staking.v1.QueryValidatorDelegationsRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.staking.v1.QueryValidatorDelegationsRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.staking.v1.QueryValidatorDelegationsRequest}
*/
proto.sgn.staking.v1.QueryValidatorDelegationsRequest.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.setValidatorAddr(value);
break;
case 2:
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.sgn.staking.v1.QueryValidatorDelegationsRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.staking.v1.QueryValidatorDelegationsRequest.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.staking.v1.QueryValidatorDelegationsRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.staking.v1.QueryValidatorDelegationsRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getValidatorAddr();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getPagination();
if (f != null) {
writer.writeMessage(
2,
f,
cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter
);
}
};
/**
* optional string validator_addr = 1;
* @return {string}
*/
proto.sgn.staking.v1.QueryValidatorDelegationsRequest.prototype.getValidatorAddr = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.sgn.staking.v1.QueryValidatorDelegationsRequest} returns this
*/
proto.sgn.staking.v1.QueryValidatorDelegationsRequest.prototype.setValidatorAddr = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional cosmos.base.query.v1beta1.PageRequest pagination = 2;
* @return {?proto.cosmos.base.query.v1beta1.PageRequest}
*/
proto.sgn.staking.v1.QueryValidatorDelegationsRequest.prototype.getPagination = function() {
return /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ (
jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 2));
};
/**
* @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value
* @return {!proto.sgn.staking.v1.QueryValidatorDelegationsRequest} returns this
*/
proto.sgn.staking.v1.QueryValidatorDelegationsRequest.prototype.setPagination = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.sgn.staking.v1.QueryValidatorDelegationsRequest} returns this
*/
proto.sgn.staking.v1.QueryValidatorDelegationsRequest.prototype.clearPagination = function() {
return this.setPagination(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.sgn.staking.v1.QueryValidatorDelegationsRequest.prototype.hasPagination = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.sgn.staking.v1.QueryValidatorDelegationsResponse.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.sgn.staking.v1.QueryValidatorDelegationsResponse.prototype.toObject = function(opt_includeInstance) {
return proto.sgn.staking.v1.QueryValidatorDelegationsResponse.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.staking.v1.QueryValidatorDelegationsResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.staking.v1.QueryValidatorDelegationsResponse.toObject = function(includeInstance, msg) {
var f, obj = {
delegationResponsesList: jspb.Message.toObjectList(msg.getDelegationResponsesList(),
sgn_staking_v1_staking_pb.DelegationResponse.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.sgn.staking.v1.QueryValidatorDelegationsResponse}
*/
proto.sgn.staking.v1.QueryValidatorDelegationsResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.sgn.staking.v1.QueryValidatorDelegationsResponse;
return proto.sgn.staking.v1.QueryValidatorDelegationsResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.sgn.staking.v1.QueryValidatorDelegationsResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.sgn.staking.v1.QueryValidatorDelegationsResponse}
*/
proto.sgn.staking.v1.QueryValidatorDelegationsResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new sgn_staking_v1_staking_pb.DelegationResponse;
reader.readMessage(value,sgn_staking_v1_staking_pb.DelegationResponse.deserializeBinaryFromReader);
msg.addDelegationResponses(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.sgn.staking.v1.QueryValidatorDelegationsResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.sgn.staking.v1.QueryValidatorDelegationsResponse.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.staking.v1.QueryValidatorDelegationsResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.sgn.staking.v1.QueryValidatorDelegationsResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getDelegationResponsesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
f,
sgn_staking_v1_staking_pb.DelegationResponse.serializeBinaryToWriter
);
}
f = message.getPagination();
if (f != null) {
writer.writeMessage(
2,
f,
cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter
);
}
};
/**
* repeated DelegationResponse delegation_responses = 1;
* @return {!Array<!proto.sgn.staking.v1.DelegationResponse>}
*/
proto.sgn.staking.v1.QueryValidatorDelegationsResponse.prototype.getDelegationResponsesList = function() {
return /** @type{!Array<!proto.sgn.staking.v1.DelegationResponse>} */ (
jspb.Message.getRepeatedWrapperField(this, sgn_staking_v1_staking_pb.DelegationResponse, 1));
};
/**
* @param {!Array<!proto.sgn.staking.v1.DelegationResponse>} value
* @return {!proto.sgn.staking.v1.QueryValidatorDelegationsResponse} returns this
*/
proto.sgn.staking.v1.QueryValidatorDelegationsResponse.prototype.setDelegationResponsesList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 1, value);
};
/**
* @param {!proto.sgn.staking.v1.DelegationResponse=} opt_value
* @param {number=} opt_index
* @return {!proto.sgn.staking.v1.DelegationResponse}
*/
proto.sgn.staking.v1.QueryValidatorDelegationsResponse.prototype.addDelegationResponses = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.sgn.staking.v1.DelegationResponse, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.sgn.staking.v1.QueryValidatorDelegationsResponse} returns this
*/
proto.sgn.staking.v1.QueryValidatorDelegationsResponse.prototype.clearDelegationResponsesList = function() {
return this.setDelegationResponsesList([]);
};
/**
* optional cosmos.base.query.v1beta1.PageResponse pagination = 2;
* @return {?proto.cosmos.base.query.v1beta1.PageResponse}
*/
proto.sgn.staking.v1.QueryValidatorDelegationsResponse.prototype.getPagination = functi