protected void finish(LocationAndTimeJSON result) { if (fieldGeneratorMapLocation.have_value) { result.setMapLocation(fieldGeneratorMapLocation.value); fieldGeneratorMapLocation.have_value = false; } if (fieldGeneratorTimeZone.have_value) { result.setTimeZone(fieldGeneratorTimeZone.value); fieldGeneratorTimeZone.have_value = false; } if (fieldGeneratorDateTimeSpec.have_value) { result.setDateTimeSpec(fieldGeneratorDateTimeSpec.value); fieldGeneratorDateTimeSpec.have_value = false; } else if ((!(result.hasDateTimeSpec())) && !allow_incomplete) { error("When parsing the object for %what%, the \"DateTimeSpec\" field was missing."); } }