Module adcp.types.domains.formats.canonical.responsive_creative
Classes
class CanonicalFormatResponsiveCreative (**data: Any)-
Expand source code
class CanonicalFormatResponsiveCreative(CanonicalFormatBase): model_config = ConfigDict( extra='allow', ) experimental: Annotated[ Any | None, Field( description="Marked experimental at 3.1 GA: composition is algorithmic (the surface picks combinations and reports per-asset breakdowns), and there's no clean v1-translatable equivalent. Buyers ship asset pools rather than rendered creatives; the surface's per-impression composition cannot be predicted by `validate_input`. Adopters SHOULD validate behavior per surface (Google PMax vs Meta Advantage+ creative differ meaningfully)." ), ] = True v1_translatable: Annotated[ Any | None, Field( description="Inherently new in v2 — algorithmic asset-pool composition (Google PMax / Meta Advantage+ creative) wasn't expressible as v1 named formats. SDKs MUST NOT emit `FORMAT_PROJECTION_FAILED` for products using this canonical; the v1-unreachability is structural." ), ] = False slots: Any | None = [ { 'asset_group_id': 'headlines', 'asset_type': 'text', 'required': True, 'min': 3, 'max': 15, }, { 'asset_group_id': 'long_headlines', 'asset_type': 'text', 'required': False, 'min': 1, 'max': 5, }, { 'asset_group_id': 'descriptions', 'asset_type': 'text', 'required': True, 'min': 2, 'max': 5, }, { 'asset_group_id': 'images_landscape', 'asset_type': 'image', 'required': False, 'min': 1, 'max': 20, }, { 'asset_group_id': 'images_square', 'asset_type': 'image', 'required': False, 'min': 1, 'max': 20, }, { 'asset_group_id': 'images_vertical', 'asset_type': 'image', 'required': False, 'min': 1, 'max': 20, }, {'asset_group_id': 'video', 'asset_type': 'video', 'required': False, 'min': 0, 'max': 5}, { 'asset_group_id': 'logo', 'asset_type': 'image', 'required': True, 'min': 1, 'max': 5, 'logo_slots': [ 'logo_card_light', 'logo_card_dark', 'marketplace_listing', 'ad_end_card', ], 'required_logo_slots': ['logo_card_light', 'logo_card_dark'], }, { 'asset_group_id': 'landing_page_url', 'asset_type': 'url', 'required': True, 'min': 1, 'max': 1, }, ] headlines_min: Annotated[SchemaInt | None, Field(ge=0)] = None headlines_max: Annotated[SchemaInt | None, Field(ge=0)] = None headline_max_chars: Annotated[SchemaInt | None, Field(ge=1)] = None long_headlines_min: Annotated[SchemaInt | None, Field(ge=0)] = None long_headlines_max: Annotated[SchemaInt | None, Field(ge=0)] = None long_headline_max_chars: Annotated[SchemaInt | None, Field(ge=1)] = None descriptions_min: Annotated[SchemaInt | None, Field(ge=0)] = None descriptions_max: Annotated[SchemaInt | None, Field(ge=0)] = None description_max_chars: Annotated[SchemaInt | None, Field(ge=1)] = None images_landscape_min: Annotated[SchemaInt | None, Field(ge=0)] = None images_landscape_max: Annotated[SchemaInt | None, Field(ge=0)] = None images_landscape_aspect_ratio: str | None = None images_square_min: Annotated[SchemaInt | None, Field(ge=0)] = None images_square_max: Annotated[SchemaInt | None, Field(ge=0)] = None images_vertical_min: Annotated[SchemaInt | None, Field(ge=0)] = None images_vertical_max: Annotated[SchemaInt | None, Field(ge=0)] = None videos_min: Annotated[SchemaInt | None, Field(ge=0)] = None videos_max: Annotated[SchemaInt | None, Field(ge=0)] = None video_min_duration_ms: Annotated[SchemaInt | None, Field(ge=1)] = None video_max_duration_ms: Annotated[SchemaInt | None, Field(ge=1)] = None logo_min: Annotated[SchemaInt | None, Field(ge=0)] = None logo_max: Annotated[SchemaInt | None, Field(ge=0)] = None logo_aspect_ratios: list[str] | None = None business_name_max_chars: Annotated[SchemaInt | None, Field(ge=1)] = None asset_image_max_file_size_kb: Annotated[SchemaInt | None, Field(ge=1)] = None supports_catalog_input: Annotated[ StrictBool | None, Field( description='Whether the product can additionally consume a catalog reference (e.g., PMax with product feed).' ), ] = 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
- adcp.types.domains.formats.canonical._base.CanonicalFormatBase
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var asset_image_max_file_size_kb : int | Nonevar business_name_max_chars : int | Nonevar description_max_chars : int | Nonevar descriptions_max : int | Nonevar descriptions_min : int | Nonevar experimental : typing.Any | Nonevar headline_max_chars : int | Nonevar headlines_max : int | Nonevar headlines_min : int | Nonevar images_landscape_aspect_ratio : str | Nonevar images_landscape_max : int | Nonevar images_landscape_min : int | Nonevar images_square_max : int | Nonevar images_square_min : int | Nonevar images_vertical_max : int | Nonevar images_vertical_min : int | Nonevar logo_aspect_ratios : list[str] | Nonevar logo_max : int | Nonevar logo_min : int | Nonevar long_headline_max_chars : int | Nonevar long_headlines_max : int | Nonevar long_headlines_min : int | Nonevar model_configvar slots : typing.Any | Nonevar supports_catalog_input : bool | Nonevar v1_translatable : typing.Any | Nonevar video_max_duration_ms : int | Nonevar video_min_duration_ms : int | Nonevar videos_max : int | Nonevar videos_min : int | None
Inherited members