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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class MaritalStatus(str, enum.Enum):
    ANNULLED = "ANNULLED"
    DIVORCED = "DIVORCED"
    INTERLOCUTORY = "INTERLOCUTORY"
    SEPARATED = "SEPARATED"
    MARRIED = "MARRIED"
    COMMON_LAW = "COMMON_LAW"
    POLYGAMOUS = "POLYGAMOUS"
    DOMESTIC_PARTNER = "DOMESTIC_PARTNER"
    UNMARRIED = "UNMARRIED"
    NEVER_MARRIED = "NEVER_MARRIED"
    WIDOWED = "WIDOWED"
    UNKNOWN = "UNKNOWN"

    def visit(
        self,
        annulled: typing.Callable[[], T_Result],
        divorced: typing.Callable[[], T_Result],
        interlocutory: typing.Callable[[], T_Result],
        separated: typing.Callable[[], T_Result],
        married: typing.Callable[[], T_Result],
        common_law: typing.Callable[[], T_Result],
        polygamous: typing.Callable[[], T_Result],
        domestic_partner: typing.Callable[[], T_Result],
        unmarried: typing.Callable[[], T_Result],
        never_married: typing.Callable[[], T_Result],
        widowed: typing.Callable[[], T_Result],
        unknown: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is MaritalStatus.ANNULLED:
            return annulled()
        if self is MaritalStatus.DIVORCED:
            return divorced()
        if self is MaritalStatus.INTERLOCUTORY:
            return interlocutory()
        if self is MaritalStatus.SEPARATED:
            return separated()
        if self is MaritalStatus.MARRIED:
            return married()
        if self is MaritalStatus.COMMON_LAW:
            return common_law()
        if self is MaritalStatus.POLYGAMOUS:
            return polygamous()
        if self is MaritalStatus.DOMESTIC_PARTNER:
            return domestic_partner()
        if self is MaritalStatus.UNMARRIED:
            return unmarried()
        if self is MaritalStatus.NEVER_MARRIED:
            return never_married()
        if self is MaritalStatus.WIDOWED:
            return widowed()
        if self is MaritalStatus.UNKNOWN:
            return unknown()
