Creates a new DataPart using the Java-friendly Consumer.
Creates a new DataPart using the DSL builder.