Module adcp.types.domains.formats.canonical.audio_daast
Classes
class CanonicalFormatDaastAudio (**data: Any)-
Expand source code
class CanonicalFormatDaastAudio(CanonicalFormatBase): model_config = ConfigDict( extra='allow', ) slots: Annotated[ Any | None, Field( description="Default slots for audio_daast canonical. Buyer ships a DAAST tag (URL or inline XML, 1.0 or 1.1) plus an optional clickthrough URL. Tracking events are inherent to DAAST and don't require explicit slots." ), ] = [ {'asset_group_id': 'daast_tag', 'asset_type': 'daast', 'required': True}, {'asset_group_id': 'landing_page_url', 'asset_type': 'url', 'required': False}, ] daast_version: Annotated[ daast_version_1.DaastVersion | None, Field( deprecated=True, description='Deprecated one-element alias for `daast_versions`. Producers use either the singular legacy alias or the plural 3.2 field, never both.', ), ] = None daast_versions: Annotated[ daast_tracker_constraints.DaastVersions | None, Field( description="Accepted DAAST versions for this format option. A tracker execution selector's daast_versions must be a nonempty subset of this set." ), ] = None duration_ms_range: Annotated[ list[DurationMsRangeItem] | None, Field( description='[min, max] duration in milliseconds. **Precedence**: `duration_ms_exact` takes precedence when both ship. SDKs SHOULD lint a warning when both fields ship.', max_length=2, min_length=2, ), ] = None duration_ms_exact: Annotated[ SchemaInt | None, Field( description='When set, duration must equal exactly this value. Takes precedence over `duration_ms_range` when both ship.', ge=1, ), ] = None linear_required: StrictBool | None = None max_wrapper_depth: Annotated[SchemaInt | None, Field(ge=0)] = None ssl_required: StrictBool | None = None companion_image_required: StrictBool | 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
- adcp.types.domains.formats.canonical._base.CanonicalFormatBase
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var companion_image_required : bool | Nonevar daast_version : DaastVersion | Nonevar daast_versions : DaastVersions | Nonevar duration_ms_exact : int | Nonevar duration_ms_range : list[DurationMsRangeItem] | Nonevar linear_required : bool | Nonevar max_wrapper_depth : int | Nonevar model_configvar slots : typing.Any | Nonevar ssl_required : bool | 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