class TriggerInternalIdCalculator {

    @SuppressWarnings("UnstableApiUsage")
    public static String getId(String name, List<String> activeProfiles, Map<String, Object> arguments, Map<String, Object> conditions, Map<String, Object> cfg) {
        HashFunction hf = Hashing.sha256();
        return hf.newHasher()
                .putString(name, StandardCharsets.UTF_8)
                .putObject(ensureList(activeProfiles), (from, into) -> from.stream().sorted().forEach(p -> into.putString(p, StandardCharsets.UTF_8)))
                .putBytes(serialize(toSortedMap(arguments)))
                .putBytes(serialize(toSortedMap(conditions)))
                .putBytes(serialize(toSortedMap(cfg)))
                .hash()
                .toString();
    }

    private  TriggerInternalIdCalculator();

}