@bandprotocol/bandchain.js
Version:
Library for interacting with BandChain in browser and Node.js environments
1,527 lines (1,436 loc) • 47.8 kB
JavaScript
// source: cosmos/group/v1/events.proto
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck
var jspb = require('google-protobuf')
var goog = jspb
var global = Function('return this')()
var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js')
goog.object.extend(proto, cosmos_proto_cosmos_pb)
var cosmos_group_v1_types_pb = require('../../../cosmos/group/v1/types_pb.js')
goog.object.extend(proto, cosmos_group_v1_types_pb)
goog.exportSymbol('proto.cosmos.group.v1.EventCreateGroup', null, global)
goog.exportSymbol('proto.cosmos.group.v1.EventCreateGroupPolicy', null, global)
goog.exportSymbol('proto.cosmos.group.v1.EventExec', null, global)
goog.exportSymbol('proto.cosmos.group.v1.EventLeaveGroup', null, global)
goog.exportSymbol('proto.cosmos.group.v1.EventSubmitProposal', null, global)
goog.exportSymbol('proto.cosmos.group.v1.EventUpdateGroup', null, global)
goog.exportSymbol('proto.cosmos.group.v1.EventUpdateGroupPolicy', null, global)
goog.exportSymbol('proto.cosmos.group.v1.EventVote', null, global)
goog.exportSymbol('proto.cosmos.group.v1.EventWithdrawProposal', 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.EventCreateGroup = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null)
}
goog.inherits(proto.cosmos.group.v1.EventCreateGroup, jspb.Message)
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.group.v1.EventCreateGroup.displayName =
'proto.cosmos.group.v1.EventCreateGroup'
}
/**
* 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.EventUpdateGroup = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null)
}
goog.inherits(proto.cosmos.group.v1.EventUpdateGroup, jspb.Message)
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.group.v1.EventUpdateGroup.displayName =
'proto.cosmos.group.v1.EventUpdateGroup'
}
/**
* 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.EventCreateGroupPolicy = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null)
}
goog.inherits(proto.cosmos.group.v1.EventCreateGroupPolicy, jspb.Message)
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.group.v1.EventCreateGroupPolicy.displayName =
'proto.cosmos.group.v1.EventCreateGroupPolicy'
}
/**
* 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.EventUpdateGroupPolicy = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null)
}
goog.inherits(proto.cosmos.group.v1.EventUpdateGroupPolicy, jspb.Message)
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.group.v1.EventUpdateGroupPolicy.displayName =
'proto.cosmos.group.v1.EventUpdateGroupPolicy'
}
/**
* 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.EventSubmitProposal = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null)
}
goog.inherits(proto.cosmos.group.v1.EventSubmitProposal, jspb.Message)
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.group.v1.EventSubmitProposal.displayName =
'proto.cosmos.group.v1.EventSubmitProposal'
}
/**
* 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.EventWithdrawProposal = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null)
}
goog.inherits(proto.cosmos.group.v1.EventWithdrawProposal, jspb.Message)
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.group.v1.EventWithdrawProposal.displayName =
'proto.cosmos.group.v1.EventWithdrawProposal'
}
/**
* 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.EventVote = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null)
}
goog.inherits(proto.cosmos.group.v1.EventVote, jspb.Message)
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.group.v1.EventVote.displayName =
'proto.cosmos.group.v1.EventVote'
}
/**
* 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.EventExec = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null)
}
goog.inherits(proto.cosmos.group.v1.EventExec, jspb.Message)
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.group.v1.EventExec.displayName =
'proto.cosmos.group.v1.EventExec'
}
/**
* 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.EventLeaveGroup = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null)
}
goog.inherits(proto.cosmos.group.v1.EventLeaveGroup, jspb.Message)
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.group.v1.EventLeaveGroup.displayName =
'proto.cosmos.group.v1.EventLeaveGroup'
}
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.EventCreateGroup.prototype.toObject = function (
opt_includeInstance,
) {
return proto.cosmos.group.v1.EventCreateGroup.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.EventCreateGroup} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.group.v1.EventCreateGroup.toObject = function (
includeInstance,
msg,
) {
var f,
obj = {
groupId: jspb.Message.getFieldWithDefault(msg, 1, 0),
}
if (includeInstance) {
obj.$jspbMessageInstance = msg
}
return obj
}
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.cosmos.group.v1.EventCreateGroup}
*/
proto.cosmos.group.v1.EventCreateGroup.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes)
var msg = new proto.cosmos.group.v1.EventCreateGroup()
return proto.cosmos.group.v1.EventCreateGroup.deserializeBinaryFromReader(
msg,
reader,
)
}
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.group.v1.EventCreateGroup} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.group.v1.EventCreateGroup}
*/
proto.cosmos.group.v1.EventCreateGroup.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.setGroupId(value)
break
default:
reader.skipField()
break
}
}
return msg
}
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmos.group.v1.EventCreateGroup.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter()
proto.cosmos.group.v1.EventCreateGroup.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.EventCreateGroup} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.group.v1.EventCreateGroup.serializeBinaryToWriter = function (
message,
writer,
) {
var f = undefined
f = message.getGroupId()
if (f !== 0) {
writer.writeUint64(1, f)
}
}
/**
* optional uint64 group_id = 1;
* @return {number}
*/
proto.cosmos.group.v1.EventCreateGroup.prototype.getGroupId = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0))
}
/**
* @param {number} value
* @return {!proto.cosmos.group.v1.EventCreateGroup} returns this
*/
proto.cosmos.group.v1.EventCreateGroup.prototype.setGroupId = function (value) {
return jspb.Message.setProto3IntField(this, 1, value)
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.cosmos.group.v1.EventUpdateGroup.prototype.toObject = function (
opt_includeInstance,
) {
return proto.cosmos.group.v1.EventUpdateGroup.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.EventUpdateGroup} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.group.v1.EventUpdateGroup.toObject = function (
includeInstance,
msg,
) {
var f,
obj = {
groupId: jspb.Message.getFieldWithDefault(msg, 1, 0),
}
if (includeInstance) {
obj.$jspbMessageInstance = msg
}
return obj
}
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.cosmos.group.v1.EventUpdateGroup}
*/
proto.cosmos.group.v1.EventUpdateGroup.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes)
var msg = new proto.cosmos.group.v1.EventUpdateGroup()
return proto.cosmos.group.v1.EventUpdateGroup.deserializeBinaryFromReader(
msg,
reader,
)
}
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.group.v1.EventUpdateGroup} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.group.v1.EventUpdateGroup}
*/
proto.cosmos.group.v1.EventUpdateGroup.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.setGroupId(value)
break
default:
reader.skipField()
break
}
}
return msg
}
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmos.group.v1.EventUpdateGroup.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter()
proto.cosmos.group.v1.EventUpdateGroup.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.EventUpdateGroup} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.group.v1.EventUpdateGroup.serializeBinaryToWriter = function (
message,
writer,
) {
var f = undefined
f = message.getGroupId()
if (f !== 0) {
writer.writeUint64(1, f)
}
}
/**
* optional uint64 group_id = 1;
* @return {number}
*/
proto.cosmos.group.v1.EventUpdateGroup.prototype.getGroupId = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0))
}
/**
* @param {number} value
* @return {!proto.cosmos.group.v1.EventUpdateGroup} returns this
*/
proto.cosmos.group.v1.EventUpdateGroup.prototype.setGroupId = function (value) {
return jspb.Message.setProto3IntField(this, 1, value)
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.cosmos.group.v1.EventCreateGroupPolicy.prototype.toObject = function (
opt_includeInstance,
) {
return proto.cosmos.group.v1.EventCreateGroupPolicy.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.EventCreateGroupPolicy} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.group.v1.EventCreateGroupPolicy.toObject = function (
includeInstance,
msg,
) {
var f,
obj = {
address: 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.cosmos.group.v1.EventCreateGroupPolicy}
*/
proto.cosmos.group.v1.EventCreateGroupPolicy.deserializeBinary = function (
bytes,
) {
var reader = new jspb.BinaryReader(bytes)
var msg = new proto.cosmos.group.v1.EventCreateGroupPolicy()
return proto.cosmos.group.v1.EventCreateGroupPolicy.deserializeBinaryFromReader(
msg,
reader,
)
}
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.group.v1.EventCreateGroupPolicy} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.group.v1.EventCreateGroupPolicy}
*/
proto.cosmos.group.v1.EventCreateGroupPolicy.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
default:
reader.skipField()
break
}
}
return msg
}
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmos.group.v1.EventCreateGroupPolicy.prototype.serializeBinary =
function () {
var writer = new jspb.BinaryWriter()
proto.cosmos.group.v1.EventCreateGroupPolicy.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.EventCreateGroupPolicy} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.group.v1.EventCreateGroupPolicy.serializeBinaryToWriter =
function (message, writer) {
var f = undefined
f = message.getAddress()
if (f.length > 0) {
writer.writeString(1, f)
}
}
/**
* optional string address = 1;
* @return {string}
*/
proto.cosmos.group.v1.EventCreateGroupPolicy.prototype.getAddress =
function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ''))
}
/**
* @param {string} value
* @return {!proto.cosmos.group.v1.EventCreateGroupPolicy} returns this
*/
proto.cosmos.group.v1.EventCreateGroupPolicy.prototype.setAddress = 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.cosmos.group.v1.EventUpdateGroupPolicy.prototype.toObject = function (
opt_includeInstance,
) {
return proto.cosmos.group.v1.EventUpdateGroupPolicy.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.EventUpdateGroupPolicy} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.group.v1.EventUpdateGroupPolicy.toObject = function (
includeInstance,
msg,
) {
var f,
obj = {
address: 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.cosmos.group.v1.EventUpdateGroupPolicy}
*/
proto.cosmos.group.v1.EventUpdateGroupPolicy.deserializeBinary = function (
bytes,
) {
var reader = new jspb.BinaryReader(bytes)
var msg = new proto.cosmos.group.v1.EventUpdateGroupPolicy()
return proto.cosmos.group.v1.EventUpdateGroupPolicy.deserializeBinaryFromReader(
msg,
reader,
)
}
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.group.v1.EventUpdateGroupPolicy} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.group.v1.EventUpdateGroupPolicy}
*/
proto.cosmos.group.v1.EventUpdateGroupPolicy.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
default:
reader.skipField()
break
}
}
return msg
}
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmos.group.v1.EventUpdateGroupPolicy.prototype.serializeBinary =
function () {
var writer = new jspb.BinaryWriter()
proto.cosmos.group.v1.EventUpdateGroupPolicy.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.EventUpdateGroupPolicy} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.group.v1.EventUpdateGroupPolicy.serializeBinaryToWriter =
function (message, writer) {
var f = undefined
f = message.getAddress()
if (f.length > 0) {
writer.writeString(1, f)
}
}
/**
* optional string address = 1;
* @return {string}
*/
proto.cosmos.group.v1.EventUpdateGroupPolicy.prototype.getAddress =
function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ''))
}
/**
* @param {string} value
* @return {!proto.cosmos.group.v1.EventUpdateGroupPolicy} returns this
*/
proto.cosmos.group.v1.EventUpdateGroupPolicy.prototype.setAddress = 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.cosmos.group.v1.EventSubmitProposal.prototype.toObject = function (
opt_includeInstance,
) {
return proto.cosmos.group.v1.EventSubmitProposal.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.EventSubmitProposal} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.group.v1.EventSubmitProposal.toObject = function (
includeInstance,
msg,
) {
var f,
obj = {
proposalId: jspb.Message.getFieldWithDefault(msg, 1, 0),
}
if (includeInstance) {
obj.$jspbMessageInstance = msg
}
return obj
}
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.cosmos.group.v1.EventSubmitProposal}
*/
proto.cosmos.group.v1.EventSubmitProposal.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes)
var msg = new proto.cosmos.group.v1.EventSubmitProposal()
return proto.cosmos.group.v1.EventSubmitProposal.deserializeBinaryFromReader(
msg,
reader,
)
}
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.group.v1.EventSubmitProposal} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.group.v1.EventSubmitProposal}
*/
proto.cosmos.group.v1.EventSubmitProposal.deserializeBinaryFromReader =
function (msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break
}
var field = reader.getFieldNumber()
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readUint64())
msg.setProposalId(value)
break
default:
reader.skipField()
break
}
}
return msg
}
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmos.group.v1.EventSubmitProposal.prototype.serializeBinary =
function () {
var writer = new jspb.BinaryWriter()
proto.cosmos.group.v1.EventSubmitProposal.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.EventSubmitProposal} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.group.v1.EventSubmitProposal.serializeBinaryToWriter = function (
message,
writer,
) {
var f = undefined
f = message.getProposalId()
if (f !== 0) {
writer.writeUint64(1, f)
}
}
/**
* optional uint64 proposal_id = 1;
* @return {number}
*/
proto.cosmos.group.v1.EventSubmitProposal.prototype.getProposalId =
function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0))
}
/**
* @param {number} value
* @return {!proto.cosmos.group.v1.EventSubmitProposal} returns this
*/
proto.cosmos.group.v1.EventSubmitProposal.prototype.setProposalId = function (
value,
) {
return jspb.Message.setProto3IntField(this, 1, value)
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.cosmos.group.v1.EventWithdrawProposal.prototype.toObject = function (
opt_includeInstance,
) {
return proto.cosmos.group.v1.EventWithdrawProposal.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.EventWithdrawProposal} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.group.v1.EventWithdrawProposal.toObject = function (
includeInstance,
msg,
) {
var f,
obj = {
proposalId: jspb.Message.getFieldWithDefault(msg, 1, 0),
}
if (includeInstance) {
obj.$jspbMessageInstance = msg
}
return obj
}
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.cosmos.group.v1.EventWithdrawProposal}
*/
proto.cosmos.group.v1.EventWithdrawProposal.deserializeBinary = function (
bytes,
) {
var reader = new jspb.BinaryReader(bytes)
var msg = new proto.cosmos.group.v1.EventWithdrawProposal()
return proto.cosmos.group.v1.EventWithdrawProposal.deserializeBinaryFromReader(
msg,
reader,
)
}
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.group.v1.EventWithdrawProposal} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.group.v1.EventWithdrawProposal}
*/
proto.cosmos.group.v1.EventWithdrawProposal.deserializeBinaryFromReader =
function (msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break
}
var field = reader.getFieldNumber()
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readUint64())
msg.setProposalId(value)
break
default:
reader.skipField()
break
}
}
return msg
}
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmos.group.v1.EventWithdrawProposal.prototype.serializeBinary =
function () {
var writer = new jspb.BinaryWriter()
proto.cosmos.group.v1.EventWithdrawProposal.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.EventWithdrawProposal} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.group.v1.EventWithdrawProposal.serializeBinaryToWriter = function (
message,
writer,
) {
var f = undefined
f = message.getProposalId()
if (f !== 0) {
writer.writeUint64(1, f)
}
}
/**
* optional uint64 proposal_id = 1;
* @return {number}
*/
proto.cosmos.group.v1.EventWithdrawProposal.prototype.getProposalId =
function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0))
}
/**
* @param {number} value
* @return {!proto.cosmos.group.v1.EventWithdrawProposal} returns this
*/
proto.cosmos.group.v1.EventWithdrawProposal.prototype.setProposalId = function (
value,
) {
return jspb.Message.setProto3IntField(this, 1, value)
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.cosmos.group.v1.EventVote.prototype.toObject = function (
opt_includeInstance,
) {
return proto.cosmos.group.v1.EventVote.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.EventVote} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.group.v1.EventVote.toObject = function (includeInstance, msg) {
var f,
obj = {
proposalId: jspb.Message.getFieldWithDefault(msg, 1, 0),
}
if (includeInstance) {
obj.$jspbMessageInstance = msg
}
return obj
}
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.cosmos.group.v1.EventVote}
*/
proto.cosmos.group.v1.EventVote.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes)
var msg = new proto.cosmos.group.v1.EventVote()
return proto.cosmos.group.v1.EventVote.deserializeBinaryFromReader(
msg,
reader,
)
}
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.group.v1.EventVote} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.group.v1.EventVote}
*/
proto.cosmos.group.v1.EventVote.deserializeBinaryFromReader = function (
msg,
reader,
) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break
}
var field = reader.getFieldNumber()
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readUint64())
msg.setProposalId(value)
break
default:
reader.skipField()
break
}
}
return msg
}
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmos.group.v1.EventVote.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter()
proto.cosmos.group.v1.EventVote.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.EventVote} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.group.v1.EventVote.serializeBinaryToWriter = function (
message,
writer,
) {
var f = undefined
f = message.getProposalId()
if (f !== 0) {
writer.writeUint64(1, f)
}
}
/**
* optional uint64 proposal_id = 1;
* @return {number}
*/
proto.cosmos.group.v1.EventVote.prototype.getProposalId = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0))
}
/**
* @param {number} value
* @return {!proto.cosmos.group.v1.EventVote} returns this
*/
proto.cosmos.group.v1.EventVote.prototype.setProposalId = function (value) {
return jspb.Message.setProto3IntField(this, 1, value)
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.cosmos.group.v1.EventExec.prototype.toObject = function (
opt_includeInstance,
) {
return proto.cosmos.group.v1.EventExec.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.EventExec} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.group.v1.EventExec.toObject = function (includeInstance, msg) {
var f,
obj = {
proposalId: jspb.Message.getFieldWithDefault(msg, 1, 0),
result: jspb.Message.getFieldWithDefault(msg, 2, 0),
logs: 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.EventExec}
*/
proto.cosmos.group.v1.EventExec.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes)
var msg = new proto.cosmos.group.v1.EventExec()
return proto.cosmos.group.v1.EventExec.deserializeBinaryFromReader(
msg,
reader,
)
}
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.group.v1.EventExec} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.group.v1.EventExec}
*/
proto.cosmos.group.v1.EventExec.deserializeBinaryFromReader = function (
msg,
reader,
) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break
}
var field = reader.getFieldNumber()
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readUint64())
msg.setProposalId(value)
break
case 2:
var value =
/** @type {!proto.cosmos.group.v1.ProposalExecutorResult} */ (
reader.readEnum()
)
msg.setResult(value)
break
case 3:
var value = /** @type {string} */ (reader.readString())
msg.setLogs(value)
break
default:
reader.skipField()
break
}
}
return msg
}
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmos.group.v1.EventExec.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter()
proto.cosmos.group.v1.EventExec.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.EventExec} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.group.v1.EventExec.serializeBinaryToWriter = function (
message,
writer,
) {
var f = undefined
f = message.getProposalId()
if (f !== 0) {
writer.writeUint64(1, f)
}
f = message.getResult()
if (f !== 0.0) {
writer.writeEnum(2, f)
}
f = message.getLogs()
if (f.length > 0) {
writer.writeString(3, f)
}
}
/**
* optional uint64 proposal_id = 1;
* @return {number}
*/
proto.cosmos.group.v1.EventExec.prototype.getProposalId = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0))
}
/**
* @param {number} value
* @return {!proto.cosmos.group.v1.EventExec} returns this
*/
proto.cosmos.group.v1.EventExec.prototype.setProposalId = function (value) {
return jspb.Message.setProto3IntField(this, 1, value)
}
/**
* optional ProposalExecutorResult result = 2;
* @return {!proto.cosmos.group.v1.ProposalExecutorResult}
*/
proto.cosmos.group.v1.EventExec.prototype.getResult = function () {
return /** @type {!proto.cosmos.group.v1.ProposalExecutorResult} */ (
jspb.Message.getFieldWithDefault(this, 2, 0)
)
}
/**
* @param {!proto.cosmos.group.v1.ProposalExecutorResult} value
* @return {!proto.cosmos.group.v1.EventExec} returns this
*/
proto.cosmos.group.v1.EventExec.prototype.setResult = function (value) {
return jspb.Message.setProto3EnumField(this, 2, value)
}
/**
* optional string logs = 3;
* @return {string}
*/
proto.cosmos.group.v1.EventExec.prototype.getLogs = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ''))
}
/**
* @param {string} value
* @return {!proto.cosmos.group.v1.EventExec} returns this
*/
proto.cosmos.group.v1.EventExec.prototype.setLogs = 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.EventLeaveGroup.prototype.toObject = function (
opt_includeInstance,
) {
return proto.cosmos.group.v1.EventLeaveGroup.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.EventLeaveGroup} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.group.v1.EventLeaveGroup.toObject = function (
includeInstance,
msg,
) {
var f,
obj = {
groupId: jspb.Message.getFieldWithDefault(msg, 1, 0),
address: jspb.Message.getFieldWithDefault(msg, 2, ''),
}
if (includeInstance) {
obj.$jspbMessageInstance = msg
}
return obj
}
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.cosmos.group.v1.EventLeaveGroup}
*/
proto.cosmos.group.v1.EventLeaveGroup.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes)
var msg = new proto.cosmos.group.v1.EventLeaveGroup()
return proto.cosmos.group.v1.EventLeaveGroup.deserializeBinaryFromReader(
msg,
reader,
)
}
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.group.v1.EventLeaveGroup} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.group.v1.EventLeaveGroup}
*/
proto.cosmos.group.v1.EventLeaveGroup.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.setGroupId(value)
break
case 2:
var value = /** @type {string} */ (reader.readString())
msg.setAddress(value)
break
default:
reader.skipField()
break
}
}
return msg
}
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmos.group.v1.EventLeaveGroup.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter()
proto.cosmos.group.v1.EventLeaveGroup.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.EventLeaveGroup} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.group.v1.EventLeaveGroup.serializeBinaryToWriter = function (
message,
writer,
) {
var f = undefined
f = message.getGroupId()
if (f !== 0) {
writer.writeUint64(1, f)
}
f = message.getAddress()
if (f.length > 0) {
writer.writeString(2, f)
}
}
/**
* optional uint64 group_id = 1;
* @return {number}
*/
proto.cosmos.group.v1.EventLeaveGroup.prototype.getGroupId = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0))
}
/**
* @param {number} value
* @return {!proto.cosmos.group.v1.EventLeaveGroup} returns this
*/
proto.cosmos.group.v1.EventLeaveGroup.prototype.setGroupId = function (value) {
return jspb.Message.setProto3IntField(this, 1, value)
}
/**
* optional string address = 2;
* @return {string}
*/
proto.cosmos.group.v1.EventLeaveGroup.prototype.getAddress = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ''))
}
/**
* @param {string} value
* @return {!proto.cosmos.group.v1.EventLeaveGroup} returns this
*/
proto.cosmos.group.v1.EventLeaveGroup.prototype.setAddress = function (value) {
return jspb.Message.setProto3StringField(this, 2, value)
}
goog.object.extend(exports, proto.cosmos.group.v1)