protected void finish(CarControlDoorStateJSON result)
 {
     if (fieldGeneratorCommandType.have_value)
     {
         result.setCommandType(fieldGeneratorCommandType.value);
         fieldGeneratorCommandType.have_value = false;
     }
     else if ((!(result.hasCommandType())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"CommandType\" field was missing.");
     }
     if (fieldGeneratorDoorSelection.have_value)
     {
         result.initDoorSelection();
         int count = fieldGeneratorDoorSelection.value.Count;
         for (int num = 0; num < count; ++num)
         {
             result.appendDoorSelection(fieldGeneratorDoorSelection.value[num]);
         }
         fieldGeneratorDoorSelection.value.Clear();
         fieldGeneratorDoorSelection.have_value = false;
     }
     else if ((!(result.hasDoorSelection())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"DoorSelection\" field was missing.");
     }
 }