private static SDDocumentType createSDDocumentType(StructDataType structType) {
        SDDocumentType docType = new SDDocumentType(structType.getName());
        for (Field field : structType.getFields()) {
            docType.addField(new SDField(docType, field.getName(), field.getDataType()));
        }
        docType.setStruct(structType);
        return docType;
    }
Returns the number of fields in this only, not including inherited fields
config-model/src/main/java/com/yahoo/schema/document/SDDocumentType.java