A lightweight model layer for building object-oriented API wrappers