Update ObjectBuilder.php

Add `@throws` phpdocs in enum getter/setter.