protected void finish(HomeAutomationDeviceParsingItemJSON result)
 {
     if (fieldGeneratorName.have_value)
     {
         result.setName(fieldGeneratorName.value);
         fieldGeneratorName.have_value = false;
     }
     else if ((!(result.hasName())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"Name\" field was missing.");
     }
     if (fieldGeneratorActualNames.have_value)
     {
         result.initActualNames();
         int count = fieldGeneratorActualNames.value.Count;
         for (int num = 0; num < count; ++num)
         {
             result.appendActualNames(fieldGeneratorActualNames.value[num]);
         }
         fieldGeneratorActualNames.value.Clear();
         fieldGeneratorActualNames.have_value = false;
     }
     if (fieldGeneratorSpokenPrefix.have_value)
     {
         result.setSpokenPrefix(fieldGeneratorSpokenPrefix.value);
         fieldGeneratorSpokenPrefix.have_value = false;
     }
 }