{% set help = obj|class_docstring(enum=True)|trim %}

class {{ obj.name|class_name }}(Enum):
{%- if help %}
{{ help|indent(4, first=True) }}
{%- endif -%}
{%- for attr in obj.attrs %}
    {{ attr.name|constant_name }} = {{ attr|attribute_default(obj.ns_map) }}
{%- endfor -%}
