Updated generated code to match current API.
Merge pull request #9 from DaoWen/master

Updated generated code to match current API.