package com.r35157.jupiterperpsalarm.impl.ref;

import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;

public record AlarmConfiguration(
        List<PriceAlarmDefinition> definitions,
        Map<String, String> variables
) {
    public AlarmConfiguration {
        Objects.requireNonNull(definitions, "definitions");
        Objects.requireNonNull(variables, "variables");

        definitions = List.copyOf(definitions);
        variables = new ConcurrentHashMap<>(variables);
    }
}