Introduced a factory for codegen data containers

Moved parameter/response generation code to
dedicated methods so that subclasses may extend it