from ._core import (
    DomainModel,
    DomainModelCore,
    DomainModelApply,
    DomainModelList,
    DomainRelationApply,
    ResourcesApply,
    ResourcesApplyResult,
)
{% for class_ in classes %}{{ class_.init_import }}
{% endfor %}
{% if is_pydantic_v2 %}{% for (read_name, write_name) in dependencies_by_names %}{{ read_name }}.model_rebuild()
{{ write_name }}.model_rebuild()
{% endfor %}{% else %}{% for (read_name, write_name), dependencies in dependencies_by_names.items() %}
{{ read_name }}.update_forward_refs({% for dependency in dependencies %}
    {{ dependency.read_name }}={{ dependency.read_name }},{%  endfor %}
)
{{ write_name }}.update_forward_refs({% for dependency in dependencies %}{% if dependency.is_writable or dependency.is_interface %}
    {{ dependency.write_name }}={{ dependency.write_name }},{% endif %}{%  endfor %}
)
{% endfor %}{% endif %}
__all__ = [
    "ResourcesApply",
    "DomainModel",
    "DomainModelCore",
    "DomainModelApply",
    "DomainModelList",
    "DomainRelationApply",
    "ResourcesApplyResult",{% for class_ in classes %}
    "{{ class_.read_name }}",{% if class_.is_writable or class_.is_interface %}
    "{{ class_.write_name }}",{% endif %}
    "{{ class_.read_list_name }}",{% if class_.is_writable or class_.is_interface %}
    "{{ class_.write_list_name }}",{% endif %}{% if class_.has_field_of_type(ft.PrimitiveFieldCore) %}
    "{{ class_.field_names }}",{% endif %}{% if class_.has_primitive_field_of_type(dm.Text) %}
    "{{ class_.text_field_names }}", {% endif %}{% endfor %}
]
