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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class ConnectionType(str, enum.Enum):
    SSE = "SSE"
    STREAMABLE_HTTP = "StreamableHttp"

    def visit(self, sse: typing.Callable[[], T_Result], streamable_http: typing.Callable[[], T_Result]) -> T_Result:
        if self is ConnectionType.SSE:
            return sse()
        if self is ConnectionType.STREAMABLE_HTTP:
            return streamable_http()
