Autogenerated code for classes