generate interface and enum