Add gob encoding for generated model