class EnvoySentinelRuleConverter {

    public static List<FlowRule> toSentinelFlowRules(EnvoyRlsRule rule) {
        if (!EnvoyRlsRuleManager.isValidRule(rule)) {
            throw new IllegalArgumentException("Not a valid RLS rule");
        }
        return rule.getDescriptors().stream()
            .map(e -> toSentinelFlowRule(rule.getDomain(), e))
            .collect(Collectors.toList());
    }

    private  EnvoySentinelRuleConverter();

}