Only generate code for some methods on a service

@danrice-square @loganj 

This if test is not needed.