@bandprotocol/bandchain.js
Version:
Library for interacting with BandChain in browser and Node.js environments
937 lines (878 loc) • 28.9 kB
JavaScript
// source: cosmos/authz/v1beta1/authz.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 amino_amino_pb = require('../../../amino/amino_pb.js')
goog.object.extend(proto, amino_amino_pb)
var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js')
goog.object.extend(proto, cosmos_proto_cosmos_pb)
var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js')
goog.object.extend(proto, google_protobuf_timestamp_pb)
var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js')
goog.object.extend(proto, gogoproto_gogo_pb)
var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js')
goog.object.extend(proto, google_protobuf_any_pb)
goog.exportSymbol(
'proto.cosmos.authz.v1beta1.GenericAuthorization',
null,
global,
)
goog.exportSymbol('proto.cosmos.authz.v1beta1.Grant', null, global)
goog.exportSymbol('proto.cosmos.authz.v1beta1.GrantAuthorization', null, global)
goog.exportSymbol('proto.cosmos.authz.v1beta1.GrantQueueItem', 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.authz.v1beta1.GenericAuthorization = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null)
}
goog.inherits(proto.cosmos.authz.v1beta1.GenericAuthorization, jspb.Message)
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.authz.v1beta1.GenericAuthorization.displayName =
'proto.cosmos.authz.v1beta1.GenericAuthorization'
}
/**
* 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.authz.v1beta1.Grant = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null)
}
goog.inherits(proto.cosmos.authz.v1beta1.Grant, jspb.Message)
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.authz.v1beta1.Grant.displayName =
'proto.cosmos.authz.v1beta1.Grant'
}
/**
* 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.authz.v1beta1.GrantAuthorization = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null)
}
goog.inherits(proto.cosmos.authz.v1beta1.GrantAuthorization, jspb.Message)
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.authz.v1beta1.GrantAuthorization.displayName =
'proto.cosmos.authz.v1beta1.GrantAuthorization'
}
/**
* 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.authz.v1beta1.GrantQueueItem = function (opt_data) {
jspb.Message.initialize(
this,
opt_data,
0,
-1,
proto.cosmos.authz.v1beta1.GrantQueueItem.repeatedFields_,
null,
)
}
goog.inherits(proto.cosmos.authz.v1beta1.GrantQueueItem, jspb.Message)
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.authz.v1beta1.GrantQueueItem.displayName =
'proto.cosmos.authz.v1beta1.GrantQueueItem'
}
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.authz.v1beta1.GenericAuthorization.prototype.toObject =
function (opt_includeInstance) {
return proto.cosmos.authz.v1beta1.GenericAuthorization.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.authz.v1beta1.GenericAuthorization} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.authz.v1beta1.GenericAuthorization.toObject = function (
includeInstance,
msg,
) {
var f,
obj = {
msg: 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.authz.v1beta1.GenericAuthorization}
*/
proto.cosmos.authz.v1beta1.GenericAuthorization.deserializeBinary = function (
bytes,
) {
var reader = new jspb.BinaryReader(bytes)
var msg = new proto.cosmos.authz.v1beta1.GenericAuthorization()
return proto.cosmos.authz.v1beta1.GenericAuthorization.deserializeBinaryFromReader(
msg,
reader,
)
}
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.authz.v1beta1.GenericAuthorization} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.authz.v1beta1.GenericAuthorization}
*/
proto.cosmos.authz.v1beta1.GenericAuthorization.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.setMsg(value)
break
default:
reader.skipField()
break
}
}
return msg
}
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmos.authz.v1beta1.GenericAuthorization.prototype.serializeBinary =
function () {
var writer = new jspb.BinaryWriter()
proto.cosmos.authz.v1beta1.GenericAuthorization.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.authz.v1beta1.GenericAuthorization} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.authz.v1beta1.GenericAuthorization.serializeBinaryToWriter =
function (message, writer) {
var f = undefined
f = message.getMsg()
if (f.length > 0) {
writer.writeString(1, f)
}
}
/**
* optional string msg = 1;
* @return {string}
*/
proto.cosmos.authz.v1beta1.GenericAuthorization.prototype.getMsg = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ''))
}
/**
* @param {string} value
* @return {!proto.cosmos.authz.v1beta1.GenericAuthorization} returns this
*/
proto.cosmos.authz.v1beta1.GenericAuthorization.prototype.setMsg = 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.authz.v1beta1.Grant.prototype.toObject = function (
opt_includeInstance,
) {
return proto.cosmos.authz.v1beta1.Grant.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.authz.v1beta1.Grant} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.authz.v1beta1.Grant.toObject = function (includeInstance, msg) {
var f,
obj = {
authorization:
(f = msg.getAuthorization()) &&
google_protobuf_any_pb.Any.toObject(includeInstance, f),
expiration:
(f = msg.getExpiration()) &&
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.authz.v1beta1.Grant}
*/
proto.cosmos.authz.v1beta1.Grant.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes)
var msg = new proto.cosmos.authz.v1beta1.Grant()
return proto.cosmos.authz.v1beta1.Grant.deserializeBinaryFromReader(
msg,
reader,
)
}
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.authz.v1beta1.Grant} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.authz.v1beta1.Grant}
*/
proto.cosmos.authz.v1beta1.Grant.deserializeBinaryFromReader = function (
msg,
reader,
) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break
}
var field = reader.getFieldNumber()
switch (field) {
case 1:
var value = new google_protobuf_any_pb.Any()
reader.readMessage(
value,
google_protobuf_any_pb.Any.deserializeBinaryFromReader,
)
msg.setAuthorization(value)
break
case 2:
var value = new google_protobuf_timestamp_pb.Timestamp()
reader.readMessage(
value,
google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader,
)
msg.setExpiration(value)
break
default:
reader.skipField()
break
}
}
return msg
}
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmos.authz.v1beta1.Grant.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter()
proto.cosmos.authz.v1beta1.Grant.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.authz.v1beta1.Grant} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.authz.v1beta1.Grant.serializeBinaryToWriter = function (
message,
writer,
) {
var f = undefined
f = message.getAuthorization()
if (f != null) {
writer.writeMessage(
1,
f,
google_protobuf_any_pb.Any.serializeBinaryToWriter,
)
}
f = message.getExpiration()
if (f != null) {
writer.writeMessage(
2,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter,
)
}
}
/**
* optional google.protobuf.Any authorization = 1;
* @return {?proto.google.protobuf.Any}
*/
proto.cosmos.authz.v1beta1.Grant.prototype.getAuthorization = function () {
return /** @type{?proto.google.protobuf.Any} */ (
jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 1)
)
}
/**
* @param {?proto.google.protobuf.Any|undefined} value
* @return {!proto.cosmos.authz.v1beta1.Grant} returns this
*/
proto.cosmos.authz.v1beta1.Grant.prototype.setAuthorization = function (value) {
return jspb.Message.setWrapperField(this, 1, value)
}
/**
* Clears the message field making it undefined.
* @return {!proto.cosmos.authz.v1beta1.Grant} returns this
*/
proto.cosmos.authz.v1beta1.Grant.prototype.clearAuthorization = function () {
return this.setAuthorization(undefined)
}
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cosmos.authz.v1beta1.Grant.prototype.hasAuthorization = function () {
return jspb.Message.getField(this, 1) != null
}
/**
* optional google.protobuf.Timestamp expiration = 2;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.cosmos.authz.v1beta1.Grant.prototype.getExpiration = function () {
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(
this,
google_protobuf_timestamp_pb.Timestamp,
2,
)
)
}
/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.cosmos.authz.v1beta1.Grant} returns this
*/
proto.cosmos.authz.v1beta1.Grant.prototype.setExpiration = function (value) {
return jspb.Message.setWrapperField(this, 2, value)
}
/**
* Clears the message field making it undefined.
* @return {!proto.cosmos.authz.v1beta1.Grant} returns this
*/
proto.cosmos.authz.v1beta1.Grant.prototype.clearExpiration = function () {
return this.setExpiration(undefined)
}
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cosmos.authz.v1beta1.Grant.prototype.hasExpiration = 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.authz.v1beta1.GrantAuthorization.prototype.toObject = function (
opt_includeInstance,
) {
return proto.cosmos.authz.v1beta1.GrantAuthorization.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.authz.v1beta1.GrantAuthorization} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.authz.v1beta1.GrantAuthorization.toObject = function (
includeInstance,
msg,
) {
var f,
obj = {
granter: jspb.Message.getFieldWithDefault(msg, 1, ''),
grantee: jspb.Message.getFieldWithDefault(msg, 2, ''),
authorization:
(f = msg.getAuthorization()) &&
google_protobuf_any_pb.Any.toObject(includeInstance, f),
expiration:
(f = msg.getExpiration()) &&
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.authz.v1beta1.GrantAuthorization}
*/
proto.cosmos.authz.v1beta1.GrantAuthorization.deserializeBinary = function (
bytes,
) {
var reader = new jspb.BinaryReader(bytes)
var msg = new proto.cosmos.authz.v1beta1.GrantAuthorization()
return proto.cosmos.authz.v1beta1.GrantAuthorization.deserializeBinaryFromReader(
msg,
reader,
)
}
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.authz.v1beta1.GrantAuthorization} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.authz.v1beta1.GrantAuthorization}
*/
proto.cosmos.authz.v1beta1.GrantAuthorization.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.setGranter(value)
break
case 2:
var value = /** @type {string} */ (reader.readString())
msg.setGrantee(value)
break
case 3:
var value = new google_protobuf_any_pb.Any()
reader.readMessage(
value,
google_protobuf_any_pb.Any.deserializeBinaryFromReader,
)
msg.setAuthorization(value)
break
case 4:
var value = new google_protobuf_timestamp_pb.Timestamp()
reader.readMessage(
value,
google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader,
)
msg.setExpiration(value)
break
default:
reader.skipField()
break
}
}
return msg
}
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.serializeBinary =
function () {
var writer = new jspb.BinaryWriter()
proto.cosmos.authz.v1beta1.GrantAuthorization.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.authz.v1beta1.GrantAuthorization} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.authz.v1beta1.GrantAuthorization.serializeBinaryToWriter =
function (message, writer) {
var f = undefined
f = message.getGranter()
if (f.length > 0) {
writer.writeString(1, f)
}
f = message.getGrantee()
if (f.length > 0) {
writer.writeString(2, f)
}
f = message.getAuthorization()
if (f != null) {
writer.writeMessage(
3,
f,
google_protobuf_any_pb.Any.serializeBinaryToWriter,
)
}
f = message.getExpiration()
if (f != null) {
writer.writeMessage(
4,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter,
)
}
}
/**
* optional string granter = 1;
* @return {string}
*/
proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.getGranter =
function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ''))
}
/**
* @param {string} value
* @return {!proto.cosmos.authz.v1beta1.GrantAuthorization} returns this
*/
proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.setGranter = function (
value,
) {
return jspb.Message.setProto3StringField(this, 1, value)
}
/**
* optional string grantee = 2;
* @return {string}
*/
proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.getGrantee =
function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ''))
}
/**
* @param {string} value
* @return {!proto.cosmos.authz.v1beta1.GrantAuthorization} returns this
*/
proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.setGrantee = function (
value,
) {
return jspb.Message.setProto3StringField(this, 2, value)
}
/**
* optional google.protobuf.Any authorization = 3;
* @return {?proto.google.protobuf.Any}
*/
proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.getAuthorization =
function () {
return /** @type{?proto.google.protobuf.Any} */ (
jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 3)
)
}
/**
* @param {?proto.google.protobuf.Any|undefined} value
* @return {!proto.cosmos.authz.v1beta1.GrantAuthorization} returns this
*/
proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.setAuthorization =
function (value) {
return jspb.Message.setWrapperField(this, 3, value)
}
/**
* Clears the message field making it undefined.
* @return {!proto.cosmos.authz.v1beta1.GrantAuthorization} returns this
*/
proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.clearAuthorization =
function () {
return this.setAuthorization(undefined)
}
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.hasAuthorization =
function () {
return jspb.Message.getField(this, 3) != null
}
/**
* optional google.protobuf.Timestamp expiration = 4;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.getExpiration =
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.authz.v1beta1.GrantAuthorization} returns this
*/
proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.setExpiration =
function (value) {
return jspb.Message.setWrapperField(this, 4, value)
}
/**
* Clears the message field making it undefined.
* @return {!proto.cosmos.authz.v1beta1.GrantAuthorization} returns this
*/
proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.clearExpiration =
function () {
return this.setExpiration(undefined)
}
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cosmos.authz.v1beta1.GrantAuthorization.prototype.hasExpiration =
function () {
return jspb.Message.getField(this, 4) != null
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.cosmos.authz.v1beta1.GrantQueueItem.repeatedFields_ = [1]
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.cosmos.authz.v1beta1.GrantQueueItem.prototype.toObject = function (
opt_includeInstance,
) {
return proto.cosmos.authz.v1beta1.GrantQueueItem.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.authz.v1beta1.GrantQueueItem} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.authz.v1beta1.GrantQueueItem.toObject = function (
includeInstance,
msg,
) {
var f,
obj = {
msgTypeUrlsList:
(f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : 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.authz.v1beta1.GrantQueueItem}
*/
proto.cosmos.authz.v1beta1.GrantQueueItem.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes)
var msg = new proto.cosmos.authz.v1beta1.GrantQueueItem()
return proto.cosmos.authz.v1beta1.GrantQueueItem.deserializeBinaryFromReader(
msg,
reader,
)
}
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.authz.v1beta1.GrantQueueItem} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.authz.v1beta1.GrantQueueItem}
*/
proto.cosmos.authz.v1beta1.GrantQueueItem.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.addMsgTypeUrls(value)
break
default:
reader.skipField()
break
}
}
return msg
}
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmos.authz.v1beta1.GrantQueueItem.prototype.serializeBinary =
function () {
var writer = new jspb.BinaryWriter()
proto.cosmos.authz.v1beta1.GrantQueueItem.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.authz.v1beta1.GrantQueueItem} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.authz.v1beta1.GrantQueueItem.serializeBinaryToWriter = function (
message,
writer,
) {
var f = undefined
f = message.getMsgTypeUrlsList()
if (f.length > 0) {
writer.writeRepeatedString(1, f)
}
}
/**
* repeated string msg_type_urls = 1;
* @return {!Array<string>}
*/
proto.cosmos.authz.v1beta1.GrantQueueItem.prototype.getMsgTypeUrlsList =
function () {
return /** @type {!Array<string>} */ (
jspb.Message.getRepeatedField(this, 1)
)
}
/**
* @param {!Array<string>} value
* @return {!proto.cosmos.authz.v1beta1.GrantQueueItem} returns this
*/
proto.cosmos.authz.v1beta1.GrantQueueItem.prototype.setMsgTypeUrlsList =
function (value) {
return jspb.Message.setField(this, 1, value || [])
}
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.cosmos.authz.v1beta1.GrantQueueItem} returns this
*/
proto.cosmos.authz.v1beta1.GrantQueueItem.prototype.addMsgTypeUrls = function (
value,
opt_index,
) {
return jspb.Message.addToRepeatedField(this, 1, value, opt_index)
}
/**
* Clears the list making it empty but non-null.
* @return {!proto.cosmos.authz.v1beta1.GrantQueueItem} returns this
*/
proto.cosmos.authz.v1beta1.GrantQueueItem.prototype.clearMsgTypeUrlsList =
function () {
return this.setMsgTypeUrlsList([])
}
goog.object.extend(exports, proto.cosmos.authz.v1beta1)