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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class LineItemAvailabilities(str, enum.Enum):
    DISABLED = "DISABLED"
    OPTIONAL = "OPTIONAL"
    REQUIRED = "REQUIRED"

    def visit(
        self,
        disabled: typing.Callable[[], T_Result],
        optional: typing.Callable[[], T_Result],
        required: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is LineItemAvailabilities.DISABLED:
            return disabled()
        if self is LineItemAvailabilities.OPTIONAL:
            return optional()
        if self is LineItemAvailabilities.REQUIRED:
            return required()
