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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class ContractingOutOfOfNetworkReason(str, enum.Enum):
    NO_EFFECTIVE_CONTRACT = "no_effective_contract"
    MISSING_CONTRACT_LINKAGE = "missing_contract_linkage"

    def visit(
        self,
        no_effective_contract: typing.Callable[[], T_Result],
        missing_contract_linkage: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is ContractingOutOfOfNetworkReason.NO_EFFECTIVE_CONTRACT:
            return no_effective_contract()
        if self is ContractingOutOfOfNetworkReason.MISSING_CONTRACT_LINKAGE:
            return missing_contract_linkage()
