# coding: utf-8

"""
Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
"""

from __future__ import annotations

from enum import Enum
from json import loads
from sys import version_info

if version_info >= (3, 11):
    from typing import Self
else:
    from typing_extensions import Self


class DedupPositioning(str, Enum):
    """
    Deduplication positioning configures how a duplicate result should be resolved between an injected item and main search results. Current configuration supports: - 'highest': always select the item in the highest position, and remove duplicates that appear lower in the results. - 'highestInjected': duplicate result will be moved to its highest possible injected position, but not higher.    If a duplicate appears higher in main search results, it will be removed to stay it's intended group position (which could be lower than main).
    """

    """
    allowed enum values
    """
    HIGHEST = "highest"

    HIGHESTINJECTED = "highestInjected"

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