private static void exportAssign(StructDataType structType, String structClassName, Writer out, int ind) throws IOException {
        out.write(ind(ind)+"@Override public void assign(Object o) {\n"+
          ind(ind+1)+"if (!(o instanceof "+structClassName+")) { super.assign(o); return; }\n"+
          ind(ind+1)+structClassName+" other = ("+structClassName+")o;\n");
        for (Field f: structType.getFields()) {
            out.write(ind(ind+1)+setter(f.getName())+"(other."+getter(f.getName())+"());\n");
        }

        out.write(ind(ind)+"}\n\n");
    }
Override the getFields() method of Struct, since serialization of Struct relies on it.
vespa-documentgen-plugin/src/main/java/com/yahoo/vespa/DocumentGenMojo.java