Example #1
0
 protected void finish(RandomNumberGeneratorNumberRequestResultJSON result)
 {
     if (fieldGeneratorValues.have_value)
     {
         result.initValues();
         int count = fieldGeneratorValues.value.Count;
         for (int num = 0; num < count; ++num)
         {
             result.appendValues(Double.Parse(fieldGeneratorValues.value[num]));
         }
         fieldGeneratorValues.value.Clear();
         fieldGeneratorValues.have_value = false;
     }
     if (fieldGeneratorNumberType.have_value)
     {
         result.setNumberType(fieldGeneratorNumberType.value);
         fieldGeneratorNumberType.have_value = false;
     }
     else if ((!(result.hasNumberType())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"NumberType\" field was missing.");
     }
     if (fieldGeneratorUpperBound.have_value)
     {
         result.setUpperBoundText(fieldGeneratorUpperBound.value);
         fieldGeneratorUpperBound.have_value = false;
     }
     else if ((!(result.hasUpperBound())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"UpperBound\" field was missing.");
     }
     if (fieldGeneratorLowerBound.have_value)
     {
         result.setLowerBoundText(fieldGeneratorLowerBound.value);
         fieldGeneratorLowerBound.have_value = false;
     }
     else if ((!(result.hasLowerBound())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"LowerBound\" field was missing.");
     }
     base.finish(result);
 }