コード例 #1
0
 protected void finish(EstimateUberResponseJSON result)
 {
     if (fieldGeneratorprice.have_value)
     {
         result.setprice(fieldGeneratorprice.value);
         fieldGeneratorprice.have_value = false;
     }
     else if ((!(result.hasprice())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"price\" field was missing.");
     }
     if (fieldGeneratortrip.have_value)
     {
         result.settrip(fieldGeneratortrip.value.referenced());
         fieldGeneratortrip.have_value = false;
     }
     else if ((!(result.hastrip())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"trip\" field was missing.");
     }
     if (fieldGeneratorpickup_estimate.have_value)
     {
         result.setpickup_estimate(fieldGeneratorpickup_estimate.value.referenced());
         fieldGeneratorpickup_estimate.have_value = false;
     }
     else if ((!(result.haspickup_estimate())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"pickup_estimate\" field was missing.");
     }
 }