public static QuotaProtos.ThrottleType toProtoThrottleType(final ThrottleType type) {
    switch (type) {
      case REQUEST_NUMBER:
        return QuotaProtos.ThrottleType.REQUEST_NUMBER;
      case REQUEST_SIZE:
        return QuotaProtos.ThrottleType.REQUEST_SIZE;
      case WRITE_NUMBER:
        return QuotaProtos.ThrottleType.WRITE_NUMBER;
      case WRITE_SIZE:
        return QuotaProtos.ThrottleType.WRITE_SIZE;
      case READ_NUMBER:
        return QuotaProtos.ThrottleType.READ_NUMBER;
      case READ_SIZE:
        return QuotaProtos.ThrottleType.READ_SIZE;
      case REQUEST_CAPACITY_UNIT:
        return QuotaProtos.ThrottleType.REQUEST_CAPACITY_UNIT;
      case READ_CAPACITY_UNIT:
        return QuotaProtos.ThrottleType.READ_CAPACITY_UNIT;
      case WRITE_CAPACITY_UNIT:
        return QuotaProtos.ThrottleType.WRITE_CAPACITY_UNIT;
      case ATOMIC_READ_SIZE:
        return QuotaProtos.ThrottleType.ATOMIC_READ_SIZE;
      case ATOMIC_REQUEST_NUMBER:
        return QuotaProtos.ThrottleType.ATOMIC_REQUEST_NUMBER;
      case ATOMIC_WRITE_SIZE:
        return QuotaProtos.ThrottleType.ATOMIC_WRITE_SIZE;
      case REQUEST_HANDLER_USAGE_MS:
        return QuotaProtos.ThrottleType.REQUEST_HANDLER_USAGE_MS;
      default:
        throw new RuntimeException("Invalid ThrottleType " + type);
    }
  }
Convert a client ThrottleType to a protocol buffer ThrottleType
@return the converted protocol buffer ThrottleType
hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java