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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class SynchronicityType(str, enum.Enum):
    SYNCHRONOUS = "Synchronous"
    ASYNCHRONOUS = "Asynchronous"

    def visit(
        self, synchronous: typing.Callable[[], T_Result], asynchronous: typing.Callable[[], T_Result]
    ) -> T_Result:
        if self is SynchronicityType.SYNCHRONOUS:
            return synchronous()
        if self is SynchronicityType.ASYNCHRONOUS:
            return asynchronous()
