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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class ProblemRelation(str, enum.Enum):
    AFFECTED = "affected"
    CAUSE = "cause"

    def visit(self, affected: typing.Callable[[], T_Result], cause: typing.Callable[[], T_Result]) -> T_Result:
        if self is ProblemRelation.AFFECTED:
            return affected()
        if self is ProblemRelation.CAUSE:
            return cause()
