UNPKG

@routerprotocol/chain-api

Version:

Router Chain API Query client with generated gRPC bindings.

211 lines (184 loc) 6.59 kB
// source: google/api/field_info.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 google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); goog.object.extend(proto, google_protobuf_descriptor_pb); goog.exportSymbol('proto.google.api.FieldInfo', null, global); goog.exportSymbol('proto.google.api.FieldInfo.Format', null, global); goog.exportSymbol('proto.google.api.fieldInfo', 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.google.api.FieldInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.google.api.FieldInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.api.FieldInfo.displayName = 'proto.google.api.FieldInfo'; } 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.google.api.FieldInfo.prototype.toObject = function(opt_includeInstance) { return proto.google.api.FieldInfo.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.google.api.FieldInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.FieldInfo.toObject = function(includeInstance, msg) { var f, obj = { format: jspb.Message.getFieldWithDefault(msg, 1, 0) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.google.api.FieldInfo} */ proto.google.api.FieldInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.api.FieldInfo; return proto.google.api.FieldInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.api.FieldInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.api.FieldInfo} */ proto.google.api.FieldInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!proto.google.api.FieldInfo.Format} */ (reader.readEnum()); msg.setFormat(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.api.FieldInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.api.FieldInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.google.api.FieldInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.FieldInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getFormat(); if (f !== 0.0) { writer.writeEnum( 1, f ); } }; /** * @enum {number} */ proto.google.api.FieldInfo.Format = { FORMAT_UNSPECIFIED: 0, UUID4: 1, IPV4: 2, IPV6: 3, IPV4_OR_IPV6: 4 }; /** * optional Format format = 1; * @return {!proto.google.api.FieldInfo.Format} */ proto.google.api.FieldInfo.prototype.getFormat = function() { return /** @type {!proto.google.api.FieldInfo.Format} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {!proto.google.api.FieldInfo.Format} value * @return {!proto.google.api.FieldInfo} returns this */ proto.google.api.FieldInfo.prototype.setFormat = function(value) { return jspb.Message.setProto3EnumField(this, 1, value); }; /** * A tuple of {field number, class constructor} for the extension * field named `fieldInfo`. * @type {!jspb.ExtensionFieldInfo<!proto.google.api.FieldInfo>} */ proto.google.api.fieldInfo = new jspb.ExtensionFieldInfo( 291403980, {fieldInfo: 0}, proto.google.api.FieldInfo, /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( proto.google.api.FieldInfo.toObject), 0); google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[291403980] = new jspb.ExtensionFieldBinaryInfo( proto.google.api.fieldInfo, jspb.BinaryReader.prototype.readMessage, jspb.BinaryWriter.prototype.writeMessage, proto.google.api.FieldInfo.serializeBinaryToWriter, proto.google.api.FieldInfo.deserializeBinaryFromReader, false); // This registers the extension field with the extended class, so that // toObject() will function correctly. google_protobuf_descriptor_pb.FieldOptions.extensions[291403980] = proto.google.api.fieldInfo; goog.object.extend(exports, proto.google.api);