private void fromJSONUberProductsSpec(JSONValue json_value, bool ignore_extras) { Debug.Assert(json_value != null); UberProductsSpecJSON convert_classy = UberProductsSpecJSON.from_json(json_value, ignore_extras, true); setUberProductsSpec(convert_classy); }
public void setUberProductsSpec(UberProductsSpecJSON new_value) { if (flagHasUberProductsSpec) { } flagHasUberProductsSpec = true; storeUberProductsSpec = new_value; }
protected override void finish() { if (!(getUberSpecJSONKey().Equals("UberProductsSpec"))) { throw new Exception("The key field has a value other than `UberProductsSpec'."); } UberProductsSpecJSON result = new UberProductsSpecJSON(); 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.extraUberProductsSpecAppendPair(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 void finish(UberProductsSpecJSON result) { if (fieldGeneratorPreferredProduct.have_value) { result.setPreferredProduct(fieldGeneratorPreferredProduct.value); fieldGeneratorPreferredProduct.have_value = false; } else if ((!(result.hasPreferredProduct())) && !allow_incomplete) { error("When parsing the object for %what%, the \"PreferredProduct\" field was missing."); } if (fieldGeneratorPickupLocation.have_value) { result.setPickupLocation(fieldGeneratorPickupLocation.value); fieldGeneratorPickupLocation.have_value = false; } else if ((!(result.hasPickupLocation())) && !allow_incomplete) { error("When parsing the object for %what%, the \"PickupLocation\" field was missing."); } if (fieldGeneratorQueryTypes.have_value) { result.initQueryTypes(); int count = fieldGeneratorQueryTypes.value.Count; for (int num = 0; num < count; ++num) { result.appendQueryTypes(fieldGeneratorQueryTypes.value[num]); } fieldGeneratorQueryTypes.value.Clear(); fieldGeneratorQueryTypes.have_value = false; } else if ((!(result.hasQueryTypes())) && !allow_incomplete) { error("When parsing the object for %what%, the \"QueryTypes\" field was missing."); } base.finish(result); }
protected override void handle_result(UberProductsSpecJSON result) { top.value.Add(result); }
protected override void handle_result(UberProductsSpecJSON result) { //@@@ Debug.Assert(!have_value); have_value = true; value = result; }
protected abstract void handle_result(UberProductsSpecJSON new_result);