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

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


class PresignedUrl(UniversalBaseModel):
    """
    Schema for a presigned URL.
    """

    url: str = pydantic.Field()
    """
    A presigned URL for IO operations against a private file
    """

    expires_at: dt.datetime = pydantic.Field()
    """
    The time at which the presigned URL expires
    """

    form_fields: typing.Optional[typing.Dict[str, typing.Optional[str]]] = pydantic.Field(default=None)
    """
    Form fields for a presigned POST request
    """

    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
