@routerprotocol/chain-api
Version:
Router Chain API Query client with generated gRPC bindings.
1,596 lines (1,393 loc) • 96.4 kB
JavaScript
// source: cosmos/group/v1/types.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 gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js');
goog.object.extend(proto, gogoproto_gogo_pb);
var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js');
goog.object.extend(proto, google_protobuf_duration_pb);
var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
goog.object.extend(proto, google_protobuf_timestamp_pb);
var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js');
goog.object.extend(proto, cosmos_proto_cosmos_pb);
var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js');
goog.object.extend(proto, google_protobuf_any_pb);
var amino_amino_pb = require('../../../amino/amino_pb.js');
goog.object.extend(proto, amino_amino_pb);
goog.exportSymbol('proto.cosmos.group.v1.DecisionPolicyWindows', null, global);
goog.exportSymbol('proto.cosmos.group.v1.GroupInfo', null, global);
goog.exportSymbol('proto.cosmos.group.v1.GroupMember', null, global);
goog.exportSymbol('proto.cosmos.group.v1.GroupPolicyInfo', null, global);
goog.exportSymbol('proto.cosmos.group.v1.Member', null, global);
goog.exportSymbol('proto.cosmos.group.v1.MemberRequest', null, global);
goog.exportSymbol('proto.cosmos.group.v1.PercentageDecisionPolicy', null, global);
goog.exportSymbol('proto.cosmos.group.v1.Proposal', null, global);
goog.exportSymbol('proto.cosmos.group.v1.ProposalExecutorResult', null, global);
goog.exportSymbol('proto.cosmos.group.v1.ProposalStatus', null, global);
goog.exportSymbol('proto.cosmos.group.v1.TallyResult', null, global);
goog.exportSymbol('proto.cosmos.group.v1.ThresholdDecisionPolicy', null, global);
goog.exportSymbol('proto.cosmos.group.v1.Vote', null, global);
goog.exportSymbol('proto.cosmos.group.v1.VoteOption', 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.group.v1.Member = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.group.v1.Member, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.group.v1.Member.displayName = 'proto.cosmos.group.v1.Member';
}
/**
* 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.group.v1.MemberRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.group.v1.MemberRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.group.v1.MemberRequest.displayName = 'proto.cosmos.group.v1.MemberRequest';
}
/**
* 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.group.v1.ThresholdDecisionPolicy = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.group.v1.ThresholdDecisionPolicy, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.group.v1.ThresholdDecisionPolicy.displayName = 'proto.cosmos.group.v1.ThresholdDecisionPolicy';
}
/**
* 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.group.v1.PercentageDecisionPolicy = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.group.v1.PercentageDecisionPolicy, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.group.v1.PercentageDecisionPolicy.displayName = 'proto.cosmos.group.v1.PercentageDecisionPolicy';
}
/**
* 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.group.v1.DecisionPolicyWindows = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.group.v1.DecisionPolicyWindows, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.group.v1.DecisionPolicyWindows.displayName = 'proto.cosmos.group.v1.DecisionPolicyWindows';
}
/**
* 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.group.v1.GroupInfo = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.group.v1.GroupInfo, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.group.v1.GroupInfo.displayName = 'proto.cosmos.group.v1.GroupInfo';
}
/**
* 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.group.v1.GroupMember = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.group.v1.GroupMember, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.group.v1.GroupMember.displayName = 'proto.cosmos.group.v1.GroupMember';
}
/**
* 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.group.v1.GroupPolicyInfo = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.group.v1.GroupPolicyInfo, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.group.v1.GroupPolicyInfo.displayName = 'proto.cosmos.group.v1.GroupPolicyInfo';
}
/**
* 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.group.v1.Proposal = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.group.v1.Proposal.repeatedFields_, null);
};
goog.inherits(proto.cosmos.group.v1.Proposal, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.group.v1.Proposal.displayName = 'proto.cosmos.group.v1.Proposal';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.cosmos.group.v1.TallyResult = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.group.v1.TallyResult, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.group.v1.TallyResult.displayName = 'proto.cosmos.group.v1.TallyResult';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.cosmos.group.v1.Vote = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.group.v1.Vote, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.group.v1.Vote.displayName = 'proto.cosmos.group.v1.Vote';
}
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.group.v1.Member.prototype.toObject = function(opt_includeInstance) {
return proto.cosmos.group.v1.Member.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.group.v1.Member} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.group.v1.Member.toObject = function(includeInstance, msg) {
var f, obj = {
address: jspb.Message.getFieldWithDefault(msg, 1, ""),
weight: jspb.Message.getFieldWithDefault(msg, 2, ""),
metadata: jspb.Message.getFieldWithDefault(msg, 3, ""),
addedAt: (f = msg.getAddedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.cosmos.group.v1.Member}
*/
proto.cosmos.group.v1.Member.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmos.group.v1.Member;
return proto.cosmos.group.v1.Member.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.group.v1.Member} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.group.v1.Member}
*/
proto.cosmos.group.v1.Member.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.setAddress(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setWeight(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setMetadata(value);
break;
case 4:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setAddedAt(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmos.group.v1.Member.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.cosmos.group.v1.Member.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.group.v1.Member} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.group.v1.Member.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getAddress();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getWeight();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getMetadata();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getAddedAt();
if (f != null) {
writer.writeMessage(
4,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
};
/**
* optional string address = 1;
* @return {string}
*/
proto.cosmos.group.v1.Member.prototype.getAddress = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.cosmos.group.v1.Member} returns this
*/
proto.cosmos.group.v1.Member.prototype.setAddress = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string weight = 2;
* @return {string}
*/
proto.cosmos.group.v1.Member.prototype.getWeight = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.cosmos.group.v1.Member} returns this
*/
proto.cosmos.group.v1.Member.prototype.setWeight = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string metadata = 3;
* @return {string}
*/
proto.cosmos.group.v1.Member.prototype.getMetadata = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.cosmos.group.v1.Member} returns this
*/
proto.cosmos.group.v1.Member.prototype.setMetadata = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional google.protobuf.Timestamp added_at = 4;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.cosmos.group.v1.Member.prototype.getAddedAt = function() {
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4));
};
/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.cosmos.group.v1.Member} returns this
*/
proto.cosmos.group.v1.Member.prototype.setAddedAt = function(value) {
return jspb.Message.setWrapperField(this, 4, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.cosmos.group.v1.Member} returns this
*/
proto.cosmos.group.v1.Member.prototype.clearAddedAt = function() {
return this.setAddedAt(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cosmos.group.v1.Member.prototype.hasAddedAt = function() {
return jspb.Message.getField(this, 4) != 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.group.v1.MemberRequest.prototype.toObject = function(opt_includeInstance) {
return proto.cosmos.group.v1.MemberRequest.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.group.v1.MemberRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.group.v1.MemberRequest.toObject = function(includeInstance, msg) {
var f, obj = {
address: jspb.Message.getFieldWithDefault(msg, 1, ""),
weight: jspb.Message.getFieldWithDefault(msg, 2, ""),
metadata: jspb.Message.getFieldWithDefault(msg, 3, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.cosmos.group.v1.MemberRequest}
*/
proto.cosmos.group.v1.MemberRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmos.group.v1.MemberRequest;
return proto.cosmos.group.v1.MemberRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.group.v1.MemberRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.group.v1.MemberRequest}
*/
proto.cosmos.group.v1.MemberRequest.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.setAddress(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setWeight(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setMetadata(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmos.group.v1.MemberRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.cosmos.group.v1.MemberRequest.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.group.v1.MemberRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.group.v1.MemberRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getAddress();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getWeight();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getMetadata();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
};
/**
* optional string address = 1;
* @return {string}
*/
proto.cosmos.group.v1.MemberRequest.prototype.getAddress = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.cosmos.group.v1.MemberRequest} returns this
*/
proto.cosmos.group.v1.MemberRequest.prototype.setAddress = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string weight = 2;
* @return {string}
*/
proto.cosmos.group.v1.MemberRequest.prototype.getWeight = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.cosmos.group.v1.MemberRequest} returns this
*/
proto.cosmos.group.v1.MemberRequest.prototype.setWeight = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string metadata = 3;
* @return {string}
*/
proto.cosmos.group.v1.MemberRequest.prototype.getMetadata = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.cosmos.group.v1.MemberRequest} returns this
*/
proto.cosmos.group.v1.MemberRequest.prototype.setMetadata = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.cosmos.group.v1.ThresholdDecisionPolicy.prototype.toObject = function(opt_includeInstance) {
return proto.cosmos.group.v1.ThresholdDecisionPolicy.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.group.v1.ThresholdDecisionPolicy} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.group.v1.ThresholdDecisionPolicy.toObject = function(includeInstance, msg) {
var f, obj = {
threshold: jspb.Message.getFieldWithDefault(msg, 1, ""),
windows: (f = msg.getWindows()) && proto.cosmos.group.v1.DecisionPolicyWindows.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.group.v1.ThresholdDecisionPolicy}
*/
proto.cosmos.group.v1.ThresholdDecisionPolicy.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmos.group.v1.ThresholdDecisionPolicy;
return proto.cosmos.group.v1.ThresholdDecisionPolicy.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.group.v1.ThresholdDecisionPolicy} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.group.v1.ThresholdDecisionPolicy}
*/
proto.cosmos.group.v1.ThresholdDecisionPolicy.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.setThreshold(value);
break;
case 2:
var value = new proto.cosmos.group.v1.DecisionPolicyWindows;
reader.readMessage(value,proto.cosmos.group.v1.DecisionPolicyWindows.deserializeBinaryFromReader);
msg.setWindows(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmos.group.v1.ThresholdDecisionPolicy.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.cosmos.group.v1.ThresholdDecisionPolicy.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.group.v1.ThresholdDecisionPolicy} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.group.v1.ThresholdDecisionPolicy.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getThreshold();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getWindows();
if (f != null) {
writer.writeMessage(
2,
f,
proto.cosmos.group.v1.DecisionPolicyWindows.serializeBinaryToWriter
);
}
};
/**
* optional string threshold = 1;
* @return {string}
*/
proto.cosmos.group.v1.ThresholdDecisionPolicy.prototype.getThreshold = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.cosmos.group.v1.ThresholdDecisionPolicy} returns this
*/
proto.cosmos.group.v1.ThresholdDecisionPolicy.prototype.setThreshold = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional DecisionPolicyWindows windows = 2;
* @return {?proto.cosmos.group.v1.DecisionPolicyWindows}
*/
proto.cosmos.group.v1.ThresholdDecisionPolicy.prototype.getWindows = function() {
return /** @type{?proto.cosmos.group.v1.DecisionPolicyWindows} */ (
jspb.Message.getWrapperField(this, proto.cosmos.group.v1.DecisionPolicyWindows, 2));
};
/**
* @param {?proto.cosmos.group.v1.DecisionPolicyWindows|undefined} value
* @return {!proto.cosmos.group.v1.ThresholdDecisionPolicy} returns this
*/
proto.cosmos.group.v1.ThresholdDecisionPolicy.prototype.setWindows = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.cosmos.group.v1.ThresholdDecisionPolicy} returns this
*/
proto.cosmos.group.v1.ThresholdDecisionPolicy.prototype.clearWindows = function() {
return this.setWindows(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cosmos.group.v1.ThresholdDecisionPolicy.prototype.hasWindows = 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.group.v1.PercentageDecisionPolicy.prototype.toObject = function(opt_includeInstance) {
return proto.cosmos.group.v1.PercentageDecisionPolicy.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.group.v1.PercentageDecisionPolicy} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.group.v1.PercentageDecisionPolicy.toObject = function(includeInstance, msg) {
var f, obj = {
percentage: jspb.Message.getFieldWithDefault(msg, 1, ""),
windows: (f = msg.getWindows()) && proto.cosmos.group.v1.DecisionPolicyWindows.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.group.v1.PercentageDecisionPolicy}
*/
proto.cosmos.group.v1.PercentageDecisionPolicy.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmos.group.v1.PercentageDecisionPolicy;
return proto.cosmos.group.v1.PercentageDecisionPolicy.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.group.v1.PercentageDecisionPolicy} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.group.v1.PercentageDecisionPolicy}
*/
proto.cosmos.group.v1.PercentageDecisionPolicy.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.setPercentage(value);
break;
case 2:
var value = new proto.cosmos.group.v1.DecisionPolicyWindows;
reader.readMessage(value,proto.cosmos.group.v1.DecisionPolicyWindows.deserializeBinaryFromReader);
msg.setWindows(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmos.group.v1.PercentageDecisionPolicy.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.cosmos.group.v1.PercentageDecisionPolicy.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.group.v1.PercentageDecisionPolicy} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.group.v1.PercentageDecisionPolicy.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getPercentage();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getWindows();
if (f != null) {
writer.writeMessage(
2,
f,
proto.cosmos.group.v1.DecisionPolicyWindows.serializeBinaryToWriter
);
}
};
/**
* optional string percentage = 1;
* @return {string}
*/
proto.cosmos.group.v1.PercentageDecisionPolicy.prototype.getPercentage = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.cosmos.group.v1.PercentageDecisionPolicy} returns this
*/
proto.cosmos.group.v1.PercentageDecisionPolicy.prototype.setPercentage = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional DecisionPolicyWindows windows = 2;
* @return {?proto.cosmos.group.v1.DecisionPolicyWindows}
*/
proto.cosmos.group.v1.PercentageDecisionPolicy.prototype.getWindows = function() {
return /** @type{?proto.cosmos.group.v1.DecisionPolicyWindows} */ (
jspb.Message.getWrapperField(this, proto.cosmos.group.v1.DecisionPolicyWindows, 2));
};
/**
* @param {?proto.cosmos.group.v1.DecisionPolicyWindows|undefined} value
* @return {!proto.cosmos.group.v1.PercentageDecisionPolicy} returns this
*/
proto.cosmos.group.v1.PercentageDecisionPolicy.prototype.setWindows = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.cosmos.group.v1.PercentageDecisionPolicy} returns this
*/
proto.cosmos.group.v1.PercentageDecisionPolicy.prototype.clearWindows = function() {
return this.setWindows(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cosmos.group.v1.PercentageDecisionPolicy.prototype.hasWindows = 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.group.v1.DecisionPolicyWindows.prototype.toObject = function(opt_includeInstance) {
return proto.cosmos.group.v1.DecisionPolicyWindows.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.group.v1.DecisionPolicyWindows} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.group.v1.DecisionPolicyWindows.toObject = function(includeInstance, msg) {
var f, obj = {
votingPeriod: (f = msg.getVotingPeriod()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f),
minExecutionPeriod: (f = msg.getMinExecutionPeriod()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.cosmos.group.v1.DecisionPolicyWindows}
*/
proto.cosmos.group.v1.DecisionPolicyWindows.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmos.group.v1.DecisionPolicyWindows;
return proto.cosmos.group.v1.DecisionPolicyWindows.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.group.v1.DecisionPolicyWindows} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.group.v1.DecisionPolicyWindows}
*/
proto.cosmos.group.v1.DecisionPolicyWindows.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new google_protobuf_duration_pb.Duration;
reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader);
msg.setVotingPeriod(value);
break;
case 2:
var value = new google_protobuf_duration_pb.Duration;
reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader);
msg.setMinExecutionPeriod(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmos.group.v1.DecisionPolicyWindows.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.cosmos.group.v1.DecisionPolicyWindows.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.group.v1.DecisionPolicyWindows} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.group.v1.DecisionPolicyWindows.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getVotingPeriod();
if (f != null) {
writer.writeMessage(
1,
f,
google_protobuf_duration_pb.Duration.serializeBinaryToWriter
);
}
f = message.getMinExecutionPeriod();
if (f != null) {
writer.writeMessage(
2,
f,
google_protobuf_duration_pb.Duration.serializeBinaryToWriter
);
}
};
/**
* optional google.protobuf.Duration voting_period = 1;
* @return {?proto.google.protobuf.Duration}
*/
proto.cosmos.group.v1.DecisionPolicyWindows.prototype.getVotingPeriod = function() {
return /** @type{?proto.google.protobuf.Duration} */ (
jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 1));
};
/**
* @param {?proto.google.protobuf.Duration|undefined} value
* @return {!proto.cosmos.group.v1.DecisionPolicyWindows} returns this
*/
proto.cosmos.group.v1.DecisionPolicyWindows.prototype.setVotingPeriod = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.cosmos.group.v1.DecisionPolicyWindows} returns this
*/
proto.cosmos.group.v1.DecisionPolicyWindows.prototype.clearVotingPeriod = function() {
return this.setVotingPeriod(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cosmos.group.v1.DecisionPolicyWindows.prototype.hasVotingPeriod = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional google.protobuf.Duration min_execution_period = 2;
* @return {?proto.google.protobuf.Duration}
*/
proto.cosmos.group.v1.DecisionPolicyWindows.prototype.getMinExecutionPeriod = function() {
return /** @type{?proto.google.protobuf.Duration} */ (
jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 2));
};
/**
* @param {?proto.google.protobuf.Duration|undefined} value
* @return {!proto.cosmos.group.v1.DecisionPolicyWindows} returns this
*/
proto.cosmos.group.v1.DecisionPolicyWindows.prototype.setMinExecutionPeriod = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.cosmos.group.v1.DecisionPolicyWindows} returns this
*/
proto.cosmos.group.v1.DecisionPolicyWindows.prototype.clearMinExecutionPeriod = function() {
return this.setMinExecutionPeriod(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cosmos.group.v1.DecisionPolicyWindows.prototype.hasMinExecutionPeriod = 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.group.v1.GroupInfo.prototype.toObject = function(opt_includeInstance) {
return proto.cosmos.group.v1.GroupInfo.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.group.v1.GroupInfo} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.group.v1.GroupInfo.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, 0),
admin: jspb.Message.getFieldWithDefault(msg, 2, ""),
metadata: jspb.Message.getFieldWithDefault(msg, 3, ""),
version: jspb.Message.getFieldWithDefault(msg, 4, 0),
totalWeight: jspb.Message.getFieldWithDefault(msg, 5, ""),
createdAt: (f = msg.getCreatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.cosmos.group.v1.GroupInfo}
*/
proto.cosmos.group.v1.GroupInfo.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmos.group.v1.GroupInfo;
return proto.cosmos.group.v1.GroupInfo.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.group.v1.GroupInfo} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.group.v1.GroupInfo}
*/
proto.cosmos.group.v1.GroupInfo.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.setId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setAdmin(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setMetadata(value);
break;
case 4:
var value = /** @type {number} */ (reader.readUint64());
msg.setVersion(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setTotalWeight(value);
break;
case 6:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setCreatedAt(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmos.group.v1.GroupInfo.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.cosmos.group.v1.GroupInfo.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.group.v1.GroupInfo} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.group.v1.GroupInfo.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId();
if (f !== 0) {
writer.writeUint64(
1,
f
);
}
f = message.getAdmin();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getMetadata();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getVersion();
if (f !== 0) {
writer.writeUint64(
4,
f
);
}
f = message.getTotalWeight();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
f = message.getCreatedAt();
if (f != null) {
writer.writeMessage(
6,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
};
/**
* optional uint64 id = 1;
* @return {number}
*/
proto.cosmos.group.v1.GroupInfo.prototype.getId = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.cosmos.group.v1.GroupInfo} returns this
*/
proto.cosmos.group.v1.GroupInfo.prototype.setId = function(value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional string admin = 2;
* @return {string}
*/
proto.cosmos.group.v1.GroupInfo.prototype.getAdmin = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.cosmos.group.v1.GroupInfo} returns this
*/
proto.cosmos.group.v1.GroupInfo.prototype.setAdmin = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string metadata = 3;
* @return {string}
*/
proto.cosmos.group.v1.GroupInfo.prototype.getMetadata = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.cosmos.group.v1.GroupInfo} returns this
*/
proto.cosmos.group.v1.GroupInfo.prototype.setMetadata = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional uint64 version = 4;
* @return {number}
*/
proto.cosmos.group.v1.GroupInfo.prototype.getVersion = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/**
* @param {number} value
* @return {!proto.cosmos.group.v1.GroupInfo} returns this
*/
proto.cosmos.group.v1.GroupInfo.prototype.setVersion = function(value) {
return jspb.Message.setProto3IntField(this, 4, value);
};
/**
* optional string total_weight = 5;
* @return {string}
*/
proto.cosmos.group.v1.GroupInfo.prototype.getTotalWeight = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/**
* @param {string} value
* @return {!proto.cosmos.group.v1.GroupInfo} returns this
*/
proto.cosmos.group.v1.GroupInfo.prototype.setTotalWeight = function(value) {
return jspb.Message.setProto3StringField(this, 5, value);
};
/**
* optional google.protobuf.Timestamp created_at = 6;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.cosmos.group.v1.GroupInfo.prototype.getCreatedAt = function() {
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6));
};
/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.cosmos.group.v1.GroupInfo} returns this
*/
proto.cosmos.group.v1.GroupInfo.prototype.setCreatedAt = function(value) {
return jspb.Message.setWrapperField(this, 6, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.cosmos.group.v1.GroupInfo} returns this
*/
proto.cosmos.group.v1.GroupInfo.prototype.clearCreatedAt = function() {
return this.setCreatedAt(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cosmos.group.v1.GroupInfo.prototype.hasCreatedAt = function() {
return jspb.Message.getField(this, 6) != 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.group.v1.GroupMember.prototype.toObject = function(opt_includeInstance) {
return proto.cosmos.group.v1.GroupMember.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:
*