public static Node.State stateFrom(String state) {
        return switch (state) {
            case "active" -> Node.State.active;
            case "dirty" -> Node.State.dirty;
            case "failed" -> Node.State.failed;
            case "inactive" -> Node.State.inactive;
            case "parked" -> Node.State.parked;
            case "provisioned" -> Node.State.provisioned;
            case "ready" -> Node.State.ready;
            case "reserved" -> Node.State.reserved;
            case "deprovisioned" -> Node.State.deprovisioned;
            case "breakfixed" -> Node.State.breakfixed;
            default -> throw new IllegalArgumentException("Unknown node state '" + state + "'");
        };
    }
Serializer for node wire format. Used to serialize node objects sent over the wire (HTTP).

@author mpolden
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/NodeSerializer.java