public Endpoint withTargets(List<Target> targets) {
        return new Endpoint(endpointId, containerId, level, targets);
    }
Returns a copy of this with targets set to given targets
config-model-api/src/main/java/com/yahoo/config/application/api/Endpoint.java