How to add an InputData element to DMN definitions using the programmatic approach

I would like to create the following DMN XML programmatically using the Camunda DMN model lib:

<definitions ...>
  <inputData id="_id" name="name"> </inputData>

I use the following

   Definitions definitions = ...
   InputData inputData = ...
   definitions.addChildElement(inputData);

and get the following exception

org.camunda.bpm.model.xml.ModelException: New child is not a valid child element type ...

Please help!