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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class MetadataType(str, enum.Enum):
    STRING = "STRING"
    NUMBER = "NUMBER"
    DATE = "DATE"
    BOOLEAN = "BOOLEAN"
    KEY_VALUE = "KEY_VALUE"

    def visit(
        self,
        string: typing.Callable[[], T_Result],
        number: typing.Callable[[], T_Result],
        date: typing.Callable[[], T_Result],
        boolean: typing.Callable[[], T_Result],
        key_value: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is MetadataType.STRING:
            return string()
        if self is MetadataType.NUMBER:
            return number()
        if self is MetadataType.DATE:
            return date()
        if self is MetadataType.BOOLEAN:
            return boolean()
        if self is MetadataType.KEY_VALUE:
            return key_value()
