UNPKG

@provenanceio/wallet-utils

Version:

Typescript Utilities for Provenance Blockchain Wallet

1,154 lines (952 loc) 37.1 kB
"use strict"; // source: provenance/name/v1/query.proto /** * @fileoverview * @enhanceable * @suppress {missingRequire} reports error on implicit type usages. * @suppress {messageConventions} JS Compiler reports an error if a variable or * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! /* eslint-disable */ // @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = function () { return this || window || global || self || Function('return this')(); }.call(null); var cosmos_base_query_v1beta1_pagination_pb = require('../../../cosmos/base/query/v1beta1/pagination_pb.js'); goog.object.extend(proto, cosmos_base_query_v1beta1_pagination_pb); var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); goog.object.extend(proto, google_api_annotations_pb); var provenance_name_v1_name_pb = require('../../../provenance/name/v1/name_pb.js'); goog.object.extend(proto, provenance_name_v1_name_pb); goog.exportSymbol('proto.provenance.name.v1.QueryParamsRequest', null, global); goog.exportSymbol('proto.provenance.name.v1.QueryParamsResponse', null, global); goog.exportSymbol('proto.provenance.name.v1.QueryResolveRequest', null, global); goog.exportSymbol('proto.provenance.name.v1.QueryResolveResponse', null, global); goog.exportSymbol('proto.provenance.name.v1.QueryReverseLookupRequest', null, global); goog.exportSymbol('proto.provenance.name.v1.QueryReverseLookupResponse', 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.provenance.name.v1.QueryParamsRequest = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.name.v1.QueryParamsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.name.v1.QueryParamsRequest.displayName = 'proto.provenance.name.v1.QueryParamsRequest'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.provenance.name.v1.QueryParamsResponse = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.name.v1.QueryParamsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.name.v1.QueryParamsResponse.displayName = 'proto.provenance.name.v1.QueryParamsResponse'; } /** * 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.provenance.name.v1.QueryResolveRequest = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.name.v1.QueryResolveRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.name.v1.QueryResolveRequest.displayName = 'proto.provenance.name.v1.QueryResolveRequest'; } /** * 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.provenance.name.v1.QueryResolveResponse = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.name.v1.QueryResolveResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.name.v1.QueryResolveResponse.displayName = 'proto.provenance.name.v1.QueryResolveResponse'; } /** * 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.provenance.name.v1.QueryReverseLookupRequest = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.name.v1.QueryReverseLookupRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.name.v1.QueryReverseLookupRequest.displayName = 'proto.provenance.name.v1.QueryReverseLookupRequest'; } /** * 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.provenance.name.v1.QueryReverseLookupResponse = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.provenance.name.v1.QueryReverseLookupResponse.repeatedFields_, null); }; goog.inherits(proto.provenance.name.v1.QueryReverseLookupResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.name.v1.QueryReverseLookupResponse.displayName = 'proto.provenance.name.v1.QueryReverseLookupResponse'; } 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.provenance.name.v1.QueryParamsRequest.prototype.toObject = function (opt_includeInstance) { return proto.provenance.name.v1.QueryParamsRequest.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.provenance.name.v1.QueryParamsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.name.v1.QueryParamsRequest.toObject = function (includeInstance, msg) { var f, obj = {}; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.provenance.name.v1.QueryParamsRequest} */ proto.provenance.name.v1.QueryParamsRequest.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.provenance.name.v1.QueryParamsRequest(); return proto.provenance.name.v1.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.provenance.name.v1.QueryParamsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.provenance.name.v1.QueryParamsRequest} */ proto.provenance.name.v1.QueryParamsRequest.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.provenance.name.v1.QueryParamsRequest.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.provenance.name.v1.QueryParamsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.provenance.name.v1.QueryParamsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.name.v1.QueryParamsRequest.serializeBinaryToWriter = function (message, writer) { var f = undefined; }; 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.provenance.name.v1.QueryParamsResponse.prototype.toObject = function (opt_includeInstance) { return proto.provenance.name.v1.QueryParamsResponse.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.provenance.name.v1.QueryParamsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.name.v1.QueryParamsResponse.toObject = function (includeInstance, msg) { var f, obj = { params: (f = msg.getParams()) && provenance_name_v1_name_pb.Params.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.provenance.name.v1.QueryParamsResponse} */ proto.provenance.name.v1.QueryParamsResponse.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.provenance.name.v1.QueryParamsResponse(); return proto.provenance.name.v1.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.provenance.name.v1.QueryParamsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.provenance.name.v1.QueryParamsResponse} */ proto.provenance.name.v1.QueryParamsResponse.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new provenance_name_v1_name_pb.Params(); reader.readMessage(value, provenance_name_v1_name_pb.Params.deserializeBinaryFromReader); msg.setParams(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.provenance.name.v1.QueryParamsResponse.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.provenance.name.v1.QueryParamsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.provenance.name.v1.QueryParamsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.name.v1.QueryParamsResponse.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getParams(); if (f != null) { writer.writeMessage(1, f, provenance_name_v1_name_pb.Params.serializeBinaryToWriter); } }; /** * optional Params params = 1; * @return {?proto.provenance.name.v1.Params} */ proto.provenance.name.v1.QueryParamsResponse.prototype.getParams = function () { return ( /** @type{?proto.provenance.name.v1.Params} */ jspb.Message.getWrapperField(this, provenance_name_v1_name_pb.Params, 1) ); }; /** * @param {?proto.provenance.name.v1.Params|undefined} value * @return {!proto.provenance.name.v1.QueryParamsResponse} returns this */ proto.provenance.name.v1.QueryParamsResponse.prototype.setParams = function (value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.provenance.name.v1.QueryParamsResponse} returns this */ proto.provenance.name.v1.QueryParamsResponse.prototype.clearParams = function () { return this.setParams(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.provenance.name.v1.QueryParamsResponse.prototype.hasParams = function () { return jspb.Message.getField(this, 1) != null; }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.provenance.name.v1.QueryResolveRequest.prototype.toObject = function (opt_includeInstance) { return proto.provenance.name.v1.QueryResolveRequest.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.provenance.name.v1.QueryResolveRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.name.v1.QueryResolveRequest.toObject = function (includeInstance, msg) { var f, obj = { name: 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.provenance.name.v1.QueryResolveRequest} */ proto.provenance.name.v1.QueryResolveRequest.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.provenance.name.v1.QueryResolveRequest(); return proto.provenance.name.v1.QueryResolveRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.provenance.name.v1.QueryResolveRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.provenance.name.v1.QueryResolveRequest} */ proto.provenance.name.v1.QueryResolveRequest.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.setName(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.provenance.name.v1.QueryResolveRequest.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.provenance.name.v1.QueryResolveRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.provenance.name.v1.QueryResolveRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.name.v1.QueryResolveRequest.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getName(); if (f.length > 0) { writer.writeString(1, f); } }; /** * optional string name = 1; * @return {string} */ proto.provenance.name.v1.QueryResolveRequest.prototype.getName = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; /** * @param {string} value * @return {!proto.provenance.name.v1.QueryResolveRequest} returns this */ proto.provenance.name.v1.QueryResolveRequest.prototype.setName = 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.provenance.name.v1.QueryResolveResponse.prototype.toObject = function (opt_includeInstance) { return proto.provenance.name.v1.QueryResolveResponse.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.provenance.name.v1.QueryResolveResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.name.v1.QueryResolveResponse.toObject = function (includeInstance, msg) { var f, obj = { address: jspb.Message.getFieldWithDefault(msg, 1, ""), restricted: jspb.Message.getBooleanFieldWithDefault(msg, 2, 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.provenance.name.v1.QueryResolveResponse} */ proto.provenance.name.v1.QueryResolveResponse.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.provenance.name.v1.QueryResolveResponse(); return proto.provenance.name.v1.QueryResolveResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.provenance.name.v1.QueryResolveResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.provenance.name.v1.QueryResolveResponse} */ proto.provenance.name.v1.QueryResolveResponse.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ reader.readString(); msg.setAddress(value); break; case 2: var value = /** @type {boolean} */ reader.readBool(); msg.setRestricted(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.provenance.name.v1.QueryResolveResponse.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.provenance.name.v1.QueryResolveResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.provenance.name.v1.QueryResolveResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.name.v1.QueryResolveResponse.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getAddress(); if (f.length > 0) { writer.writeString(1, f); } f = message.getRestricted(); if (f) { writer.writeBool(2, f); } }; /** * optional string address = 1; * @return {string} */ proto.provenance.name.v1.QueryResolveResponse.prototype.getAddress = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; /** * @param {string} value * @return {!proto.provenance.name.v1.QueryResolveResponse} returns this */ proto.provenance.name.v1.QueryResolveResponse.prototype.setAddress = function (value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional bool restricted = 2; * @return {boolean} */ proto.provenance.name.v1.QueryResolveResponse.prototype.getRestricted = function () { return ( /** @type {boolean} */ jspb.Message.getBooleanFieldWithDefault(this, 2, false) ); }; /** * @param {boolean} value * @return {!proto.provenance.name.v1.QueryResolveResponse} returns this */ proto.provenance.name.v1.QueryResolveResponse.prototype.setRestricted = function (value) { return jspb.Message.setProto3BooleanField(this, 2, 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.provenance.name.v1.QueryReverseLookupRequest.prototype.toObject = function (opt_includeInstance) { return proto.provenance.name.v1.QueryReverseLookupRequest.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.provenance.name.v1.QueryReverseLookupRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.name.v1.QueryReverseLookupRequest.toObject = function (includeInstance, msg) { var f, obj = { address: jspb.Message.getFieldWithDefault(msg, 1, ""), pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageRequest.toObject(includeInstance, f) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.provenance.name.v1.QueryReverseLookupRequest} */ proto.provenance.name.v1.QueryReverseLookupRequest.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.provenance.name.v1.QueryReverseLookupRequest(); return proto.provenance.name.v1.QueryReverseLookupRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.provenance.name.v1.QueryReverseLookupRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.provenance.name.v1.QueryReverseLookupRequest} */ proto.provenance.name.v1.QueryReverseLookupRequest.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ reader.readString(); msg.setAddress(value); break; case 2: var value = new cosmos_base_query_v1beta1_pagination_pb.PageRequest(); reader.readMessage(value, cosmos_base_query_v1beta1_pagination_pb.PageRequest.deserializeBinaryFromReader); msg.setPagination(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.provenance.name.v1.QueryReverseLookupRequest.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.provenance.name.v1.QueryReverseLookupRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.provenance.name.v1.QueryReverseLookupRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.name.v1.QueryReverseLookupRequest.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getAddress(); if (f.length > 0) { writer.writeString(1, f); } f = message.getPagination(); if (f != null) { writer.writeMessage(2, f, cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter); } }; /** * optional string address = 1; * @return {string} */ proto.provenance.name.v1.QueryReverseLookupRequest.prototype.getAddress = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; /** * @param {string} value * @return {!proto.provenance.name.v1.QueryReverseLookupRequest} returns this */ proto.provenance.name.v1.QueryReverseLookupRequest.prototype.setAddress = function (value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional cosmos.base.query.v1beta1.PageRequest pagination = 2; * @return {?proto.cosmos.base.query.v1beta1.PageRequest} */ proto.provenance.name.v1.QueryReverseLookupRequest.prototype.getPagination = function () { return ( /** @type{?proto.cosmos.base.query.v1beta1.PageRequest} */ jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageRequest, 2) ); }; /** * @param {?proto.cosmos.base.query.v1beta1.PageRequest|undefined} value * @return {!proto.provenance.name.v1.QueryReverseLookupRequest} returns this */ proto.provenance.name.v1.QueryReverseLookupRequest.prototype.setPagination = function (value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.provenance.name.v1.QueryReverseLookupRequest} returns this */ proto.provenance.name.v1.QueryReverseLookupRequest.prototype.clearPagination = function () { return this.setPagination(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.provenance.name.v1.QueryReverseLookupRequest.prototype.hasPagination = function () { return jspb.Message.getField(this, 2) != null; }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.provenance.name.v1.QueryReverseLookupResponse.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.provenance.name.v1.QueryReverseLookupResponse.prototype.toObject = function (opt_includeInstance) { return proto.provenance.name.v1.QueryReverseLookupResponse.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.provenance.name.v1.QueryReverseLookupResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.name.v1.QueryReverseLookupResponse.toObject = function (includeInstance, msg) { var f, obj = { nameList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.provenance.name.v1.QueryReverseLookupResponse} */ proto.provenance.name.v1.QueryReverseLookupResponse.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.provenance.name.v1.QueryReverseLookupResponse(); return proto.provenance.name.v1.QueryReverseLookupResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.provenance.name.v1.QueryReverseLookupResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.provenance.name.v1.QueryReverseLookupResponse} */ proto.provenance.name.v1.QueryReverseLookupResponse.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.addName(value); break; case 2: var value = new cosmos_base_query_v1beta1_pagination_pb.PageResponse(); reader.readMessage(value, cosmos_base_query_v1beta1_pagination_pb.PageResponse.deserializeBinaryFromReader); msg.setPagination(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.provenance.name.v1.QueryReverseLookupResponse.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.provenance.name.v1.QueryReverseLookupResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.provenance.name.v1.QueryReverseLookupResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.name.v1.QueryReverseLookupResponse.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getNameList(); if (f.length > 0) { writer.writeRepeatedString(1, f); } f = message.getPagination(); if (f != null) { writer.writeMessage(2, f, cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter); } }; /** * repeated string name = 1; * @return {!Array<string>} */ proto.provenance.name.v1.QueryReverseLookupResponse.prototype.getNameList = function () { return ( /** @type {!Array<string>} */ jspb.Message.getRepeatedField(this, 1) ); }; /** * @param {!Array<string>} value * @return {!proto.provenance.name.v1.QueryReverseLookupResponse} returns this */ proto.provenance.name.v1.QueryReverseLookupResponse.prototype.setNameList = function (value) { return jspb.Message.setField(this, 1, value || []); }; /** * @param {string} value * @param {number=} opt_index * @return {!proto.provenance.name.v1.QueryReverseLookupResponse} returns this */ proto.provenance.name.v1.QueryReverseLookupResponse.prototype.addName = function (value, opt_index) { return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.provenance.name.v1.QueryReverseLookupResponse} returns this */ proto.provenance.name.v1.QueryReverseLookupResponse.prototype.clearNameList = function () { return this.setNameList([]); }; /** * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; * @return {?proto.cosmos.base.query.v1beta1.PageResponse} */ proto.provenance.name.v1.QueryReverseLookupResponse.prototype.getPagination = function () { return ( /** @type{?proto.cosmos.base.query.v1beta1.PageResponse} */ jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageResponse, 2) ); }; /** * @param {?proto.cosmos.base.query.v1beta1.PageResponse|undefined} value * @return {!proto.provenance.name.v1.QueryReverseLookupResponse} returns this */ proto.provenance.name.v1.QueryReverseLookupResponse.prototype.setPagination = function (value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.provenance.name.v1.QueryReverseLookupResponse} returns this */ proto.provenance.name.v1.QueryReverseLookupResponse.prototype.clearPagination = function () { return this.setPagination(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.provenance.name.v1.QueryReverseLookupResponse.prototype.hasPagination = function () { return jspb.Message.getField(this, 2) != null; }; goog.object.extend(exports, proto.provenance.name.v1);