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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class LocalType(str, enum.Enum):
    LITERAL = "literal"
    ENVIRONMENT = "environment"
    VAULT = "vault"

    def visit(
        self,
        literal: typing.Callable[[], T_Result],
        environment: typing.Callable[[], T_Result],
        vault: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is LocalType.LITERAL:
            return literal()
        if self is LocalType.ENVIRONMENT:
            return environment()
        if self is LocalType.VAULT:
            return vault()
