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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class Ethnicity(str, enum.Enum):
    HISPANIC_OR_LATINO = "HISPANIC_OR_LATINO"
    NOT_HISPANIC_OR_LATINO = "NOT_HISPANIC_OR_LATINO"
    UNKNOWN = "UNKNOWN"
    REFUSED = "REFUSED"

    def visit(
        self,
        hispanic_or_latino: typing.Callable[[], T_Result],
        not_hispanic_or_latino: typing.Callable[[], T_Result],
        unknown: typing.Callable[[], T_Result],
        refused: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is Ethnicity.HISPANIC_OR_LATINO:
            return hispanic_or_latino()
        if self is Ethnicity.NOT_HISPANIC_OR_LATINO:
            return not_hispanic_or_latino()
        if self is Ethnicity.UNKNOWN:
            return unknown()
        if self is Ethnicity.REFUSED:
            return refused()
