class RatesCurveInputsMarketDataFunction implements MarketDataFunction<RatesCurveInputs, RatesCurveInputsId> {

  @Override
  public MarketDataRequirements requirements(RatesCurveInputsId id, MarketDataConfig marketDataConfig) {
    RatesCurveGroupDefinition groupConfig = marketDataConfig.get(RatesCurveGroupDefinition.class, id.getCurveGroupName());
    Optional<CurveDefinition> optionalDefinition = groupConfig.findCurveDefinition(id.getCurveName());
    if (!optionalDefinition.isPresent()) {
      return MarketDataRequirements.empty();
    }
    CurveDefinition definition = optionalDefinition.get();
    return MarketDataRequirements.builder().addValues(nodeRequirements(ImmutableList.of(definition))).build();
  }

}