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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class GenderIdentity(str, enum.Enum):
    """
    ℹ️ This enum is non-exhaustive.
    """

    MALE = "male"
    FEMALE = "female"
    FEMALE_TO_MALE_FTM_TRANSGENDER_MALE_TRANS_MAN = "female_to_male_ftm_transgender_male_trans_man"
    MALE_TO_FEMALE_MTF_TRANSGENDER_FEMALE_TRANS_WOMAN = "male_to_female_mtf_transgender_female_trans_woman"
    GENDERQUEER = "genderqueer"
    OTHER = "other"
    _UNKNOWN = "__GENDERIDENTITY_UNKNOWN__"
    """
    This member is used for forward compatibility. If the value is not recognized by the enum, it will be stored here, and the raw value is accessible through `.value`.
    """

    @classmethod
    def _missing_(cls, value: typing.Any) -> "GenderIdentity":
        unknown = cls._UNKNOWN
        unknown._value_ = value
        return unknown

    def visit(
        self,
        male: typing.Callable[[], T_Result],
        female: typing.Callable[[], T_Result],
        female_to_male_ftm_transgender_male_trans_man: typing.Callable[[], T_Result],
        male_to_female_mtf_transgender_female_trans_woman: typing.Callable[[], T_Result],
        genderqueer: typing.Callable[[], T_Result],
        other: typing.Callable[[], T_Result],
        _unknown_member: typing.Callable[[str], T_Result],
    ) -> T_Result:
        if self is GenderIdentity.MALE:
            return male()
        if self is GenderIdentity.FEMALE:
            return female()
        if self is GenderIdentity.FEMALE_TO_MALE_FTM_TRANSGENDER_MALE_TRANS_MAN:
            return female_to_male_ftm_transgender_male_trans_man()
        if self is GenderIdentity.MALE_TO_FEMALE_MTF_TRANSGENDER_FEMALE_TRANS_WOMAN:
            return male_to_female_mtf_transgender_female_trans_woman()
        if self is GenderIdentity.GENDERQUEER:
            return genderqueer()
        if self is GenderIdentity.OTHER:
            return other()
        return _unknown_member(self._value_)
