# 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 .share_access import ShareAccess


class Share(UncheckedBaseModel):
    access: ShareAccess
    collection_id: str = pydantic.Field()
    """
    Collection ID
    """

    commenting_enabled: bool
    created_at: dt.datetime = pydantic.Field()
    """
    Creation timestamp
    """

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

    downloading_enabled: bool
    enabled: bool
    expiration: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Expiration timestamp
    """

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

    last_viewed_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Last viewed timestamp
    """

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

    passphrase: typing.Optional[str] = pydantic.Field(default=None)
    """
    Passphrase to access share, if passphrase is required and not given it will be generated
    """

    short_url: typing.Optional[str] = pydantic.Field(default=None)
    """
    Share URL
    """

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

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