# coding: utf-8

"""
    Docling Serve

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

    The version of the OpenAPI document: 
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self


class PdfBackend(str, Enum):
    """
    Available PDF parsing backends for document processing.  Different backends offer varying levels of text extraction quality, layout preservation, and processing speed. Choose based on your document complexity and quality requirements.  Attributes:     PYPDFIUM2: Standard PDF parser using PyPDFium2 library. Fast and         reliable for basic text extraction.     DOCLING_PARSE: Docling Parse backend providing enhanced layout         analysis, structure preservation, and advanced table detection.         This is the recommended backend for most use cases.     DLPARSE_V1: Deprecated. Maps to `DOCLING_PARSE`.     DLPARSE_V2: Deprecated. Maps to `DOCLING_PARSE`.     DLPARSE_V4: Deprecated. Maps to `DOCLING_PARSE`.
    """

    """
    allowed enum values
    """
    PYPDFIUM2 = 'pypdfium2'
    DOCLING_PARSE = 'docling_parse'
    DLPARSE_V1 = 'dlparse_v1'
    DLPARSE_V2 = 'dlparse_v2'
    DLPARSE_V4 = 'dlparse_v4'

    @classmethod
    def from_json(cls, json_str: str) -> Self:
        """Create an instance of PdfBackend from a JSON string"""
        return cls(json.loads(json_str))


