# 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 ResultHandling(str, Enum):
    """
    How to handle multiple result rows from SQL query.  Values:     FIRST: Return only the first row (most common for lookups)         - Use when expecting single result (lookup by primary key)         - Result stored as object      ALL: Return all rows as array         - Use when query may return multiple matches         - Result stored as array of objects      ERROR_IF_EMPTY: Raise error if no rows returned         - Use when result is mandatory         - Fails enrichment if query returns nothing      ERROR_IF_MULTIPLE: Raise error if more than one row returned         - Use for strict single-result lookups         - Validates uniqueness constraint at runtime
    """

    """
    allowed enum values
    """
    FIRST = 'first'
    ALL = 'all'
    ERROR_IF_EMPTY = 'error_if_empty'
    ERROR_IF_MULTIPLE = 'error_if_multiple'

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


