# 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 typing import Self


class Operator(str, Enum):
    """
    Character that characterizes how the filter is applied.  For example, for a facet filter `facet:value`, `:` is the operator. For a numeric filter `count>50`, `>` is the operator.
    """

    """
    allowed enum values
    """
    COLON = ":"
    LESS_THAN = "<"
    LESS_THAN_EQUAL = "<="
    EQUAL = "="
    EXCLAMATION_EQUAL = "!="
    GREATER_THAN = ">"
    GREATER_THAN_EQUAL = ">="

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