# 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"

    def visit(self, male: typing.Callable[[], T_Result], female: typing.Callable[[], T_Result]) -> T_Result:
        if self is Gender.MALE:
            return male()
        if self is Gender.FEMALE:
            return female()
