public Set<Role> emailRolesFor(When when) {
        ImmutableSet.Builder<Role> roles = ImmutableSet.builder();
        roles.addAll(emailRoles.getOrDefault(when, List.of()));
        for (When include : when.includes)
            roles.addAll(emailRolesFor(include));
        return roles.build();
    }
Returns all roles for which email notification is to be sent for the given condition.
config-model-api/src/main/java/com/yahoo/config/application/api/Notifications.java