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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class ResponsiblePartyType(str, enum.Enum):
    INSURANCE_PAY = "INSURANCE_PAY"
    SELF_PAY = "SELF_PAY"
    UNKNOWN = "UNKNOWN"

    def visit(
        self,
        insurance_pay: typing.Callable[[], T_Result],
        self_pay: typing.Callable[[], T_Result],
        unknown: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is ResponsiblePartyType.INSURANCE_PAY:
            return insurance_pay()
        if self is ResponsiblePartyType.SELF_PAY:
            return self_pay()
        if self is ResponsiblePartyType.UNKNOWN:
            return unknown()
