Remove deprecated apis

Removing these reduces the number of warnings in the generated code

- [ ] @dogles