Core functionality for client function generation for servant APIs
