// source: annotations.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 =
    (typeof globalThis !== 'undefined' && globalThis) ||
    (typeof window !== 'undefined' && window) ||
    (typeof global !== 'undefined' && global) ||
    (typeof self !== 'undefined' && self) ||
    (function () { return this; }).call(null) ||
    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.AuthLevel', null, global);
goog.exportSymbol('proto.RateLimit', null, global);
goog.exportSymbol('proto.authLevel', null, global);
goog.exportSymbol('proto.isToken', null, global);
goog.exportSymbol('proto.rateLimit', null, global);
goog.exportSymbol('proto.rateLimitAggregate', null, global);
goog.exportSymbol('proto.rateLimitDefault', null, global);
goog.exportSymbol('proto.sensitive', 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.RateLimit = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.RateLimit, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.RateLimit.displayName = 'proto.RateLimit';
}



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.RateLimit.prototype.toObject = function(opt_includeInstance) {
  return proto.RateLimit.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.RateLimit} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.RateLimit.toObject = function(includeInstance, msg) {
  var f, obj = {
    perIp: jspb.Message.getFieldWithDefault(msg, 1, 0),
    perUser: jspb.Message.getFieldWithDefault(msg, 2, 0),
    global: 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.RateLimit}
 */
proto.RateLimit.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.RateLimit;
  return proto.RateLimit.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.RateLimit} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.RateLimit}
 */
proto.RateLimit.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = /** @type {number} */ (reader.readUint32());
      msg.setPerIp(value);
      break;
    case 2:
      var value = /** @type {number} */ (reader.readUint32());
      msg.setPerUser(value);
      break;
    case 3:
      var value = /** @type {number} */ (reader.readUint32());
      msg.setGlobal(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.RateLimit.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.RateLimit.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.RateLimit} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.RateLimit.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = /** @type {number} */ (jspb.Message.getField(message, 1));
  if (f != null) {
    writer.writeUint32(
      1,
      f
    );
  }
  f = /** @type {number} */ (jspb.Message.getField(message, 2));
  if (f != null) {
    writer.writeUint32(
      2,
      f
    );
  }
  f = /** @type {number} */ (jspb.Message.getField(message, 3));
  if (f != null) {
    writer.writeUint32(
      3,
      f
    );
  }
};


/**
 * optional uint32 per_ip = 1;
 * @return {number}
 */
proto.RateLimit.prototype.getPerIp = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};


/**
 * @param {number} value
 * @return {!proto.RateLimit} returns this
 */
proto.RateLimit.prototype.setPerIp = function(value) {
  return jspb.Message.setField(this, 1, value);
};


/**
 * Clears the field making it undefined.
 * @return {!proto.RateLimit} returns this
 */
proto.RateLimit.prototype.clearPerIp = function() {
  return jspb.Message.setField(this, 1, undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.RateLimit.prototype.hasPerIp = function() {
  return jspb.Message.getField(this, 1) != null;
};


/**
 * optional uint32 per_user = 2;
 * @return {number}
 */
proto.RateLimit.prototype.getPerUser = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};


/**
 * @param {number} value
 * @return {!proto.RateLimit} returns this
 */
proto.RateLimit.prototype.setPerUser = function(value) {
  return jspb.Message.setField(this, 2, value);
};


/**
 * Clears the field making it undefined.
 * @return {!proto.RateLimit} returns this
 */
proto.RateLimit.prototype.clearPerUser = function() {
  return jspb.Message.setField(this, 2, undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.RateLimit.prototype.hasPerUser = function() {
  return jspb.Message.getField(this, 2) != null;
};


/**
 * optional uint32 global = 3;
 * @return {number}
 */
proto.RateLimit.prototype.getGlobal = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};


/**
 * @param {number} value
 * @return {!proto.RateLimit} returns this
 */
proto.RateLimit.prototype.setGlobal = function(value) {
  return jspb.Message.setField(this, 3, value);
};


/**
 * Clears the field making it undefined.
 * @return {!proto.RateLimit} returns this
 */
proto.RateLimit.prototype.clearGlobal = function() {
  return jspb.Message.setField(this, 3, undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.RateLimit.prototype.hasGlobal = function() {
  return jspb.Message.getField(this, 3) != null;
};


/**
 * @enum {number}
 */
proto.AuthLevel = {
  AUTH_LEVEL_UNKNOWN: 0,
  AUTH_LEVEL_OPEN: 1,
  AUTH_LEVEL_JAILED: 2,
  AUTH_LEVEL_SECURE: 3,
  AUTH_LEVEL_EDITOR: 5,
  AUTH_LEVEL_ADMIN: 4
};


/**
 * A tuple of {field number, class constructor} for the extension
 * field named `sensitive`.
 * @type {!jspb.ExtensionFieldInfo<boolean>}
 */
proto.sensitive = new jspb.ExtensionFieldInfo(
    50000,
    {sensitive: 0},
    null,
     /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
         null),
    0);

google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[50000] = new jspb.ExtensionFieldBinaryInfo(
    proto.sensitive,
    jspb.BinaryReader.prototype.readBool,
    jspb.BinaryWriter.prototype.writeBool,
    undefined,
    undefined,
    false);
// This registers the extension field with the extended class, so that
// toObject() will function correctly.
google_protobuf_descriptor_pb.FieldOptions.extensions[50000] = proto.sensitive;


/**
 * A tuple of {field number, class constructor} for the extension
 * field named `isToken`.
 * @type {!jspb.ExtensionFieldInfo<boolean>}
 */
proto.isToken = new jspb.ExtensionFieldInfo(
    50001,
    {isToken: 0},
    null,
     /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
         null),
    0);

google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[50001] = new jspb.ExtensionFieldBinaryInfo(
    proto.isToken,
    jspb.BinaryReader.prototype.readBool,
    jspb.BinaryWriter.prototype.writeBool,
    undefined,
    undefined,
    false);
// This registers the extension field with the extended class, so that
// toObject() will function correctly.
google_protobuf_descriptor_pb.FieldOptions.extensions[50001] = proto.isToken;


/**
 * A tuple of {field number, class constructor} for the extension
 * field named `authLevel`.
 * @type {!jspb.ExtensionFieldInfo<!proto.AuthLevel>}
 */
proto.authLevel = new jspb.ExtensionFieldInfo(
    50001,
    {authLevel: 0},
    null,
     /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
         null),
    0);

google_protobuf_descriptor_pb.ServiceOptions.extensionsBinary[50001] = new jspb.ExtensionFieldBinaryInfo(
    proto.authLevel,
    jspb.BinaryReader.prototype.readEnum,
    jspb.BinaryWriter.prototype.writeEnum,
    undefined,
    undefined,
    false);
// This registers the extension field with the extended class, so that
// toObject() will function correctly.
google_protobuf_descriptor_pb.ServiceOptions.extensions[50001] = proto.authLevel;


/**
 * A tuple of {field number, class constructor} for the extension
 * field named `rateLimitDefault`.
 * @type {!jspb.ExtensionFieldInfo<!proto.RateLimit>}
 */
proto.rateLimitDefault = new jspb.ExtensionFieldInfo(
    50003,
    {rateLimitDefault: 0},
    proto.RateLimit,
     /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
         proto.RateLimit.toObject),
    0);

google_protobuf_descriptor_pb.ServiceOptions.extensionsBinary[50003] = new jspb.ExtensionFieldBinaryInfo(
    proto.rateLimitDefault,
    jspb.BinaryReader.prototype.readMessage,
    jspb.BinaryWriter.prototype.writeMessage,
    proto.RateLimit.serializeBinaryToWriter,
    proto.RateLimit.deserializeBinaryFromReader,
    false);
// This registers the extension field with the extended class, so that
// toObject() will function correctly.
google_protobuf_descriptor_pb.ServiceOptions.extensions[50003] = proto.rateLimitDefault;


/**
 * A tuple of {field number, class constructor} for the extension
 * field named `rateLimitAggregate`.
 * @type {!jspb.ExtensionFieldInfo<!proto.RateLimit>}
 */
proto.rateLimitAggregate = new jspb.ExtensionFieldInfo(
    50004,
    {rateLimitAggregate: 0},
    proto.RateLimit,
     /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
         proto.RateLimit.toObject),
    0);

google_protobuf_descriptor_pb.ServiceOptions.extensionsBinary[50004] = new jspb.ExtensionFieldBinaryInfo(
    proto.rateLimitAggregate,
    jspb.BinaryReader.prototype.readMessage,
    jspb.BinaryWriter.prototype.writeMessage,
    proto.RateLimit.serializeBinaryToWriter,
    proto.RateLimit.deserializeBinaryFromReader,
    false);
// This registers the extension field with the extended class, so that
// toObject() will function correctly.
google_protobuf_descriptor_pb.ServiceOptions.extensions[50004] = proto.rateLimitAggregate;


/**
 * A tuple of {field number, class constructor} for the extension
 * field named `rateLimit`.
 * @type {!jspb.ExtensionFieldInfo<!proto.RateLimit>}
 */
proto.rateLimit = new jspb.ExtensionFieldInfo(
    50002,
    {rateLimit: 0},
    proto.RateLimit,
     /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
         proto.RateLimit.toObject),
    0);

google_protobuf_descriptor_pb.MethodOptions.extensionsBinary[50002] = new jspb.ExtensionFieldBinaryInfo(
    proto.rateLimit,
    jspb.BinaryReader.prototype.readMessage,
    jspb.BinaryWriter.prototype.writeMessage,
    proto.RateLimit.serializeBinaryToWriter,
    proto.RateLimit.deserializeBinaryFromReader,
    false);
// This registers the extension field with the extended class, so that
// toObject() will function correctly.
google_protobuf_descriptor_pb.MethodOptions.extensions[50002] = proto.rateLimit;

goog.object.extend(exports, proto);
