from enum import Enum


class {{ type.name | to_upper_camel_case }}(str, Enum):
    {%- if type.description is defined %}
    {{ type.description | to_doc_comment(style="python") | indent(4) }}
    {%- endif %}

    {% for value in type.values -%}
    {{ value | to_upper_snake_case }} = "{{ value }}"
    {% endfor -%}

    def __str__(self) -> str:
        return str(self.value)
