Bring back `generateFromX` functions in

Bring back `generateFromX` functions to keep backwards compatibility in
0.3.x branch as deprecated methods.