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

import datetime as dt
import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .listen_v1response_metadata_intents_info import ListenV1ResponseMetadataIntentsInfo
from .listen_v1response_metadata_sentiment_info import ListenV1ResponseMetadataSentimentInfo
from .listen_v1response_metadata_summary_info import ListenV1ResponseMetadataSummaryInfo
from .listen_v1response_metadata_topics_info import ListenV1ResponseMetadataTopicsInfo


class ListenV1ResponseMetadata(UniversalBaseModel):
    transaction_key: typing.Optional[str] = None
    request_id: str
    sha256: str
    created: dt.datetime
    duration: float
    channels: float
    models: typing.List[str]
    model_info: typing.Dict[str, typing.Any]
    summary_info: typing.Optional[ListenV1ResponseMetadataSummaryInfo] = None
    sentiment_info: typing.Optional[ListenV1ResponseMetadataSentimentInfo] = None
    topics_info: typing.Optional[ListenV1ResponseMetadataTopicsInfo] = None
    intents_info: typing.Optional[ListenV1ResponseMetadataIntentsInfo] = 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
