{% import 'octor.jsonnet.j2' as ctor %}
/*
 * This file is 100% generated.  Any manual edits will likely be lost.
 *
 * This holds constructor functions for creating objects from the
 * schema: {{ model.ns }}
 * 
 * Prefer these functions over manual object construction to assure
 * greater validity.
 */
{% for ep in model.extrefs %}
local {{ep}} = import "{{ep}}.jsonnet";
{% endfor %}

{% for ep in model.extrefs %}
{{ ep }} +
{% endfor %}
{
    {{ ctor.ctor_namespace_beg(model) }}
    {% for t in model.types %}
    // Construct {{ t.name }} ({{t.schema}})
    // {{ t.doc }}
    {{ ctor["ctor_"+t.schema](model, t)|indent }}

    {% endfor %}
    {{ ctor.ctor_namespace_end(model) }}
}
