示例#1
0
 protected void finish(TypeNativeDataJSON result)
 {
     if (fieldGeneratorUberRequestsSpec.have_value)
     {
         result.setUberRequestsSpec(fieldGeneratorUberRequestsSpec.value);
         fieldGeneratorUberRequestsSpec.have_value = false;
     }
     else if ((!(result.hasUberRequestsSpec())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"UberRequestsSpec\" field was missing.");
     }
     if (fieldGeneratorUberProduct.have_value)
     {
         result.setUberProduct(fieldGeneratorUberProduct.value);
         fieldGeneratorUberProduct.have_value = false;
     }
     else if ((!(result.hasUberProduct())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"UberProduct\" field was missing.");
     }
     if (fieldGeneratorErrors.have_value)
     {
         result.setErrors(fieldGeneratorErrors.value);
         fieldGeneratorErrors.have_value = false;
     }
     else if ((!(result.hasErrors())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"Errors\" field was missing.");
     }
 }