from datetime import datetime

from pydantic import BaseModel, ConfigDict, Field

from olmoearth_shared.models.datasets.asset import Asset
from olmoearth_shared.models.datasets.collection import Collection
from olmoearth_shared.models.datasets.data_provider_item_properties import DataProviderItemProperties


class DataProviderItem(BaseModel):
    """An item as provided by a specific data provider."""

    model_config = ConfigDict(extra="forbid")

    id: str = Field(description="ID from this specific data provider")
    discovered_at: datetime = Field(description="When this item was discovered from this data provider")
    collection: Collection = Field(description="Collection identifier for this data provider")
    properties: DataProviderItemProperties = Field(description="Data provider-specific properties")
    assets: list[Asset] = Field(default_factory=list, description="Asset URLs and band metadata from this data provider")
