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

import datetime as dt
import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel


class PresignedUrlResponse(UniversalBaseModel):
    """
    Response model for presigned URL operations.
    """

    content_type: typing.Optional[str] = pydantic.Field(default=None)
    """
    Content-Type header to use (required for PUT uploads).
    """

    expires_at: dt.datetime = pydantic.Field()
    """
    When the presigned URL expires.
    """

    instructions: str = pydantic.Field()
    """
    Instructions for using the presigned URL.
    """

    method: str = pydantic.Field()
    """
    HTTP method to use: 'PUT' for upload, 'GET' for download.
    """

    url: str = pydantic.Field()
    """
    The presigned URL for direct GCS upload/download.
    """

    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
