Example #1
0
 protected void finish(TypeStatRequestsJSON result)
 {
     if (fieldGeneratorTeamOrPlayer.have_value)
     {
         result.setTeamOrPlayer(fieldGeneratorTeamOrPlayer.value);
         fieldGeneratorTeamOrPlayer.have_value = false;
     }
     else if ((!(result.hasTeamOrPlayer())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"TeamOrPlayer\" field was missing.");
     }
     if (fieldGeneratorStatisticType.have_value)
     {
         result.setStatisticType(fieldGeneratorStatisticType.value);
         fieldGeneratorStatisticType.have_value = false;
     }
     else if ((!(result.hasStatisticType())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"StatisticType\" field was missing.");
     }
     if (fieldGeneratorArguments.have_value)
     {
         result.initArguments();
         int count = fieldGeneratorArguments.value.Count;
         for (int num = 0; num < count; ++num)
         {
             result.appendArguments(fieldGeneratorArguments.value[num]);
         }
         fieldGeneratorArguments.value.Clear();
         fieldGeneratorArguments.have_value = false;
     }
 }