# This file was auto-generated by Fern from our API Definition.

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class ChatGptRole(str, enum.Enum):
    """
    An enumeration.
    """

    SYSTEM = "system"
    USER = "user"
    ASSISTANT = "assistant"

    def visit(
        self,
        system: typing.Callable[[], T_Result],
        user: typing.Callable[[], T_Result],
        assistant: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is ChatGptRole.SYSTEM:
            return system()
        if self is ChatGptRole.USER:
            return user()
        if self is ChatGptRole.ASSISTANT:
            return assistant()
