Beispiel #1
0
 protected void finish(SunriseSunsetTimeConversationStateJSON result)
 {
     if (fieldGeneratorDateAndTimeKind.have_value)
     {
         result.setDateAndTimeKind();
         fieldGeneratorDateAndTimeKind.have_value = false;
     }
     else if ((!(result.hasDateAndTimeKind())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"DateAndTimeKind\" field was missing.");
     }
     if (fieldGeneratorMapLocation.have_value)
     {
         result.setMapLocation(fieldGeneratorMapLocation.value);
         fieldGeneratorMapLocation.have_value = false;
     }
     else if ((!(result.hasMapLocation())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"MapLocation\" field was missing.");
     }
     if (fieldGeneratorRequestedType.have_value)
     {
         result.setRequestedType(fieldGeneratorRequestedType.value);
         fieldGeneratorRequestedType.have_value = false;
     }
     else if ((!(result.hasRequestedType())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"RequestedType\" field was missing.");
     }
     if (fieldGeneratorDateTimeRangeSpec.have_value)
     {
         result.setDateTimeRangeSpec(fieldGeneratorDateTimeRangeSpec.value);
         fieldGeneratorDateTimeRangeSpec.have_value = false;
     }
     else if ((!(result.hasDateTimeRangeSpec())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"DateTimeRangeSpec\" field was missing.");
     }
     if (fieldGeneratorIsDateTimeRequested.have_value)
     {
         result.setIsDateTimeRequested(fieldGeneratorIsDateTimeRequested.value);
         fieldGeneratorIsDateTimeRequested.have_value = false;
     }
     else if ((!(result.hasIsDateTimeRequested())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"IsDateTimeRequested\" field was missing.");
     }
     if (fieldGeneratorFutureRequested.have_value)
     {
         result.setFutureRequested(fieldGeneratorFutureRequested.value);
         fieldGeneratorFutureRequested.have_value = false;
     }
     else if ((!(result.hasFutureRequested())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"FutureRequested\" field was missing.");
     }
     if (fieldGeneratorPastRequested.have_value)
     {
         result.setPastRequested(fieldGeneratorPastRequested.value);
         fieldGeneratorPastRequested.have_value = false;
     }
     else if ((!(result.hasPastRequested())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"PastRequested\" field was missing.");
     }
 }