# coding: utf-8

"""
    Mixpeek API

    This is the Mixpeek API, providing access to various endpoints for data processing and retrieval.

    The version of the OpenAPI document: 1.3.0
    Contact: info@mixpeek.com
    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 StageCategory(str, Enum):
    """
    Retriever stage categories organized by transformation pattern.  Values:     FILTER: Subset of input documents (N → ≤N, same schema)         - Removes documents that don't match criteria         - Examples: attribute_filter, feature_filter, llm_filter         - Use for: Removing irrelevant results, applying business rules         - Performance: Fast (attribute) to slow (LLM)      SORT: Reorders documents (N → N, same schema, different order)         - Changes document ordering based on criteria         - Examples: sort_relevance, sort_attribute         - Use for: Ordering by relevance, recency, custom fields         - Performance: Fast (in-memory sort)      REDUCE: Aggregates to summary (N → 1, new schema)         - Combines multiple documents into one summary         - Examples: aggregate_stats, group_by         - Use for: Summaries, statistics, reports         - Performance: Varies by aggregation logic      APPLY: Enrichment or expansion (N → N or N*M)         - 1-1: Enriches each doc (N → N, expanded schema)         - 1-N: Expands each doc (N → N*M, new/same schema)         - Examples: document_enrich, taxonomy_enrich, llm_enrich         - Use for: Adding related data, tagging, recursive lookups         - Performance: Moderate (DB) to slow (LLM)      ENRICH: Document enrichment (N → N, potentially expanded schema)         - Adds computed fields to each document         - Examples: code_execution, llm_enrich, taxonomy_enrich         - Use for: Custom transformations, data extraction, LLM processing         - Performance: Varies (fast for code, slow for LLM)  Pipeline Patterns:     - Basic: FILTER → SORT     - Enriched: FILTER → SORT → APPLY     - Tag expansion: FILTER → APPLY (1-N)     - Summary: FILTER → SORT → REDUCE
    """

    """
    allowed enum values
    """
    FILTER = 'filter'
    SORT = 'sort'
    REDUCE = 'reduce'
    APPLY = 'apply'
    ENRICH = 'enrich'

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


