Module adcp.types.domains.formats.canonical.audio_vast
Classes
class CanonicalFormatVastAudio (**data: Any)-
Expand source code
class CanonicalFormatVastAudio(CanonicalFormatBase): model_config = ConfigDict( extra='allow', ) slots: Annotated[ Any | None, Field( description='Default slots for the audio_vast canonical. The buyer supplies a VAST tag (URL or inline XML) plus an optional clickthrough URL, which falls back to the VAST ClickThrough when omitted. Tracking events and companion creatives carried by the VAST document do not require separate slots.' ), ] = [ {'asset_group_id': 'vast_tag', 'asset_type': 'vast', 'required': True}, {'asset_group_id': 'landing_page_url', 'asset_type': 'url', 'required': False}, ] vast_versions: Annotated[ list[vast_version_1.VastVersion] | None, Field( description='VAST audio versions accepted by this product format option. Standardized audio support begins at VAST 4.1; listing 2.0, 3.0, or 4.0 explicitly declares seller-supported legacy audio interoperability rather than standards-conformant VAST audio. The asset declares exactly one vast_version; compatibility requires membership in this set and the seller-wide execution set.', min_length=1, ), ] = None vast_version: Annotated[ vast_version_1.VastVersion | None, Field( deprecated=True, description='Deprecated one-element alias for vast_versions. Producers use either the singular legacy alias or the plural 3.2 field, never both. VAST 4.1+ is the standards-conformant audio profile; older values declare legacy audio interoperability.', ), ] = None media_file_requirements: Annotated[ vast_media_file_requirements.VastMediafileRequirements | None, Field( description='Technical acceptance constraints for alternative audio MediaFile renditions in each resolved InLine linear creative. Declared MIME types must be audio/*; visual-dimension constraints are invalid because VAST represents audio MediaFiles with width and height 0.' ), ] = None duration_ms_range: Annotated[ list[DurationMsRangeItem] | None, Field( description='[min, max] duration in milliseconds. duration_ms_exact takes precedence when both fields are present; SDKs SHOULD warn when both are supplied.', max_length=2, min_length=2, ), ] = None duration_ms_exact: Annotated[ SchemaInt | None, Field( description='When set, the resolved audio creative duration must equal this value. Takes precedence over duration_ms_range.', ge=1, ), ] = None skippable_after_ms: Annotated[ SchemaInt | None, Field(description='When skippable, the buyer-side skip threshold in milliseconds.', ge=0), ] = None max_wrapper_depth: Annotated[ SchemaInt | None, Field(description='Maximum VAST wrapper redirect depth permitted.', ge=0) ] = None ssl_required: StrictBool | None = None companion_image_required: Annotated[ StrictBool | None, Field(description='Whether the resolved VAST audio ad must include a companion creative.'), ] = 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 companion_image_required : bool | Nonevar duration_ms_exact : int | Nonevar duration_ms_range : list[DurationMsRangeItem] | Nonevar max_wrapper_depth : int | Nonevar media_file_requirements : VastMediafileRequirements | Nonevar model_configvar skippable_after_ms : int | Nonevar slots : typing.Any | Nonevar ssl_required : bool | Nonevar vast_version : VastVersion | Nonevar vast_versions : list[VastVersion] | None
Inherited members
class DurationMsRangeItem (value: Any = <object object>, *, root: Any = <object object>)-
Expand source code
class DurationMsRangeItem(ScalarInt): __slots__ = () _constraints = {'ge': 0}An
intgenerated from a JSON Schema integer root.Validates the way
SchemaIntvalidates an integer field: strict, so"1"andTrueare refused, with a float carrying no fractional part narrowed tointbecause JSON Schema counts it as one.Ancestors
- adcp.types._scalar.ScalarInt
- adcp.types._scalar._ScalarRoot
- builtins.int