Emit expressions
The emit expression specifies the conditions for the emission of an optional element or a member of a choice. Emit expressions are generated automatically only for output map elements that are containers. This is used to make sure the container element in the output appears corresponding to some container element on the input. These default expressions use the IsPresent function on the input element. So if the input element is present, then the corresponding output element will be emitted, otherwise it will not.
When you map an input to an output, the containing optional/choice members are examined in order starting from the parent of the output map element and the output is matched with the container of the input map element and so on up the line. For each matching containing map element, an IsPresent is generated.
There is a special case for emit generation when the output element is optional, but does not have the null property and the input element has the null property. In this case the emit expression is generated to emit the output element only if the input is not null, rather than if it's present as described above.