protected void finish(AmountPropertyJSON result) { if (fieldGeneratorBase.have_value) { result.setBase(fieldGeneratorBase.value); fieldGeneratorBase.have_value = false; } else if ((!(result.hasBase())) && !allow_incomplete) { error("When parsing the object for %what%, the \"Base\" field was missing."); } if (fieldGeneratorProperty.have_value) { result.setProperty(fieldGeneratorProperty.value); fieldGeneratorProperty.have_value = false; } else if ((!(result.hasProperty())) && !allow_incomplete) { error("When parsing the object for %what%, the \"Property\" field was missing."); } if (fieldGeneratorAmount.have_value) { result.setAmount(fieldGeneratorAmount.value); fieldGeneratorAmount.have_value = false; } else if ((!(result.hasAmount())) && !allow_incomplete) { error("When parsing the object for %what%, the \"Amount\" field was missing."); } base.finish(result); }