private void verifyType(Document doc) {
        if (!documentType.equals(doc.getDataType())) {
            throw new IllegalArgumentException("Document " + doc.getId() + " with type " + doc.getDataType() +
                                               " must have same type as update, which is type " + documentType);
        }
    }
Sets the document id of the document to update.
Use only while deserializing - changing the document id after creation has undefined behaviour.
document/src/main/java/com/yahoo/document/DocumentUpdate.java