Updated generated code to match current API.