docs: @SuppressWarnings("unchecked")
    public Query limit(int limit) {
      if (limit < 0) {
        throw new IllegalArgumentException(format("Limit of %d is negative.", limit));
      }
  
      if (limit > MAX_LIMIT) {
        throw new IllegalArgumentException(
            format("Limit of %d is greater than %d.", limit, MAX_LIMIT)
        );
      }
  
      params.put(PARAMETER_LIMIT, Integer.toString(limit));
  
      return (Query) this;
    }