add support for generating case class

CodeGen is extended with support for generating case class instead of tuple.