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

from ..core.pydantic_utilities import UniversalBaseModel
import pydantic
import typing
import datetime as dt
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class BrowserSessionResponse(UniversalBaseModel):
    """
    Response model for browser session information.
    """

    browser_session_id: str = pydantic.Field()
    """
    Unique identifier for the browser session
    """

    organization_id: str = pydantic.Field()
    """
    ID of the organization that owns this session
    """

    runnable_type: typing.Optional[str] = pydantic.Field(default=None)
    """
    Type of runnable associated with this session (workflow, task etc)
    """

    runnable_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    ID of the associated runnable
    """

    created_at: dt.datetime = pydantic.Field()
    """
    Timestamp when the session was created
    """

    modified_at: dt.datetime = pydantic.Field()
    """
    Timestamp when the session was last modified
    """

    deleted_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Timestamp when the session was deleted, if applicable
    """

    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
