from typing import List, Optional
from pydantic import BaseModel, Field


class StorageObjectResponse(BaseModel):
    """Storage object information."""

    key: str = Field(..., description="Object key/path")
    size: int = Field(..., description="Size in bytes")
    last_modified: Optional[str] = Field(None, description="Last modification timestamp")
    content_type: Optional[str] = Field(None, description="MIME type")


class StorageListResponse(BaseModel):
    """List of storage objects."""

    objects: List[StorageObjectResponse] = Field(..., description="Storage objects")
    count: int = Field(..., description="Number of objects")
    prefix: str = Field(..., description="Prefix filter used")


class StorageUrlResponse(BaseModel):
    """Presigned URL response."""

    key: str = Field(..., description="Object key")
    url: str = Field(..., description="Presigned URL for accessing the object")
    expires_in: int = Field(..., description="URL expiration time in seconds")
