{%- if enum.values|count != 1 -%}{#- Enum has multiple values -#}
from enum import IntEnum

class {{ enum.class_info.name }}(IntEnum):
    {% for key, value in enum.values.items() %}
    {{ key }} = {{ value }}
    {% endfor %}

    def __str__(self) -> str:
        return str(self.value)
{%- else -%}{# Singleton enum, which we've inlined as a `Literal` elsewhere. #}
# DELETE ME!!
{%- endif -%}
