{% set level = level | default(0) -%}
{% set help | format_docstring(level + 1) %}
    {%- include "docstrings." + docstring_name + ".jinja2" -%}
{% endset -%}
{% set class_name = obj.name | class_name %}

class {{ class_name }}(Enum):
{%- if help %}
{{ help | indent(4, first=True) }}
{%- endif -%}
{%- for attr in obj.attrs %}
    {{ attr.name | constant_name(obj.name) }} = {{ attr | field_default(obj.ns_map) }}
{%- endfor -%}
{% if docstring_name == "accessible" -%}
{{ "\n\n" if level == 0 else "\n" }}
{%- for attr in obj.attrs if attr.help %}
{% set member_name = "{}.{}.__doc__ = ".format(class_name, attr.name | constant_name(obj.name)) -%}
{{ member_name }}{{ attr.help | clean_docstring(false) | format_string(indent=0, key=member_name) }}
{%- endfor -%}
{%- endif -%}
