# 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 InteractionType(str, Enum):
    """
    Types of user interactions with search results.  These interaction types are used to track user behavior and improve retrieval quality through Learning to Rank (LTR), collaborative filtering, and embedding fine-tuning.  Values:     VIEW: User viewed a search result     CLICK: User clicked on a search result     POSITIVE_FEEDBACK: User explicitly marked result as relevant/helpful     NEGATIVE_FEEDBACK: User explicitly marked result as not relevant     PURCHASE: User purchased the item (high-value conversion signal)     ADD_TO_CART: User added item to cart (mid-funnel signal)     WISHLIST: User saved item for later (engagement signal)     LONG_VIEW: User spent significant time viewing (dwell time)     SHARE: User shared the result (strong engagement signal)     BOOKMARK: User bookmarked the result     QUERY_REFINEMENT: User modified their search query     ZERO_RESULTS: Query yielded no results (helps identify gaps)     FILTER_TOGGLE: User modified filters (helps understand intent)     SKIP: User skipped over result to click something lower (negative signal)     RETURN_TO_RESULTS: User quickly returned to results (negative signal)  Usage in Retrieval Optimization:     - LTR (Learning to Rank): Train models to predict click-through rates     - Collaborative Filtering: Find similar users/items based on interactions     - Embedding Fine-tuning: Adjust embeddings based on what users actually click     - Query Understanding: Analyze refinements and zero-result queries     - Result Quality: Identify poorly-performing results via skip/return patterns
    """

    """
    allowed enum values
    """
    VIEW = 'view'
    CLICK = 'click'
    POSITIVE_FEEDBACK = 'positive_feedback'
    NEGATIVE_FEEDBACK = 'negative_feedback'
    PURCHASE = 'purchase'
    ADD_TO_CART = 'add_to_cart'
    WISHLIST = 'wishlist'
    LONG_VIEW = 'long_view'
    SHARE = 'share'
    BOOKMARK = 'bookmark'
    QUERY_REFINEMENT = 'query_refinement'
    ZERO_RESULTS = 'zero_results'
    FILTER_TOGGLE = 'filter_toggle'
    SKIP = 'skip'
    RETURN_TO_RESULTS = 'return_to_results'

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


