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

from ..core.pydantic_utilities import UniversalBaseModel
import typing_extensions
import typing
from .client_provided_response_metadata import ClientProvidedResponseMetadata
from ..core.serialization import FieldMetadata
from .screenshot_metadata import ScreenshotMetadata
import pydantic
from .external_session_ai_response_metadata_status import ExternalSessionAiResponseMetadataStatus
from .external_session_ai_response_metadata_usage import ExternalSessionAiResponseMetadataUsage
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class ExternalSessionAiResponseMetadata(UniversalBaseModel):
    client_provided: typing_extensions.Annotated[
        typing.Optional[ClientProvidedResponseMetadata], FieldMetadata(alias="clientProvided")
    ] = None
    request_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="requestId")] = None
    screenshots: typing.Optional[typing.List[ScreenshotMetadata]] = pydantic.Field(default=None)
    """
    Array containing any requested screenshots from the operation.
    """

    status: ExternalSessionAiResponseMetadataStatus = pydantic.Field()
    """
    Outcome of the operation.
    """

    usage: ExternalSessionAiResponseMetadataUsage

    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
