protected void finish(PhoneNumberJSON result) { if (fieldGeneratorPhoneNumber.have_value) { result.setPhoneNumber(fieldGeneratorPhoneNumber.value); fieldGeneratorPhoneNumber.have_value = false; } else if ((!(result.hasPhoneNumber())) && !allow_incomplete) { error("When parsing the object for %what%, the \"PhoneNumber\" field was missing."); } if (fieldGeneratorDerivation.have_value) { result.setDerivation(fieldGeneratorDerivation.value); fieldGeneratorDerivation.have_value = false; } else if ((!(result.hasDerivation())) && !allow_incomplete) { error("When parsing the object for %what%, the \"Derivation\" field was missing."); } }