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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class ExtractTarget(str, enum.Enum):
    PER_DOC = "PER_DOC"
    PER_PAGE = "PER_PAGE"

    def visit(self, per_doc: typing.Callable[[], T_Result], per_page: typing.Callable[[], T_Result]) -> T_Result:
        if self is ExtractTarget.PER_DOC:
            return per_doc()
        if self is ExtractTarget.PER_PAGE:
            return per_page()
