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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class Gender(str, enum.Enum):
    MALE = "male"
    FEMALE = "female"
    OTHER = "other"
    NOT_GIVEN = "not_given"
    UNKNOWN = "unknown"

    def visit(
        self,
        male: typing.Callable[[], T_Result],
        female: typing.Callable[[], T_Result],
        other: typing.Callable[[], T_Result],
        not_given: typing.Callable[[], T_Result],
        unknown: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is Gender.MALE:
            return male()
        if self is Gender.FEMALE:
            return female()
        if self is Gender.OTHER:
            return other()
        if self is Gender.NOT_GIVEN:
            return not_given()
        if self is Gender.UNKNOWN:
            return unknown()
