Module adcp.types.domains.core.installment

Classes

class DerivativeOf (**data: Any)
Expand source code
class DerivativeOf(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    installment_id: Annotated[
        str, Field(description='The source installment this content is derived from')
    ]
    type: Annotated[
        derivative_type.DerivativeType, Field(description='What kind of derivative content this is')
    ]

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

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 installment_id : str
var model_config
var type : DerivativeType

Inherited members

class Installment (**data: Any)
Expand source code
class Installment(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    installment_id: Annotated[
        str, Field(description='Unique identifier for this installment within the collection')
    ]
    collection_ref: Annotated[
        collection_ref_1.CollectionReference | None,
        Field(
            description='Canonical parent collection identity. Products spanning multiple collections or publisher namespaces MUST use this field.'
        ),
    ] = None
    collection_id: Annotated[
        str | None,
        Field(
            deprecated=True,
            description='Deprecated publisher-domain-free parent collection shorthand. Use collection_ref. It is unambiguous only when the enclosing product addresses one publisher namespace.',
        ),
    ] = None
    name: Annotated[str | None, Field(description='Installment title')] = None
    season: Annotated[
        str | None, Field(description="Season identifier (e.g., '1', '2024', 'spring_2026')")
    ] = None
    installment_number: Annotated[
        str | None, Field(description="Installment number within the season (e.g., '3', '47')")
    ] = None
    scheduled_at: Annotated[
        AwareDatetime | None, Field(description='When the installment airs or publishes (ISO 8601)')
    ] = None
    status: Annotated[
        installment_status.InstallmentStatus | None,
        Field(description='Lifecycle status of the installment'),
    ] = None
    duration_seconds: Annotated[
        SchemaInt | None, Field(description='Expected duration of the installment in seconds', ge=0)
    ] = None
    flexible_end: Annotated[
        StrictBool | None,
        Field(description='Whether the end time is approximate (live events, sports)'),
    ] = None
    valid_until: Annotated[
        AwareDatetime | None,
        Field(
            description='When this installment data expires and should be re-queried. Agents should re-query before committing budget to products with tentative installments.'
        ),
    ] = None
    content_rating: Annotated[
        content_rating_1.ContentRating | None,
        Field(
            description="Installment-specific content rating. Overrides the collection's baseline content_rating when present."
        ),
    ] = None
    topics: Annotated[
        list[str] | None,
        Field(
            description="Content topics for this installment. Uses the same taxonomy as the collection's genre_taxonomy when present. Enables installment-level brand safety evaluation beyond content_rating."
        ),
    ] = None
    special: Annotated[
        special_1.Special | None,
        Field(
            description='Installment-specific event context. When present, this installment is anchored to a real-world event. Overrides the collection-level special when present.'
        ),
    ] = None
    guest_talent: Annotated[
        list[talent.Talent] | None,
        Field(
            description="Installment-specific guests and talent. Additive to the collection's recurring talent."
        ),
    ] = None
    ad_inventory: Annotated[
        ad_inventory_config.AdInventoryConfiguration | None,
        Field(
            description='Break-based ad inventory for this installment. For non-break formats (host reads, integrations), use product placements.'
        ),
    ] = None
    deadlines: Annotated[
        installment_deadlines.InstallmentDeadlines | None,
        Field(
            description='Booking, cancellation, and material submission deadlines for this installment. Present when the installment has time-sensitive inventory that requires advance commitment or material delivery.'
        ),
    ] = None
    derivative_of: Annotated[
        DerivativeOf | None,
        Field(
            description='When this installment is a clip, highlight, or recap derived from a full installment. The source installment_id must reference an installment within the same response.'
        ),
    ] = None
    ext: ext_1.ExtensionObject | None = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

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 ad_inventory : AdInventoryConfiguration | None
var collection_id : str | None
var collection_ref : CollectionReference | None
var content_rating : ContentRating | None
var deadlines : InstallmentDeadlines | None
var derivative_of : DerivativeOf | None
var duration_seconds : int | None
var ext : ExtensionObject | None
var flexible_end : bool | None
var guest_talent : list[Talent] | None
var installment_id : str
var installment_number : str | None
var model_config
var name : str | None
var scheduled_at : pydantic.types.AwareDatetime | None
var season : str | None
var special : Special | None
var status : InstallmentStatus | None
var topics : list[str] | None
var valid_until : pydantic.types.AwareDatetime | None

Inherited members