private Map<ThrottleType, TimedQuota> buildThrottleQuotas(Throttle proto) {
    HashMap<ThrottleType, TimedQuota> quotas = new HashMap<>();
    if (proto.hasReadNum()) {
      quotas.put(ThrottleType.READ_NUMBER, proto.getReadNum());
    }
    if (proto.hasReadSize()) {
      quotas.put(ThrottleType.READ_SIZE, proto.getReadSize());
    }
    if (proto.hasReqNum()) {
      quotas.put(ThrottleType.REQUEST_NUMBER, proto.getReqNum());
    }
    if (proto.hasReqSize()) {
      quotas.put(ThrottleType.REQUEST_SIZE, proto.getReqSize());
    }
    if (proto.hasWriteNum()) {
      quotas.put(ThrottleType.WRITE_NUMBER, proto.getWriteNum());
    }
    if (proto.hasWriteSize()) {
      quotas.put(ThrottleType.WRITE_SIZE, proto.getWriteSize());
    }
    if (proto.hasReqCapacityUnit()) {
      quotas.put(ThrottleType.REQUEST_CAPACITY_UNIT, proto.getReqCapacityUnit());
    }
    if (proto.hasReadCapacityUnit()) {
      quotas.put(ThrottleType.READ_CAPACITY_UNIT, proto.getReqCapacityUnit());
    }
    if (proto.hasWriteCapacityUnit()) {
      quotas.put(ThrottleType.WRITE_CAPACITY_UNIT, proto.getWriteCapacityUnit());
    }
    return quotas;
  }
Constructs a new {@link Quotas} message from {@code this}.
hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/GlobalQuotaSettingsImpl.java