package io.delphiplatform.api.config;

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

import javax.annotation.Nullable;

import io.delphiplatform.api.v3.model.IndexParam;

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

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