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

import datetime as dt
import typing

import pydantic
from ..core.pydantic_utilities import UniversalBaseModel
from .collection_aggregation_mode import CollectionAggregationMode
from .project import Project
from .share import Share
from .user import User


class Collection(UniversalBaseModel):
    aggregation_mode: CollectionAggregationMode
    auto_generated: bool
    created_at: dt.datetime = pydantic.Field()
    """
    Creation timestamp
    """

    creator: typing.Optional[User] = None
    description: typing.Optional[str] = pydantic.Field(default=None)
    """
    Collection description
    """

    id: str = pydantic.Field()
    """
    Collection ID
    """

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

    private: bool
    project: typing.Optional[Project] = None
    project_id: str = pydantic.Field()
    """
    Project ID
    """

    root_folder_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Root folder ID
    """

    shares: typing.Optional[typing.List[Share]] = pydantic.Field(default=None)
    """
    Shares
    """

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

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