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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class BenefitType(str, enum.Enum):
    DEDUCTIBLE = "DEDUCTIBLE"
    DEDUCTIBLE_REMAINING = "DEDUCTIBLE_REMAINING"
    OOP_MAX = "OOP_MAX"
    OOP_MAX_REMAINING = "OOP_MAX_REMAINING"
    COPAY = "COPAY"
    COINSURANCE = "COINSURANCE"

    def visit(
        self,
        deductible: typing.Callable[[], T_Result],
        deductible_remaining: typing.Callable[[], T_Result],
        oop_max: typing.Callable[[], T_Result],
        oop_max_remaining: typing.Callable[[], T_Result],
        copay: typing.Callable[[], T_Result],
        coinsurance: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is BenefitType.DEDUCTIBLE:
            return deductible()
        if self is BenefitType.DEDUCTIBLE_REMAINING:
            return deductible_remaining()
        if self is BenefitType.OOP_MAX:
            return oop_max()
        if self is BenefitType.OOP_MAX_REMAINING:
            return oop_max_remaining()
        if self is BenefitType.COPAY:
            return copay()
        if self is BenefitType.COINSURANCE:
            return coinsurance()
