package com.priusis.client.extensions.common.conf.mapping;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.priusis.client.data.kv.DataType;
import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * Created by priusis on 17.01.17.
 */
@Data
@AllArgsConstructor
public class DataTypeMapping {

    private DataType dataType;

    @JsonCreator
    public static DataTypeMapping forValue(String value) {
        return new DataTypeMapping(DataType.valueOf(value.toUpperCase()));
    }

}
