public SDDocumentType setStruct(DataType structType) {
        if (structType != null) {
            this.structType = structType;
            inheritedTypes.remove(VESPA_DOCUMENT.getDocumentName());
        } else {
            if (docType.contentStruct() != null) {
                this.structType = docType.contentStruct();
                inheritedTypes.clear();
            } else {
                throw new IllegalArgumentException("You can not set a null struct");
            }
        }
        return this;
    }
Creates a new document type.
The document type id will be generated as a hash from the document type name.

@param name the name of the new document type
@param schema check for type ID collisions in this search definition
config-model/src/main/java/com/yahoo/schema/document/SDDocumentType.java