{% for file in yaml_templates %}
  {% for licensor in file.licensors %}
    {% for type in licensor.types %}
      {% for version in type.versions %}
      - unit_of_work: "{{ file.dsp }}-{yyyymmdd}-{{ licensor.licensor }}-{{ type.type }}-{{ version.version }}"
        uow_active_hours_threshold: {{ file.uow_active_hours_threshold }}
        schedule: "{{ type.schedule or file.schedule }}"
        {% if type.time_zone %}
        time_zone: "{{ type.time_zone }}"
        {% endif %}
        {% if type.frequency %}
        frequency: "{{ type.frequency }}"
        {% endif %}
        {% if type.uow_active_days_limit %}
        uow_active_days_limit: {{ type.uow_active_days_limit }}
        {% endif %}
        {% if type.validation_thresholds %}
        validation_thresholds: {{ type.validation_thresholds }}
        {% endif %}
        {% if 'days_offset' in type %}
        days_offset: {{ type.days_offset }}
        {% endif %}
        {% if type.uow_complete_after_hours %}
        uow_complete_after_hours: {{ type.uow_complete_after_hours }}
        {% endif %}
        {% if type.timeframe_hours %}
        timeframe_hours: {{ type.timeframe_hours }}
        {% endif %}
        {% if type.hours_offset %}
        hours_offset: {{ type.hours_offset }}
        {% endif %}
        args:
          dsp: {{ file.dsp }}
          extension: {% if type.extension %}{{ type.extension }}{% else %}{{ file.extension }}{% endif %}
          type: {{ type.type }}
          {% if type.subtype %}
          subtype: "{{ type.subtype }}"
          {% endif %}
          version: {{ version.version }}
          licensor: {{ licensor.licensor }}
          valid_from: "{{ version.valid_from }}"
          {% if version.valid_until %}
          valid_until: "{{ version.valid_until }}"
          {% endif %}
      {% endfor %}
    {% endfor %}
  {% endfor %}
{% endfor %}
