# This file was auto-generated by Fern from our API Definition.

from ...core.pydantic_utilities import UniversalBaseModel
import typing_extensions
from ...conversation.types.feedback_field import FeedbackField
from ...core.serialization import FieldMetadata
import pydantic
from ...core.pydantic_utilities import IS_PYDANTIC_V2
import typing


class FeedbackDistinctCount(UniversalBaseModel):
    """
    Calculates the number of unique values in the specified field.
    Supports fields with list values as well.
    """

    target_field: typing_extensions.Annotated[FeedbackField, FieldMetadata(alias="targetField")] = pydantic.Field()
    """
    All the distinct values of this field will be counted.
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
