Module adcp.types.generated_poc.creative_assignment

Classes

class CreativeAssignment (**data: Any)
Expand source code
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

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var creative_id : str
var model_config
var placement_ids : list[str] | None
var weight : float | None

Inherited members