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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class ParameterLocation(str, enum.Enum):
    HEADER = "header"
    PATH = "path"
    QUERY = "query"
    BODY = "body"

    def visit(
        self,
        header: typing.Callable[[], T_Result],
        path: typing.Callable[[], T_Result],
        query: typing.Callable[[], T_Result],
        body: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is ParameterLocation.HEADER:
            return header()
        if self is ParameterLocation.PATH:
            return path()
        if self is ParameterLocation.QUERY:
            return query()
        if self is ParameterLocation.BODY:
            return body()
