docs: private OtherDirectCosts getOtherDirectCosts(BudgetPeriodDto periodInfo) {
  
          OtherDirectCosts otherDirectCosts = OtherDirectCosts.Factory.newInstance();
          if (periodInfo != null) {
              if (periodInfo.getOtherDirectCosts() != null && periodInfo.getOtherDirectCosts().size() > 0) {
                  TotalDataType totalMaterials = TotalDataType.Factory.newInstance();
                  if (periodInfo.getOtherDirectCosts().get(0).getmaterials() != null) {
                      totalMaterials.setFederal(periodInfo.getOtherDirectCosts().get(0).getmaterials().bigDecimalValue());
                  }
                  if (periodInfo.getOtherDirectCosts().get(0).getMaterialsCostSharing() != null) {
                      totalMaterials.setNonFederal(periodInfo.getOtherDirectCosts().get(0).getMaterialsCostSharing()
                              .bigDecimalValue());
                      if (periodInfo.getOtherDirectCosts().get(0).getmaterials() != null) {
                          totalMaterials.setTotalFedNonFed(periodInfo.getOtherDirectCosts().get(0).getmaterials().add(
                                  periodInfo.getOtherDirectCosts().get(0).getMaterialsCostSharing()).bigDecimalValue());
                      }
                      else {
                          totalMaterials.setTotalFedNonFed(periodInfo.getOtherDirectCosts().get(0).getMaterialsCostSharing()
                                  .bigDecimalValue());
                      }
                  }
                  otherDirectCosts.setMaterialsSupplies(totalMaterials);
                  TotalDataType totalPublication = TotalDataType.Factory.newInstance();
                  if (periodInfo.getOtherDirectCosts().get(0).getpublications() != null) {
                      totalPublication.setFederal(periodInfo.getOtherDirectCosts().get(0).getpublications().bigDecimalValue());
                  }
                  if (periodInfo.getOtherDirectCosts().get(0).getPublicationsCostSharing() != null) {
                      totalPublication.setNonFederal(periodInfo.getOtherDirectCosts().get(0).getPublicationsCostSharing()
                              .bigDecimalValue());
                      if (periodInfo.getOtherDirectCosts().get(0).getpublications() != null) {
                          totalPublication.setTotalFedNonFed(periodInfo.getOtherDirectCosts().get(0).getpublications().add(
                                  periodInfo.getOtherDirectCosts().get(0).getPublicationsCostSharing()).bigDecimalValue());
                      }
                      else {
                          totalPublication.setTotalFedNonFed(periodInfo.getOtherDirectCosts().get(0).getPublicationsCostSharing()
                                  .bigDecimalValue());
                      }
                  }
                  otherDirectCosts.setPublicationCosts(totalPublication);
                  TotalDataType totalConsultant = TotalDataType.Factory.newInstance();
                  if (periodInfo.getOtherDirectCosts().get(0).getConsultants() != null) {
                      totalConsultant.setFederal(periodInfo.getOtherDirectCosts().get(0).getConsultants().bigDecimalValue());
                  }
                  if (periodInfo.getOtherDirectCosts().get(0).getConsultantsCostSharing() != null) {
                      totalConsultant.setNonFederal(periodInfo.getOtherDirectCosts().get(0).getConsultantsCostSharing()
                              .bigDecimalValue());
                      if (periodInfo.getOtherDirectCosts().get(0).getConsultants() != null) {
                          totalConsultant.setTotalFedNonFed(periodInfo.getOtherDirectCosts().get(0).getConsultants().add(
                                  periodInfo.getOtherDirectCosts().get(0).getConsultantsCostSharing()).bigDecimalValue());
                      }
                      else {
                          totalConsultant.setTotalFedNonFed(periodInfo.getOtherDirectCosts().get(0).getConsultantsCostSharing()
                                  .bigDecimalValue());
                      }
                  }
                  otherDirectCosts.setConsultantServices(totalConsultant);
                  TotalDataType totalADP = TotalDataType.Factory.newInstance();
                  if (periodInfo.getOtherDirectCosts().get(0).getcomputer() != null) {
                      totalADP.setFederal(periodInfo.getOtherDirectCosts().get(0).getcomputer().bigDecimalValue());
                  }
                  if (periodInfo.getOtherDirectCosts().get(0).getComputerCostSharing() != null) {
                      totalADP.setNonFederal(periodInfo.getOtherDirectCosts().get(0).getComputerCostSharing().bigDecimalValue());
                      if (periodInfo.getOtherDirectCosts().get(0).getcomputer() != null) {
                          totalADP.setTotalFedNonFed(periodInfo.getOtherDirectCosts().get(0).getcomputer().add(
                                  periodInfo.getOtherDirectCosts().get(0).getComputerCostSharing()).bigDecimalValue());
                      }
                      else {
                          totalADP.setTotalFedNonFed(periodInfo.getOtherDirectCosts().get(0).getComputerCostSharing()
                                  .bigDecimalValue());
                      }
                  }
                  otherDirectCosts.setADPComputerServices(totalADP);
                  TotalDataType totalSubaward = TotalDataType.Factory.newInstance();
                  if (periodInfo.getOtherDirectCosts().get(0).getsubAwards() != null) {
                      totalSubaward.setFederal(periodInfo.getOtherDirectCosts().get(0).getsubAwards().bigDecimalValue());
                  }
                  if (periodInfo.getOtherDirectCosts().get(0).getSubAwardsCostSharing() != null) {
                      totalSubaward
                              .setNonFederal(periodInfo.getOtherDirectCosts().get(0).getSubAwardsCostSharing().bigDecimalValue());
                      if (periodInfo.getOtherDirectCosts().get(0).getsubAwards() != null) {
                          totalSubaward.setTotalFedNonFed(periodInfo.getOtherDirectCosts().get(0).getsubAwards().add(
                                  periodInfo.getOtherDirectCosts().get(0).getSubAwardsCostSharing()).bigDecimalValue());
                      }
                      else {
                          totalSubaward.setTotalFedNonFed(periodInfo.getOtherDirectCosts().get(0).getSubAwardsCostSharing()
                                  .bigDecimalValue());
                      }
                  }
                  otherDirectCosts.setSubawardConsortiumContractualCosts(totalSubaward);
                  TotalDataType totalEquipment = TotalDataType.Factory.newInstance();
                  if (periodInfo.getOtherDirectCosts().get(0).getEquipRental() != null) {
                      totalEquipment.setFederal(periodInfo.getOtherDirectCosts().get(0).getEquipRental().bigDecimalValue());
                  }
                  if (periodInfo.getOtherDirectCosts().get(0).getEquipRentalCostSharing() != null) {
                      totalEquipment.setNonFederal(periodInfo.getOtherDirectCosts().get(0).getEquipRentalCostSharing()
                              .bigDecimalValue());
                      if (periodInfo.getOtherDirectCosts().get(0).getEquipRental() != null) {
                          totalEquipment.setTotalFedNonFed(periodInfo.getOtherDirectCosts().get(0).getEquipRental().add(
                                  periodInfo.getOtherDirectCosts().get(0).getEquipRentalCostSharing()).bigDecimalValue());
                      }
                      else {
                          totalEquipment.setTotalFedNonFed(periodInfo.getOtherDirectCosts().get(0).getEquipRentalCostSharing()
                                  .bigDecimalValue());
                      }
                  }
                  otherDirectCosts.setEquipmentRentalFee(totalEquipment);
                  TotalDataType totalAlterations = TotalDataType.Factory.newInstance();
                  if (periodInfo.getOtherDirectCosts().get(0).getAlterations() != null) {
                      totalAlterations.setFederal(periodInfo.getOtherDirectCosts().get(0).getAlterations().bigDecimalValue());
                  }
                  if (periodInfo.getOtherDirectCosts().get(0).getAlterationsCostSharing() != null) {
                      totalAlterations.setNonFederal(periodInfo.getOtherDirectCosts().get(0).getAlterationsCostSharing()
                              .bigDecimalValue());
                      if (periodInfo.getOtherDirectCosts().get(0).getAlterations() != null) {
                          totalAlterations.setTotalFedNonFed(periodInfo.getOtherDirectCosts().get(0).getAlterations().add(
                                  periodInfo.getOtherDirectCosts().get(0).getAlterationsCostSharing()).bigDecimalValue());
                      }
                      else {
                          totalAlterations.setTotalFedNonFed(periodInfo.getOtherDirectCosts().get(0).getAlterationsCostSharing()
                                  .bigDecimalValue());
                      }
                  }
                  otherDirectCosts.setAlterationsRenovations(totalAlterations);
                  otherDirectCosts.setOthers(getOthersForOtherDirectCosts(periodInfo));
                  SummaryDataType summary = SummaryDataType.Factory.newInstance();
                  if (periodInfo.getOtherDirectCosts().get(0).gettotalOtherDirect() != null) {
                      summary.setFederalSummary(periodInfo.getOtherDirectCosts().get(0).gettotalOtherDirect().bigDecimalValue());
                  }
                  if (periodInfo.getOtherDirectCosts().get(0).getTotalOtherDirectCostSharing() != null) {
                      summary.setNonFederalSummary(periodInfo.getOtherDirectCosts().get(0).getTotalOtherDirectCostSharing()
                              .bigDecimalValue());
                      if (periodInfo.getOtherDirectCosts().get(0).gettotalOtherDirect() != null) {
                          summary.setTotalFedNonFedSummary(periodInfo.getOtherDirectCosts().get(0).gettotalOtherDirect().add(
                                  periodInfo.getOtherDirectCosts().get(0).getTotalOtherDirectCostSharing()).bigDecimalValue());
                      }
                      else {
                          summary.setTotalFedNonFedSummary(periodInfo.getOtherDirectCosts().get(0).getTotalOtherDirectCostSharing()
                                  .bigDecimalValue());
                      }
                  }
                  otherDirectCosts.setTotalOtherDirectCost(summary);
              }
          }
          return otherDirectCosts;
      }