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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class ConnectorAuthStatus(str, enum.Enum):
    """
    The OAuth status for the user making the request. One of ["valid", "expired", ""]. Empty string (field is omitted) means the user has not authorized the connector yet.
    """

    VALID = "valid"
    EXPIRED = "expired"

    def visit(self, valid: typing.Callable[[], T_Result], expired: typing.Callable[[], T_Result]) -> T_Result:
        if self is ConnectorAuthStatus.VALID:
            return valid()
        if self is ConnectorAuthStatus.EXPIRED:
            return expired()
