# generated by datamodel-codegen:
#   filename:  core/creative_assignment.json
#   timestamp: 2025-11-22T15:23:24+00:00

from __future__ import annotations

from typing import Annotated

from adcp.types.base import AdCPBaseModel
from pydantic import ConfigDict, Field


class CreativeAssignment(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    creative_id: Annotated[str, Field(description='Unique identifier for the creative')]
    placement_ids: Annotated[
        list[str] | None,
        Field(
            description="Optional array of placement IDs where this creative should run. When omitted, the creative runs on all placements in the package. References placement_id values from the product's placements array.",
            min_length=1,
        ),
    ] = None
    weight: Annotated[
        float | None, Field(description='Delivery weight for this creative', ge=0.0, le=100.0)
    ] = None
