From https://www.fixtrading.org/online-specification/introduction/#message-and-component-definitions
Messages are comprised of required, optional and conditionally required (fields which are required based on the presence or value of other fields) fields. Systems should be designed to operate when only the required and conditionally required fields are present.
So they should just be treated as optional for the code gen part