T4 template for immutable type generation