generic protocol model generator