Module adcp.types.domains.core.collection
Classes
class Collection (**data: Any)-
Expand source code
class Collection(AdCPBaseModel): model_config = ConfigDict( extra='allow', ) publisher_domain: Annotated[ str | None, Field( description="Publisher namespace that owns this collection. Required for supply-path verification when the declaration is read from a cross-origin authoritative document; it must match the publisher whose origin delegated retrieval. A pointer alone cannot claim another publisher's collection. May be omitted for a publisher-origin document, where that origin supplies the namespace.", pattern='^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$', ), ] = None collection_id: Annotated[ str, Field( description="Publisher-assigned identifier for this collection. Declared in the publisher's adagents.json collections array. Products reference collections via collection selectors with publisher_domain and collection_ids. Use distribution identifiers for cross-seller matching across publishers." ), ] name: Annotated[str, Field(description='Human-readable collection name')] kind: Annotated[ collection_kind.CollectionKind | None, Field( description="What kind of content program this is. Helps agents interpret installments correctly. A channel collection represents the persistent programmed stream; its installments, when present, are scheduled airings or programming blocks. Defaults to 'series' when absent." ), ] = None description: Annotated[str | None, Field(description='What the collection is about')] = None genre: Annotated[ list[str] | None, Field( description='Genre tags. When genre_taxonomy is present, values are taxonomy IDs (e.g., IAB Content Taxonomy 3.0 codes). Otherwise free-form.' ), ] = None genre_taxonomy: Annotated[ str | None, Field( description="Taxonomy system for genre values (e.g., 'iab_content_3.0'). When present, genre values should be valid taxonomy IDs. Recommended for machine-readable brand safety evaluation." ), ] = None language: Annotated[ str | None, Field(description="Primary language (BCP 47 tag, e.g., 'en', 'es-MX')") ] = None content_rating: Annotated[ content_rating_1.ContentRating | None, Field( description='Baseline content rating for the collection. Individual installments may override this.' ), ] = None cadence: Annotated[ collection_cadence.CollectionCadence | None, Field(description='How frequently the collection releases new installments'), ] = None season: Annotated[ str | None, Field( description="Current or most recent season identifier (e.g., '3', '2026', 'spring_2026'). A lightweight label — not a full season object." ), ] = None status: Annotated[ collection_status.CollectionStatus | None, Field(description='Lifecycle status of the collection'), ] = None production_quality: Annotated[ production_quality_1.ProductionQuality | None, Field( description='Production quality tier. Seller-declared. Maps to OpenRTB content.prodq (professional=1, prosumer=2, ugc=3).' ), ] = None talent: Annotated[ list[talent_1.Talent] | None, Field( description='Hosts, recurring cast, creators associated with the collection. Each talent entry may include a brand_url linking to their brand.json identity.' ), ] = None special: Annotated[ special_1.Special | None, Field( description='When present, this collection is a special — content anchored to a real-world event or occasion. Individual installments may override with their own event context.' ), ] = None limited_series: Annotated[ limited_series_1.LimitedSeries | None, Field( description='When present, this collection is a limited series — a bounded run with a defined arc, installment count, and end date.' ), ] = None distribution: Annotated[ list[collection_distribution.CollectionDistribution] | None, Field( description="Where this collection is distributed. Each entry maps the collection to a publisher platform using host property IDs, identifiers, or both. For channel collections this is the carriage map. It is a publisher assertion for discovery, not sales authorization; buyers validate owner-sold carriage against the host publisher's collection-scoped authorized_agents declaration. Collections SHOULD include at least one platform-independent identifier (imdb_id, gracenote_id, eidr_id) when available." ), ] = None deadline_policy: Annotated[ deadline_policy_1.DeadlinePolicy | None, Field( description="Default deadline rules for installments of this collection. Agents compute absolute deadlines from each installment's scheduled_at and these lead times. Installments with explicit deadlines override this policy. Only meaningful when installments carry scheduled_at; a continuously programmed channel collection without enumerated installments has no deadlines to derive." ), ] = None related_collections: Annotated[ list[RelatedCollection] | None, Field( description="Relationships to other collections (spin-offs, companion collections, etc.). Each entry references another collection by collection_id within the same publisher's adagents.json." ), ] = None ext: ext_1.ExtensionObject | None = NoneBase 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 setadditionalProperties: trueoverride this withextra='allow'in their ownmodel_config.Set
ADCP_STRICT_VALIDATION=1in the environment ("1","true","yes","on"are accepted) to flip the default toextra='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 adcpruns — mutatingos.environ["ADCP_STRICT_VALIDATION"]after the firstadcpimport 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_configon 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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var cadence : CollectionCadence | Nonevar collection_id : strvar content_rating : ContentRating | Nonevar deadline_policy : DeadlinePolicy | Nonevar description : str | Nonevar distribution : list[CollectionDistribution] | Nonevar ext : ExtensionObject | Nonevar genre : list[str] | Nonevar genre_taxonomy : str | Nonevar kind : CollectionKind | Nonevar language : str | Nonevar limited_series : LimitedSeries | Nonevar model_configvar name : strvar production_quality : ProductionQuality | Nonevar publisher_domain : str | Nonevar season : str | Nonevar special : Special | Nonevar status : CollectionStatus | Nonevar talent : list[Talent] | None
Inherited members
class RelatedCollection (**data: Any)-
Expand source code
class RelatedCollection(AdCPBaseModel): model_config = ConfigDict( extra='forbid', ) collection_id: Annotated[ str, Field(description="The related collection's collection_id within this seller's response"), ] relationship: Annotated[ collection_relationship.CollectionRelationship, Field(description='How the collections are related'), ]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 setadditionalProperties: trueoverride this withextra='allow'in their ownmodel_config.Set
ADCP_STRICT_VALIDATION=1in the environment ("1","true","yes","on"are accepted) to flip the default toextra='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 adcpruns — mutatingos.environ["ADCP_STRICT_VALIDATION"]after the firstadcpimport 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_configon 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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var collection_id : strvar model_configvar relationship : CollectionRelationship
Inherited members