UNPKG

@provenanceio/wallet-utils

Version:

Typescript Utilities for Provenance Blockchain Wallet

1,386 lines (1,139 loc) 43.6 kB
"use strict"; // source: cosmos/quarantine/v1beta1/quarantine.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 || window || global || self || Function('return this')(); }.call(null); var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); goog.object.extend(proto, cosmos_proto_cosmos_pb); var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); goog.exportSymbol('proto.cosmos.quarantine.v1beta1.AutoResponse', null, global); goog.exportSymbol('proto.cosmos.quarantine.v1beta1.AutoResponseEntry', null, global); goog.exportSymbol('proto.cosmos.quarantine.v1beta1.AutoResponseUpdate', null, global); goog.exportSymbol('proto.cosmos.quarantine.v1beta1.QuarantineRecord', null, global); goog.exportSymbol('proto.cosmos.quarantine.v1beta1.QuarantineRecordSuffixIndex', null, global); goog.exportSymbol('proto.cosmos.quarantine.v1beta1.QuarantinedFunds', 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.quarantine.v1beta1.QuarantinedFunds = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.quarantine.v1beta1.QuarantinedFunds.repeatedFields_, null); }; goog.inherits(proto.cosmos.quarantine.v1beta1.QuarantinedFunds, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.quarantine.v1beta1.QuarantinedFunds.displayName = 'proto.cosmos.quarantine.v1beta1.QuarantinedFunds'; } /** * 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.quarantine.v1beta1.AutoResponseEntry = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.cosmos.quarantine.v1beta1.AutoResponseEntry, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.quarantine.v1beta1.AutoResponseEntry.displayName = 'proto.cosmos.quarantine.v1beta1.AutoResponseEntry'; } /** * 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.quarantine.v1beta1.AutoResponseUpdate = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.cosmos.quarantine.v1beta1.AutoResponseUpdate, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.quarantine.v1beta1.AutoResponseUpdate.displayName = 'proto.cosmos.quarantine.v1beta1.AutoResponseUpdate'; } /** * 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.quarantine.v1beta1.QuarantineRecord = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.quarantine.v1beta1.QuarantineRecord.repeatedFields_, null); }; goog.inherits(proto.cosmos.quarantine.v1beta1.QuarantineRecord, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.quarantine.v1beta1.QuarantineRecord.displayName = 'proto.cosmos.quarantine.v1beta1.QuarantineRecord'; } /** * 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.quarantine.v1beta1.QuarantineRecordSuffixIndex = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.quarantine.v1beta1.QuarantineRecordSuffixIndex.repeatedFields_, null); }; goog.inherits(proto.cosmos.quarantine.v1beta1.QuarantineRecordSuffixIndex, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.quarantine.v1beta1.QuarantineRecordSuffixIndex.displayName = 'proto.cosmos.quarantine.v1beta1.QuarantineRecordSuffixIndex'; } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.cosmos.quarantine.v1beta1.QuarantinedFunds.repeatedFields_ = [2, 3]; 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.quarantine.v1beta1.QuarantinedFunds.prototype.toObject = function (opt_includeInstance) { return proto.cosmos.quarantine.v1beta1.QuarantinedFunds.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.quarantine.v1beta1.QuarantinedFunds} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.quarantine.v1beta1.QuarantinedFunds.toObject = function (includeInstance, msg) { var f, obj = { toAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), unacceptedFromAddressesList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, coinsList: jspb.Message.toObjectList(msg.getCoinsList(), cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), declined: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) }; 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.quarantine.v1beta1.QuarantinedFunds} */ proto.cosmos.quarantine.v1beta1.QuarantinedFunds.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.cosmos.quarantine.v1beta1.QuarantinedFunds(); return proto.cosmos.quarantine.v1beta1.QuarantinedFunds.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.cosmos.quarantine.v1beta1.QuarantinedFunds} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.cosmos.quarantine.v1beta1.QuarantinedFunds} */ proto.cosmos.quarantine.v1beta1.QuarantinedFunds.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.setToAddress(value); break; case 2: var value = /** @type {string} */ reader.readString(); msg.addUnacceptedFromAddresses(value); break; case 3: var value = new cosmos_base_v1beta1_coin_pb.Coin(); reader.readMessage(value, cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); msg.addCoins(value); break; case 4: var value = /** @type {boolean} */ reader.readBool(); msg.setDeclined(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.cosmos.quarantine.v1beta1.QuarantinedFunds.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.cosmos.quarantine.v1beta1.QuarantinedFunds.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.quarantine.v1beta1.QuarantinedFunds} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.quarantine.v1beta1.QuarantinedFunds.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getToAddress(); if (f.length > 0) { writer.writeString(1, f); } f = message.getUnacceptedFromAddressesList(); if (f.length > 0) { writer.writeRepeatedString(2, f); } f = message.getCoinsList(); if (f.length > 0) { writer.writeRepeatedMessage(3, f, cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter); } f = message.getDeclined(); if (f) { writer.writeBool(4, f); } }; /** * optional string to_address = 1; * @return {string} */ proto.cosmos.quarantine.v1beta1.QuarantinedFunds.prototype.getToAddress = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; /** * @param {string} value * @return {!proto.cosmos.quarantine.v1beta1.QuarantinedFunds} returns this */ proto.cosmos.quarantine.v1beta1.QuarantinedFunds.prototype.setToAddress = function (value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * repeated string unaccepted_from_addresses = 2; * @return {!Array<string>} */ proto.cosmos.quarantine.v1beta1.QuarantinedFunds.prototype.getUnacceptedFromAddressesList = function () { return ( /** @type {!Array<string>} */ jspb.Message.getRepeatedField(this, 2) ); }; /** * @param {!Array<string>} value * @return {!proto.cosmos.quarantine.v1beta1.QuarantinedFunds} returns this */ proto.cosmos.quarantine.v1beta1.QuarantinedFunds.prototype.setUnacceptedFromAddressesList = function (value) { return jspb.Message.setField(this, 2, value || []); }; /** * @param {string} value * @param {number=} opt_index * @return {!proto.cosmos.quarantine.v1beta1.QuarantinedFunds} returns this */ proto.cosmos.quarantine.v1beta1.QuarantinedFunds.prototype.addUnacceptedFromAddresses = function (value, opt_index) { return jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.cosmos.quarantine.v1beta1.QuarantinedFunds} returns this */ proto.cosmos.quarantine.v1beta1.QuarantinedFunds.prototype.clearUnacceptedFromAddressesList = function () { return this.setUnacceptedFromAddressesList([]); }; /** * repeated cosmos.base.v1beta1.Coin coins = 3; * @return {!Array<!proto.cosmos.base.v1beta1.Coin>} */ proto.cosmos.quarantine.v1beta1.QuarantinedFunds.prototype.getCoinsList = function () { return ( /** @type{!Array<!proto.cosmos.base.v1beta1.Coin>} */ jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3) ); }; /** * @param {!Array<!proto.cosmos.base.v1beta1.Coin>} value * @return {!proto.cosmos.quarantine.v1beta1.QuarantinedFunds} returns this */ proto.cosmos.quarantine.v1beta1.QuarantinedFunds.prototype.setCoinsList = function (value) { return jspb.Message.setRepeatedWrapperField(this, 3, value); }; /** * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value * @param {number=} opt_index * @return {!proto.cosmos.base.v1beta1.Coin} */ proto.cosmos.quarantine.v1beta1.QuarantinedFunds.prototype.addCoins = function (opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.cosmos.quarantine.v1beta1.QuarantinedFunds} returns this */ proto.cosmos.quarantine.v1beta1.QuarantinedFunds.prototype.clearCoinsList = function () { return this.setCoinsList([]); }; /** * optional bool declined = 4; * @return {boolean} */ proto.cosmos.quarantine.v1beta1.QuarantinedFunds.prototype.getDeclined = function () { return ( /** @type {boolean} */ jspb.Message.getBooleanFieldWithDefault(this, 4, false) ); }; /** * @param {boolean} value * @return {!proto.cosmos.quarantine.v1beta1.QuarantinedFunds} returns this */ proto.cosmos.quarantine.v1beta1.QuarantinedFunds.prototype.setDeclined = function (value) { return jspb.Message.setProto3BooleanField(this, 4, 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.quarantine.v1beta1.AutoResponseEntry.prototype.toObject = function (opt_includeInstance) { return proto.cosmos.quarantine.v1beta1.AutoResponseEntry.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.quarantine.v1beta1.AutoResponseEntry} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.quarantine.v1beta1.AutoResponseEntry.toObject = function (includeInstance, msg) { var f, obj = { toAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), fromAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), response: jspb.Message.getFieldWithDefault(msg, 3, 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.quarantine.v1beta1.AutoResponseEntry} */ proto.cosmos.quarantine.v1beta1.AutoResponseEntry.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.cosmos.quarantine.v1beta1.AutoResponseEntry(); return proto.cosmos.quarantine.v1beta1.AutoResponseEntry.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.cosmos.quarantine.v1beta1.AutoResponseEntry} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.cosmos.quarantine.v1beta1.AutoResponseEntry} */ proto.cosmos.quarantine.v1beta1.AutoResponseEntry.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.setToAddress(value); break; case 2: var value = /** @type {string} */ reader.readString(); msg.setFromAddress(value); break; case 3: var value = /** @type {!proto.cosmos.quarantine.v1beta1.AutoResponse} */ reader.readEnum(); msg.setResponse(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.cosmos.quarantine.v1beta1.AutoResponseEntry.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.cosmos.quarantine.v1beta1.AutoResponseEntry.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.quarantine.v1beta1.AutoResponseEntry} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.quarantine.v1beta1.AutoResponseEntry.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getToAddress(); if (f.length > 0) { writer.writeString(1, f); } f = message.getFromAddress(); if (f.length > 0) { writer.writeString(2, f); } f = message.getResponse(); if (f !== 0.0) { writer.writeEnum(3, f); } }; /** * optional string to_address = 1; * @return {string} */ proto.cosmos.quarantine.v1beta1.AutoResponseEntry.prototype.getToAddress = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; /** * @param {string} value * @return {!proto.cosmos.quarantine.v1beta1.AutoResponseEntry} returns this */ proto.cosmos.quarantine.v1beta1.AutoResponseEntry.prototype.setToAddress = function (value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string from_address = 2; * @return {string} */ proto.cosmos.quarantine.v1beta1.AutoResponseEntry.prototype.getFromAddress = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; /** * @param {string} value * @return {!proto.cosmos.quarantine.v1beta1.AutoResponseEntry} returns this */ proto.cosmos.quarantine.v1beta1.AutoResponseEntry.prototype.setFromAddress = function (value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional AutoResponse response = 3; * @return {!proto.cosmos.quarantine.v1beta1.AutoResponse} */ proto.cosmos.quarantine.v1beta1.AutoResponseEntry.prototype.getResponse = function () { return ( /** @type {!proto.cosmos.quarantine.v1beta1.AutoResponse} */ jspb.Message.getFieldWithDefault(this, 3, 0) ); }; /** * @param {!proto.cosmos.quarantine.v1beta1.AutoResponse} value * @return {!proto.cosmos.quarantine.v1beta1.AutoResponseEntry} returns this */ proto.cosmos.quarantine.v1beta1.AutoResponseEntry.prototype.setResponse = function (value) { return jspb.Message.setProto3EnumField(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.quarantine.v1beta1.AutoResponseUpdate.prototype.toObject = function (opt_includeInstance) { return proto.cosmos.quarantine.v1beta1.AutoResponseUpdate.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.quarantine.v1beta1.AutoResponseUpdate} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.quarantine.v1beta1.AutoResponseUpdate.toObject = function (includeInstance, msg) { var f, obj = { fromAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), response: jspb.Message.getFieldWithDefault(msg, 2, 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.quarantine.v1beta1.AutoResponseUpdate} */ proto.cosmos.quarantine.v1beta1.AutoResponseUpdate.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.cosmos.quarantine.v1beta1.AutoResponseUpdate(); return proto.cosmos.quarantine.v1beta1.AutoResponseUpdate.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.cosmos.quarantine.v1beta1.AutoResponseUpdate} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.cosmos.quarantine.v1beta1.AutoResponseUpdate} */ proto.cosmos.quarantine.v1beta1.AutoResponseUpdate.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.setFromAddress(value); break; case 2: var value = /** @type {!proto.cosmos.quarantine.v1beta1.AutoResponse} */ reader.readEnum(); msg.setResponse(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.cosmos.quarantine.v1beta1.AutoResponseUpdate.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.cosmos.quarantine.v1beta1.AutoResponseUpdate.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.quarantine.v1beta1.AutoResponseUpdate} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.quarantine.v1beta1.AutoResponseUpdate.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getFromAddress(); if (f.length > 0) { writer.writeString(1, f); } f = message.getResponse(); if (f !== 0.0) { writer.writeEnum(2, f); } }; /** * optional string from_address = 1; * @return {string} */ proto.cosmos.quarantine.v1beta1.AutoResponseUpdate.prototype.getFromAddress = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; /** * @param {string} value * @return {!proto.cosmos.quarantine.v1beta1.AutoResponseUpdate} returns this */ proto.cosmos.quarantine.v1beta1.AutoResponseUpdate.prototype.setFromAddress = function (value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional AutoResponse response = 2; * @return {!proto.cosmos.quarantine.v1beta1.AutoResponse} */ proto.cosmos.quarantine.v1beta1.AutoResponseUpdate.prototype.getResponse = function () { return ( /** @type {!proto.cosmos.quarantine.v1beta1.AutoResponse} */ jspb.Message.getFieldWithDefault(this, 2, 0) ); }; /** * @param {!proto.cosmos.quarantine.v1beta1.AutoResponse} value * @return {!proto.cosmos.quarantine.v1beta1.AutoResponseUpdate} returns this */ proto.cosmos.quarantine.v1beta1.AutoResponseUpdate.prototype.setResponse = function (value) { return jspb.Message.setProto3EnumField(this, 2, value); }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.cosmos.quarantine.v1beta1.QuarantineRecord.repeatedFields_ = [1, 2, 3]; 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.quarantine.v1beta1.QuarantineRecord.prototype.toObject = function (opt_includeInstance) { return proto.cosmos.quarantine.v1beta1.QuarantineRecord.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.quarantine.v1beta1.QuarantineRecord} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.quarantine.v1beta1.QuarantineRecord.toObject = function (includeInstance, msg) { var f, obj = { unacceptedFromAddressesList: msg.getUnacceptedFromAddressesList_asB64(), acceptedFromAddressesList: msg.getAcceptedFromAddressesList_asB64(), coinsList: jspb.Message.toObjectList(msg.getCoinsList(), cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), declined: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) }; 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.quarantine.v1beta1.QuarantineRecord} */ proto.cosmos.quarantine.v1beta1.QuarantineRecord.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.cosmos.quarantine.v1beta1.QuarantineRecord(); return proto.cosmos.quarantine.v1beta1.QuarantineRecord.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.cosmos.quarantine.v1beta1.QuarantineRecord} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.cosmos.quarantine.v1beta1.QuarantineRecord} */ proto.cosmos.quarantine.v1beta1.QuarantineRecord.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!Uint8Array} */ reader.readBytes(); msg.addUnacceptedFromAddresses(value); break; case 2: var value = /** @type {!Uint8Array} */ reader.readBytes(); msg.addAcceptedFromAddresses(value); break; case 3: var value = new cosmos_base_v1beta1_coin_pb.Coin(); reader.readMessage(value, cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); msg.addCoins(value); break; case 4: var value = /** @type {boolean} */ reader.readBool(); msg.setDeclined(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.cosmos.quarantine.v1beta1.QuarantineRecord.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.cosmos.quarantine.v1beta1.QuarantineRecord.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.quarantine.v1beta1.QuarantineRecord} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.quarantine.v1beta1.QuarantineRecord.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getUnacceptedFromAddressesList_asU8(); if (f.length > 0) { writer.writeRepeatedBytes(1, f); } f = message.getAcceptedFromAddressesList_asU8(); if (f.length > 0) { writer.writeRepeatedBytes(2, f); } f = message.getCoinsList(); if (f.length > 0) { writer.writeRepeatedMessage(3, f, cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter); } f = message.getDeclined(); if (f) { writer.writeBool(4, f); } }; /** * repeated bytes unaccepted_from_addresses = 1; * @return {!(Array<!Uint8Array>|Array<string>)} */ proto.cosmos.quarantine.v1beta1.QuarantineRecord.prototype.getUnacceptedFromAddressesList = function () { return ( /** @type {!(Array<!Uint8Array>|Array<string>)} */ jspb.Message.getRepeatedField(this, 1) ); }; /** * repeated bytes unaccepted_from_addresses = 1; * This is a type-conversion wrapper around `getUnacceptedFromAddressesList()` * @return {!Array<string>} */ proto.cosmos.quarantine.v1beta1.QuarantineRecord.prototype.getUnacceptedFromAddressesList_asB64 = function () { return ( /** @type {!Array<string>} */ jspb.Message.bytesListAsB64(this.getUnacceptedFromAddressesList()) ); }; /** * repeated bytes unaccepted_from_addresses = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getUnacceptedFromAddressesList()` * @return {!Array<!Uint8Array>} */ proto.cosmos.quarantine.v1beta1.QuarantineRecord.prototype.getUnacceptedFromAddressesList_asU8 = function () { return ( /** @type {!Array<!Uint8Array>} */ jspb.Message.bytesListAsU8(this.getUnacceptedFromAddressesList()) ); }; /** * @param {!(Array<!Uint8Array>|Array<string>)} value * @return {!proto.cosmos.quarantine.v1beta1.QuarantineRecord} returns this */ proto.cosmos.quarantine.v1beta1.QuarantineRecord.prototype.setUnacceptedFromAddressesList = function (value) { return jspb.Message.setField(this, 1, value || []); }; /** * @param {!(string|Uint8Array)} value * @param {number=} opt_index * @return {!proto.cosmos.quarantine.v1beta1.QuarantineRecord} returns this */ proto.cosmos.quarantine.v1beta1.QuarantineRecord.prototype.addUnacceptedFromAddresses = 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.quarantine.v1beta1.QuarantineRecord} returns this */ proto.cosmos.quarantine.v1beta1.QuarantineRecord.prototype.clearUnacceptedFromAddressesList = function () { return this.setUnacceptedFromAddressesList([]); }; /** * repeated bytes accepted_from_addresses = 2; * @return {!(Array<!Uint8Array>|Array<string>)} */ proto.cosmos.quarantine.v1beta1.QuarantineRecord.prototype.getAcceptedFromAddressesList = function () { return ( /** @type {!(Array<!Uint8Array>|Array<string>)} */ jspb.Message.getRepeatedField(this, 2) ); }; /** * repeated bytes accepted_from_addresses = 2; * This is a type-conversion wrapper around `getAcceptedFromAddressesList()` * @return {!Array<string>} */ proto.cosmos.quarantine.v1beta1.QuarantineRecord.prototype.getAcceptedFromAddressesList_asB64 = function () { return ( /** @type {!Array<string>} */ jspb.Message.bytesListAsB64(this.getAcceptedFromAddressesList()) ); }; /** * repeated bytes accepted_from_addresses = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getAcceptedFromAddressesList()` * @return {!Array<!Uint8Array>} */ proto.cosmos.quarantine.v1beta1.QuarantineRecord.prototype.getAcceptedFromAddressesList_asU8 = function () { return ( /** @type {!Array<!Uint8Array>} */ jspb.Message.bytesListAsU8(this.getAcceptedFromAddressesList()) ); }; /** * @param {!(Array<!Uint8Array>|Array<string>)} value * @return {!proto.cosmos.quarantine.v1beta1.QuarantineRecord} returns this */ proto.cosmos.quarantine.v1beta1.QuarantineRecord.prototype.setAcceptedFromAddressesList = function (value) { return jspb.Message.setField(this, 2, value || []); }; /** * @param {!(string|Uint8Array)} value * @param {number=} opt_index * @return {!proto.cosmos.quarantine.v1beta1.QuarantineRecord} returns this */ proto.cosmos.quarantine.v1beta1.QuarantineRecord.prototype.addAcceptedFromAddresses = function (value, opt_index) { return jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.cosmos.quarantine.v1beta1.QuarantineRecord} returns this */ proto.cosmos.quarantine.v1beta1.QuarantineRecord.prototype.clearAcceptedFromAddressesList = function () { return this.setAcceptedFromAddressesList([]); }; /** * repeated cosmos.base.v1beta1.Coin coins = 3; * @return {!Array<!proto.cosmos.base.v1beta1.Coin>} */ proto.cosmos.quarantine.v1beta1.QuarantineRecord.prototype.getCoinsList = function () { return ( /** @type{!Array<!proto.cosmos.base.v1beta1.Coin>} */ jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3) ); }; /** * @param {!Array<!proto.cosmos.base.v1beta1.Coin>} value * @return {!proto.cosmos.quarantine.v1beta1.QuarantineRecord} returns this */ proto.cosmos.quarantine.v1beta1.QuarantineRecord.prototype.setCoinsList = function (value) { return jspb.Message.setRepeatedWrapperField(this, 3, value); }; /** * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value * @param {number=} opt_index * @return {!proto.cosmos.base.v1beta1.Coin} */ proto.cosmos.quarantine.v1beta1.QuarantineRecord.prototype.addCoins = function (opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.cosmos.quarantine.v1beta1.QuarantineRecord} returns this */ proto.cosmos.quarantine.v1beta1.QuarantineRecord.prototype.clearCoinsList = function () { return this.setCoinsList([]); }; /** * optional bool declined = 4; * @return {boolean} */ proto.cosmos.quarantine.v1beta1.QuarantineRecord.prototype.getDeclined = function () { return ( /** @type {boolean} */ jspb.Message.getBooleanFieldWithDefault(this, 4, false) ); }; /** * @param {boolean} value * @return {!proto.cosmos.quarantine.v1beta1.QuarantineRecord} returns this */ proto.cosmos.quarantine.v1beta1.QuarantineRecord.prototype.setDeclined = function (value) { return jspb.Message.setProto3BooleanField(this, 4, value); }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.cosmos.quarantine.v1beta1.QuarantineRecordSuffixIndex.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.quarantine.v1beta1.QuarantineRecordSuffixIndex.prototype.toObject = function (opt_includeInstance) { return proto.cosmos.quarantine.v1beta1.QuarantineRecordSuffixIndex.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.quarantine.v1beta1.QuarantineRecordSuffixIndex} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.quarantine.v1beta1.QuarantineRecordSuffixIndex.toObject = function (includeInstance, msg) { var f, obj = { recordSuffixesList: msg.getRecordSuffixesList_asB64() }; 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.quarantine.v1beta1.QuarantineRecordSuffixIndex} */ proto.cosmos.quarantine.v1beta1.QuarantineRecordSuffixIndex.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.cosmos.quarantine.v1beta1.QuarantineRecordSuffixIndex(); return proto.cosmos.quarantine.v1beta1.QuarantineRecordSuffixIndex.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.cosmos.quarantine.v1beta1.QuarantineRecordSuffixIndex} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.cosmos.quarantine.v1beta1.QuarantineRecordSuffixIndex} */ proto.cosmos.quarantine.v1beta1.QuarantineRecordSuffixIndex.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!Uint8Array} */ reader.readBytes(); msg.addRecordSuffixes(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.cosmos.quarantine.v1beta1.QuarantineRecordSuffixIndex.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.cosmos.quarantine.v1beta1.QuarantineRecordSuffixIndex.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.quarantine.v1beta1.QuarantineRecordSuffixIndex} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.quarantine.v1beta1.QuarantineRecordSuffixIndex.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getRecordSuffixesList_asU8(); if (f.length > 0) { writer.writeRepeatedBytes(1, f); } }; /** * repeated bytes record_suffixes = 1; * @return {!(Array<!Uint8Array>|Array<string>)} */ proto.cosmos.quarantine.v1beta1.QuarantineRecordSuffixIndex.prototype.getRecordSuffixesList = function () { return ( /** @type {!(Array<!Uint8Array>|Array<string>)} */ jspb.Message.getRepeatedField(this, 1) ); }; /** * repeated bytes record_suffixes = 1; * This is a type-conversion wrapper around `getRecordSuffixesList()` * @return {!Array<string>} */ proto.cosmos.quarantine.v1beta1.QuarantineRecordSuffixIndex.prototype.getRecordSuffixesList_asB64 = function () { return ( /** @type {!Array<string>} */ jspb.Message.bytesListAsB64(this.getRecordSuffixesList()) ); }; /** * repeated bytes record_suffixes = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getRecordSuffixesList()` * @return {!Array<!Uint8Array>} */ proto.cosmos.quarantine.v1beta1.QuarantineRecordSuffixIndex.prototype.getRecordSuffixesList_asU8 = function () { return ( /** @type {!Array<!Uint8Array>} */ jspb.Message.bytesListAsU8(this.getRecordSuffixesList()) ); }; /** * @param {!(Array<!Uint8Array>|Array<string>)} value * @return {!proto.cosmos.quarantine.v1beta1.QuarantineRecordSuffixIndex} returns this */ proto.cosmos.quarantine.v1beta1.QuarantineRecordSuffixIndex.prototype.setRecordSuffixesList = function (value) { return jspb.Message.setField(this, 1, value || []); }; /** * @param {!(string|Uint8Array)} value * @param {number=} opt_index * @return {!proto.cosmos.quarantine.v1beta1.QuarantineRecordSuffixIndex} returns this */ proto.cosmos.quarantine.v1beta1.QuarantineRecordSuffixIndex.prototype.addRecordSuffixes = 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.quarantine.v1beta1.QuarantineRecordSuffixIndex} returns this */ proto.cosmos.quarantine.v1beta1.QuarantineRecordSuffixIndex.prototype.clearRecordSuffixesList = function () { return this.setRecordSuffixesList([]); }; /** * @enum {number} */ proto.cosmos.quarantine.v1beta1.AutoResponse = { AUTO_RESPONSE_UNSPECIFIED: 0, AUTO_RESPONSE_ACCEPT: 1, AUTO_RESPONSE_DECLINE: 2 }; goog.object.extend(exports, proto.cosmos.quarantine.v1beta1);