private boolean hasThrottle(QuotaProtos.ThrottleType quotaType,
    QuotaProtos.Throttle.Builder throttleBuilder) {
    boolean hasThrottle = false;
    switch (quotaType) {
      case REQUEST_NUMBER:
        if (throttleBuilder.hasReqNum()) {
          hasThrottle = true;
        }
        break;
      case REQUEST_SIZE:
        if (throttleBuilder.hasReqSize()) {
          hasThrottle = true;
        }
        break;
      case WRITE_NUMBER:
        if (throttleBuilder.hasWriteNum()) {
          hasThrottle = true;
        }
        break;
      case WRITE_SIZE:
        if (throttleBuilder.hasWriteSize()) {
          hasThrottle = true;
        }
        break;
      case READ_NUMBER:
        if (throttleBuilder.hasReadNum()) {
          hasThrottle = true;
        }
        break;
      case READ_SIZE:
        if (throttleBuilder.hasReadSize()) {
          hasThrottle = true;
        }
        break;
      case REQUEST_CAPACITY_UNIT:
        if (throttleBuilder.hasReqCapacityUnit()) {
          hasThrottle = true;
        }
        break;
      case READ_CAPACITY_UNIT:
        if (throttleBuilder.hasReadCapacityUnit()) {
          hasThrottle = true;
        }
        break;
      case WRITE_CAPACITY_UNIT:
        if (throttleBuilder.hasWriteCapacityUnit()) {
          hasThrottle = true;
        }
        break;
      case ATOMIC_READ_SIZE:
        if (throttleBuilder.hasAtomicReadSize()) {
          hasThrottle = true;
        }
        break;
      case ATOMIC_REQUEST_NUMBER:
        if (throttleBuilder.hasAtomicReqNum()) {
          hasThrottle = true;
        }
        break;
      case ATOMIC_WRITE_SIZE:
        if (throttleBuilder.hasAtomicWriteSize()) {
          hasThrottle = true;
        }
        break;
      case REQUEST_HANDLER_USAGE_MS:
        if (throttleBuilder.hasReqHandlerUsageMs()) {
          hasThrottle = true;
        }
        break;
      default:
    }
    return hasThrottle;
  }
Constructs a new {@link Quotas} message from {@code this}.
hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/GlobalQuotaSettingsImpl.java