# 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 AggregationFunction(str, Enum):
    """
    Supported aggregation functions.  These functions can be applied to fields during aggregation operations.  Values:     COUNT: Count total number of items in each group     COUNT_DISTINCT: Count unique values in a field     SUM: Sum numeric values     AVG: Calculate average of numeric values     MIN: Find minimum value     MAX: Find maximum value     FIRST: Get first value in group     LAST: Get last value in group     PUSH: Collect all values into an array     ADD_TO_SET: Collect unique values into an array  Examples:     - Use COUNT for total items per category     - Use COUNT_DISTINCT for unique users per day     - Use SUM for total revenue     - Use AVG for average video duration
    """

    """
    allowed enum values
    """
    COUNT = 'count'
    COUNT_DISTINCT = 'count_distinct'
    SUM = 'sum'
    AVG = 'avg'
    MIN = 'min'
    MAX = 'max'
    FIRST = 'first'
    LAST = 'last'
    PUSH = 'push'
    ADD_TO_SET = 'add_to_set'

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


