from typing import *
from pydantic import BaseModel, Field
{% for property in properties %}
{% if property.type.import_types is not none %}
{% for import_type in property.type.import_types %}
{{ import_type }}
{% endfor %}
{% endif %}
{% endfor %}

class {{ schema_name }}(BaseModel):
    """
    {% if schema.title %}{{ schema.title }}{% else %}{{ schema_name }}{% endif %} model
    {% if schema.description %}
    {{ schema.description }}
    {% endif %}
    {% if parent_comment %}
    {{ parent_comment }}
    {% endif %}
    """
    model_config = {
        "populate_by_name": True,
        "validate_assignment": True
    }
    {% for property in properties %}

    {{ property.name | normalize_symbol }} : {{ property.type.converted_type | safe }} = Field(validation_alias="{{ property.name }}"{% if property.default is not none %}, default = {{ property.default }}{% endif %})
    {% endfor %}
