package io.delphiplatform.api.config;

import org.springframework.core.convert.converter.Converter;

import javax.annotation.Nullable;

import io.delphiplatform.api.v3.model.ads.GroupByAdsPerformance;

/**
 * Get the GroupByAdsPerformance enum from a (lowercase) string parameter
 */
public class GroupByAdsPerformanceEnumConverter implements Converter<String, GroupByAdsPerformance> {

    @Override
    public GroupByAdsPerformance convert(@Nullable String source) {
        return GroupByAdsPerformance.fromValue(source);
    }
}
