package com.lingniu.ingest.identity;

import com.lingniu.ingest.api.ProtocolId;

public record VehicleIdentityLookup(
        ProtocolId protocol,
        String vin,
        String phone,
        String deviceId,
        String plate
) {
    public VehicleIdentityLookup {
        vin = normalize(vin);
        phone = normalize(phone);
        deviceId = normalize(deviceId);
        plate = normalize(plate);
    }

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