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

from ...core.pydantic_utilities import UniversalBaseModel
import typing
import typing_extensions
import datetime as dt
from ...core.serialization import FieldMetadata
from ...commons.types.entity_id_filter import EntityIdFilter
from ...commons.types.feedback_type import FeedbackType
from .quality import Quality
from .quality_reason import QualityReason
from ...commons.types.response_length import ResponseLength
from ...commons.types.sentiment import Sentiment
from ...core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic


class ConversationFilter(UniversalBaseModel):
    search: typing.Optional[str] = None
    created_after: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="createdAfter")] = None
    created_before: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="createdBefore")] = (
        None
    )
    apps: typing.Optional[typing.List[str]] = None
    categories: typing.Optional[typing.List[str]] = None
    actions: typing.Optional[typing.List[EntityIdFilter]] = None
    incomplete_actions: typing_extensions.Annotated[
        typing.Optional[typing.List[EntityIdFilter]], FieldMetadata(alias="incompleteActions")
    ] = None
    feedback: typing.Optional[typing.List[FeedbackType]] = None
    human_agents: typing_extensions.Annotated[typing.Optional[typing.List[str]], FieldMetadata(alias="humanAgents")] = (
        None
    )
    languages: typing.Optional[typing.List[str]] = None
    quality: typing.Optional[typing.List[Quality]] = None
    quality_reason: typing_extensions.Annotated[
        typing.Optional[typing.List[QualityReason]], FieldMetadata(alias="qualityReason")
    ] = None
    response_length: typing_extensions.Annotated[
        typing.Optional[typing.List[ResponseLength]], FieldMetadata(alias="responseLength")
    ] = None
    sentiment: typing.Optional[typing.List[Sentiment]] = None
    tags: typing.Optional[typing.List[str]] = None

    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
