Generate simple read-only class

Make sure I know how this works before trying to fix the issues with
codegen.generator.