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

from ..core.pydantic_utilities import UniversalBaseModel
import typing
import pydantic
from .metadata_browser import MetadataBrowser
from .metadata_device import MetadataDevice
from .metadata_os import MetadataOs
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class Metadata(UniversalBaseModel):
    user_agent: typing.Optional[str] = pydantic.Field(default=None)
    """
    user agent
    """

    timezone: typing.Optional[str] = pydantic.Field(default=None)
    """
    timezone
    """

    browser: typing.Optional[MetadataBrowser] = pydantic.Field(default=None)
    """
    browser id
    """

    device: typing.Optional[MetadataDevice] = pydantic.Field(default=None)
    """
    device id
    """

    os: typing.Optional[MetadataOs] = pydantic.Field(default=None)
    """
    os id
    """

    locale: typing.Optional[str] = pydantic.Field(default=None)
    """
    locale
    """

    location: typing.Optional[str] = pydantic.Field(default=None)
    """
    location
    """

    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
