@Override
    public int hashCode() {
        return Objects.hash(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