Restore autoGenerate function and add a deprecated