@UnstableApi
    public Endpoint replaceAttrs(Attributes newAttributes) {
        requireNonNull(newAttributes, "newAttributes");
        if (attrs().isEmpty() && newAttributes.isEmpty()) {
            return this;
        }

        return new Endpoint(type, host, ipAddr, port, weight, newAttributes);
    }
Returns a new {@link Endpoint} with the specified {@link Attributes}.
Note that the {@link #attrs()} of this {@link Endpoint} is replaced with the specified
{@link Attributes}.
core/src/main/java/com/linecorp/armeria/client/Endpoint.java