package com.lingniu.ingest.identity;

public record VehicleIdentity(
        String vin,
        boolean resolved,
        VehicleIdentitySource source
) {
    public VehicleIdentity {
        vin = normalize(vin);
        source = source == null ? VehicleIdentitySource.UNKNOWN : source;
    }

    private static String normalize(String value) {
        return value == null ? "" : value.trim();
    }
}
