protected void finish(UberTimeEstimateDetailsJSON result) { if (fieldGeneratorproduct_id.have_value) { result.setproduct_id(fieldGeneratorproduct_id.value); fieldGeneratorproduct_id.have_value = false; } else if ((!(result.hasproduct_id())) && !allow_incomplete) { error("When parsing the object for %what%, the \"product_id\" field was missing."); } if (fieldGeneratordisplay_name.have_value) { result.setdisplay_name(fieldGeneratordisplay_name.value); fieldGeneratordisplay_name.have_value = false; } else if ((!(result.hasdisplay_name())) && !allow_incomplete) { error("When parsing the object for %what%, the \"display_name\" field was missing."); } if (fieldGeneratorestimate.have_value) { result.setestimateText(fieldGeneratorestimate.value); fieldGeneratorestimate.have_value = false; } else if ((!(result.hasestimate())) && !allow_incomplete) { error("When parsing the object for %what%, the \"estimate\" field was missing."); } }
private void fromJSONtimes(JSONValue json_value, bool ignore_extras) { Debug.Assert(json_value != null); JSONArrayValue json_array1 = json_value.array_value(); if (json_array1 == null) { throw new Exception("The value for field times of UberTimeEstimatesResponseJSON is not an array."); } int count1 = json_array1.componentCount(); List <UberTimeEstimateDetailsJSON> vector_times1 = new List <UberTimeEstimateDetailsJSON>(count1); for (int num1 = 0; num1 < count1; ++num1) { UberTimeEstimateDetailsJSON convert_classy = UberTimeEstimateDetailsJSON.from_json(json_array1.component(num1), ignore_extras, true); vector_times1.Add(convert_classy); } inittimes(); for (int num1 = 0; num1 < vector_times1.Count; ++num1) { appendtimes(vector_times1[num1]); } for (int num1 = 0; num1 < vector_times1.Count; ++num1) { } }
public void appendtimes(UberTimeEstimateDetailsJSON to_append) { if (!flagHastimes) { flagHastimes = true; storetimes.Clear(); } Debug.Assert(flagHastimes); storetimes.Add(to_append); }
protected override void finish() { UberTimeEstimateDetailsJSON result = new UberTimeEstimateDetailsJSON(); 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.extraUberTimeEstimateDetailsAppendPair(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(UberTimeEstimateDetailsJSON result) { top.value.Add(result); }
protected override void handle_result(UberTimeEstimateDetailsJSON result) { //@@@ Debug.Assert(!have_value); have_value = true; value = result; }
protected abstract void handle_result(UberTimeEstimateDetailsJSON new_result);