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

import datetime as dt
import typing

import pydantic
from ..core.unchecked_base_model import UncheckedBaseModel
from .asset_common_type import AssetCommonType
from .file_status import FileStatus


class File(UncheckedBaseModel):
    id: typing.Optional[str] = pydantic.Field(default=None)
    """
    File ID
    """

    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    File Name
    """

    file_size: int = pydantic.Field()
    """
    File size in bytes
    """

    media_type: str = pydantic.Field()
    """
    File media type
    """

    status: FileStatus
    created_at: dt.datetime = pydantic.Field()
    """
    Creation timestamp
    """

    parent_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Parent Folder or Version Stack ID
    """

    project_id: str = pydantic.Field()
    """
    Project ID
    """

    type: AssetCommonType
    updated_at: dt.datetime = pydantic.Field()
    """
    Update timestamp
    """

    view_url: str = pydantic.Field()
    """
    URL to view the asset in the Frame.io web application
    """

    model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)
