protected void finish(HomeAutomationDeviceSpecifierJSON result) { if (fieldGeneratorSpecifier.have_value) { result.setSpecifier(fieldGeneratorSpecifier.value); fieldGeneratorSpecifier.have_value = false; } else if ((!(result.hasSpecifier())) && !allow_incomplete) { error("When parsing the object for %what%, the \"Specifier\" field was missing."); } if (fieldGeneratorGroups.have_value) { result.setGroups(fieldGeneratorGroups.value); fieldGeneratorGroups.have_value = false; } if (fieldGeneratorType.have_value) { result.setType(fieldGeneratorType.value); fieldGeneratorType.have_value = false; } if (fieldGeneratorDevices.have_value) { result.setDevices(fieldGeneratorDevices.value); fieldGeneratorDevices.have_value = false; } else if ((!(result.hasDevices())) && !allow_incomplete) { error("When parsing the object for %what%, the \"Devices\" field was missing."); } }
private void fromJSONDeviceSpecifier(JSONValue json_value, bool ignore_extras) { Debug.Assert(json_value != null); HomeAutomationDeviceSpecifierJSON convert_classy = HomeAutomationDeviceSpecifierJSON.from_json(json_value, ignore_extras, true); setDeviceSpecifier(convert_classy); }
public void setDeviceSpecifier(HomeAutomationDeviceSpecifierJSON new_value) { if (flagHasDeviceSpecifier) { } flagHasDeviceSpecifier = true; storeDeviceSpecifier = new_value; }
protected override void finish() { HomeAutomationDeviceSpecifierJSON result = new HomeAutomationDeviceSpecifierJSON(); Debug.Assert(result != null); finish(result); int extra_count = unknownFieldGenerator.field_names.Count; Debug.Assert(extra_count == unknownFieldGenerator.field_values.Count); for (int extra_num = 0; extra_num < extra_count; ++extra_num) { result.extraHomeAutomationDeviceSpecifierAppendPair(unknownFieldGenerator.field_names[extra_num], unknownFieldGenerator.field_values[extra_num]); } unknownFieldGenerator.field_names.Clear(); unknownFieldGenerator.field_values.Clear(); unknownFieldGenerator.index = new Dictionary <string, JSONValue>(); handle_result(result); }
protected override void handle_result(HomeAutomationDeviceSpecifierJSON result) { top.value.Add(result); }
protected override void handle_result(HomeAutomationDeviceSpecifierJSON result) { //@@@ Debug.Assert(!have_value); have_value = true; value = result; }
protected abstract void handle_result(HomeAutomationDeviceSpecifierJSON new_result);