# 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 MetricName(str, Enum):
    """
    MetricName
    """

    """
    allowed enum values
    """
    SEARCH_COUNT = "search_count"

    TRACKED_SEARCH_COUNT = "tracked_search_count"

    USER_COUNT = "user_count"

    TRACKED_USER_COUNT = "tracked_user_count"

    NO_RESULT_COUNT = "no_result_count"

    ADD_TO_CART_COUNT = "add_to_cart_count"

    PURCHASE_COUNT = "purchase_count"

    CLICKED_SEARCH_COUNT = "clicked_search_count"

    CONVERTED_SEARCH_COUNT = "converted_search_count"

    CLICK_THROUGH_RATE = "click_through_rate"

    CONVERSION_RATE = "conversion_rate"

    ADD_TO_CART_RATE = "add_to_cart_rate"

    PURCHASE_RATE = "purchase_rate"

    AVERAGE_CLICK_POSITION = "average_click_position"

    REVENUE = "revenue"

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