public Node with(Flavor flavor, Agent agent, Instant instant) {
        if (flavor.equals(this.flavor)) return this;
        History updateHistory = history.with(new History.Event(History.Event.Type.resized, agent, instant));
        return new Node(id, extraId, ipConfig, hostname, parentHostname, flavor, status, state, allocation, updateHistory, type,
                        reports, modelName, reservedTo, exclusiveToApplicationId, provisionedForApplicationId, hostTTL, hostEmptyAt,
                        exclusiveToClusterType, switchHostname, trustStoreItems, cloudAccount, wireguardPubKey);
    }
Returns a node with the flavor assigned to the given value
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/Node.java