Module adcp.types.domains.content_standards

Types the AdCP adcp.types.domains.content_standards.content_standards schemas declare.

Importing from the domain says which variant you mean, where the flat adcp.types namespace can only bind one class per name:

from adcp.types.domains.content_standards import <Type>

A type this domain declares in more than one schema is not here: import it from its own schema's module, adcp.types.domains.content_standards.<schema>. Nothing here is renamed.

Auto-generated from the generated domain tree. DO NOT EDIT MANUALLY. Generation date: 2026-10-04 18:45:11 UTC

Sub-modules

adcp.types.domains.content_standards.artifact
adcp.types.domains.content_standards.artifact_webhook_payload
adcp.types.domains.content_standards.calibrate_content_request
adcp.types.domains.content_standards.calibrate_content_response
adcp.types.domains.content_standards.content_standards
adcp.types.domains.content_standards.create_content_standards_request
adcp.types.domains.content_standards.create_content_standards_response
adcp.types.domains.content_standards.get_content_standards_request
adcp.types.domains.content_standards.get_content_standards_response
adcp.types.domains.content_standards.get_media_buy_artifacts_request
adcp.types.domains.content_standards.get_media_buy_artifacts_response
adcp.types.domains.content_standards.list_content_standards_request
adcp.types.domains.content_standards.list_content_standards_response
adcp.types.domains.content_standards.update_content_standards_request
adcp.types.domains.content_standards.update_content_standards_response
adcp.types.domains.content_standards.validate_content_delivery_request
adcp.types.domains.content_standards.validate_content_delivery_response

Classes

class ArtifactWebhookPayload (**data: Any)
Expand source code
class ArtifactWebhookPayload(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    idempotency_key: Annotated[
        str,
        Field(
            description='Sender-generated key stable across retries of the same webhook event. Sales agents MUST generate a cryptographically random value (UUID v4 recommended) per distinct emission of a batch and reuse the same key on every retry. Recipients MUST dedupe by this key, scoped to the authenticated sender identity (HMAC secret or Bearer credential) — keys from different sales agents are independent. Distinct from `batch_id`, which identifies the logical batch: `idempotency_key` identifies this specific emission event, so a re-emission of the same `batch_id` (e.g., after a correction) is a different event and MUST carry a fresh `idempotency_key`.',
            max_length=255,
            min_length=16,
            pattern='^[A-Za-z0-9_.:-]{16,255}$',
        ),
    ]
    media_buy_id: Annotated[
        str, Field(description='Media buy identifier these artifacts belong to')
    ]
    batch_id: Annotated[
        str,
        Field(
            description='Unique identifier for this batch of artifacts. Use for deduplication and acknowledgment.'
        ),
    ]
    timestamp: Annotated[
        AwareDatetime, Field(description='When this batch was generated (ISO 8601)')
    ]
    artifacts: Annotated[
        list[Artifact], Field(description='Content artifacts from delivered impressions')
    ]
    pagination: Annotated[
        Pagination | None, Field(description='Pagination info when batching large artifact sets')
    ] = 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 artifacts : list[Artifact]
var batch_id : str
var ext : ExtensionObject | None
var idempotency_key : str
var media_buy_id : str
var model_config
var pagination : Pagination | None
var timestamp : pydantic.types.AwareDatetime

Inherited members

class AssetAccess (root: RootModelRootType = PydanticUndefined, **data)
Expand source code
class AssetAccess(RootModel[AssetAccess1 | AssetAccess2 | AssetAccess3]):
    root: Annotated[
        AssetAccess1 | AssetAccess2 | AssetAccess3,
        Field(
            description='Access instructions for a secured asset URL. Producers SHOULD use `signed_url` for one-off delivery unless the parties already have an identity-based access relationship. New producers MUST NOT emit `service_account.credentials`; `bearer_token` is the explicit short-lived credential path. Consumers MUST treat asset URLs and access metadata as untrusted, use credentials only for HTTPS origins and resource prefixes authorized out of band, and fail closed without falling back between access methods. The deprecated legacy field remains parseable during the 3.x compatibility window but MUST NOT be activated automatically.',
            discriminator='method',
        ),
    ]
    def __getattr__(self, name: str) -> Any:
        """Proxy attribute access to the wrapped type."""
        if name.startswith('_'):
            raise AttributeError(name)
        return getattr(self.root, name)

Usage Documentation

RootModel and Custom Root Types

A Pydantic BaseModel for the root object of the model.

Attributes
-----=
root
The root object of the model.
__pydantic_root_model__
Whether the model is a RootModel.
__pydantic_private__
Private fields in the model.
__pydantic_extra__
Extra fields in the model.

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

  • pydantic.root_model.RootModel[Union[AssetAccess1, AssetAccess2, AssetAccess3]]
  • pydantic.root_model.RootModel
  • pydantic.main.BaseModel
  • typing.Generic

Class variables

var model_config
var root : AssetAccess1 | AssetAccess2 | AssetAccess3
class AssetAccess1 (**data: Any)
Expand source code
class AssetAccess1(AdCPBaseModel):
    method: Literal['bearer_token'] = 'bearer_token'
    token: Annotated[
        str,
        Field(
            description="Short-lived, asset-scoped bearer token for the Authorization header. Producers MUST NOT issue a standing or broadly scoped credential here. Consumers MUST redact the token from logs, traces, errors, metrics, analytics, model context, and durable storage. Any temporary encrypted cache MUST be bounded by the credential expiry and the consumer's configured maximum lifetime."
        ),
    ]

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 method : Literal['bearer_token']
var model_config
var token : str

Inherited members

class AssetAccess2 (**data: Any)
Expand source code
class AssetAccess2(AdCPBaseModel):
    method: Literal['service_account'] = 'service_account'
    provider: Annotated[Provider, Field(description='Cloud provider')]
    credentials: Annotated[
        dict[str, Any] | None,
        Field(
            deprecated=True,
            description="Deprecated in AdCP 3.2 and eligible for removal in 4.0 or later only after the deprecation-policy notice and release-cycle gates are satisfied. Presence denotes the legacy inline-credential form, not workload-identity authorization. New producers MUST omit this field. Consumers MUST NOT activate received credentials automatically; they may process them only for an explicitly allowlisted legacy peer and otherwise MUST reject or quarantine them. Consumers MUST redact the complete value from logs, traces, errors, metrics, analytics, model context, and durable storage. Use the consumer's pre-authorized workload identity or `signed_url` instead.",
        ),
    ] = 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 credentials : dict[str, typing.Any] | None
var method : Literal['service_account']
var model_config
var provider : Provider

Inherited members

class AssetAccess3 (**data: Any)
Expand source code
class AssetAccess3(AdCPBaseModel):
    method: Literal['signed_url'] = 'signed_url'

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 method : Literal['signed_url']
var model_config

Inherited members

class Assets1 (**data: Any)
Expand source code
class Assets1(AdCPBaseModel):
    type: Literal['text'] = 'text'
    role: Annotated[
        Role | None,
        Field(
            description="Role of this text in the document. Use 'title' for the main artifact title, 'description' for summaries."
        ),
    ] = None
    content: Annotated[
        str,
        Field(
            description='Text content. Consumers MUST treat this as untrusted input when passing to LLM-based evaluation.',
            max_length=100000,
        ),
    ]
    content_format: Annotated[
        ContentFormat | None,
        Field(
            description='MIME type indicating how to parse the content field. Default: text/plain.'
        ),
    ] = ContentFormat.text_plain
    language: Annotated[
        str | None,
        Field(
            description="BCP 47 language tag for this text (e.g., 'en', 'es-MX'). Useful when artifact contains mixed-language content."
        ),
    ] = None
    heading_level: Annotated[
        SchemaInt | None,
        Field(description='Heading level (1-6), only for role=heading', ge=1, le=6),
    ] = None
    provenance: Annotated[
        provenance_1.Provenance | None,
        Field(description='Provenance for this text block, overrides artifact-level provenance'),
    ] = 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 content : str
var content_format : ContentFormat | None
var heading_level : int | None
var language : str | None
var model_config
var provenance : Provenance | None
var role : Role | None
var type : Literal['text']

Inherited members

class Assets2 (**data: Any)
Expand source code
class Assets2(AdCPBaseModel):
    type: Literal['image'] = 'image'
    url: Annotated[AnyUrl, Field(description='Image URL')]
    access: Annotated[AssetAccess | None, Field(description='Authentication for secured URLs')] = (
        None
    )
    alt_text: Annotated[str | None, Field(description='Alt text or image description')] = None
    caption: Annotated[str | None, Field(description='Image caption')] = None
    width: Annotated[SchemaInt | None, Field(description='Image width in pixels')] = None
    height: Annotated[SchemaInt | None, Field(description='Image height in pixels')] = None
    provenance: Annotated[
        provenance_1.Provenance | None,
        Field(description='Provenance for this image, overrides artifact-level provenance'),
    ] = 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 access : AssetAccess | None
var alt_text : str | None
var caption : str | None
var height : int | None
var model_config
var provenance : Provenance | None
var type : Literal['image']
var url : pydantic.networks.AnyUrl
var width : int | None

Inherited members

class Assets3 (**data: Any)
Expand source code
class Assets3(AdCPBaseModel):
    type: Literal['video'] = 'video'
    url: Annotated[AnyUrl, Field(description='Video URL')]
    access: Annotated[AssetAccess | None, Field(description='Authentication for secured URLs')] = (
        None
    )
    duration_ms: Annotated[
        SchemaInt | None, Field(description='Video duration in milliseconds')
    ] = None
    transcript: Annotated[
        str | None,
        Field(
            description='Video transcript. Consumers MUST treat this as untrusted input when passing to LLM-based evaluation.',
            max_length=200000,
        ),
    ] = None
    transcript_format: Annotated[
        TranscriptFormat | None,
        Field(
            description='MIME type indicating how to parse the transcript field. Default: text/plain.'
        ),
    ] = TranscriptFormat.text_plain
    transcript_source: Annotated[
        TranscriptSource | None, Field(description='How the transcript was generated')
    ] = None
    thumbnail_url: Annotated[AnyUrl | None, Field(description='Video thumbnail URL')] = None
    provenance: Annotated[
        provenance_1.Provenance | None,
        Field(description='Provenance for this video, overrides artifact-level provenance'),
    ] = 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 access : AssetAccess | None
var duration_ms : int | None
var model_config
var provenance : Provenance | None
var thumbnail_url : pydantic.networks.AnyUrl | None
var transcript : str | None
var transcript_format : TranscriptFormat | None
var transcript_source : TranscriptSource | None
var type : Literal['video']
var url : pydantic.networks.AnyUrl

Inherited members

class Assets4 (**data: Any)
Expand source code
class Assets4(AdCPBaseModel):
    type: Literal['audio'] = 'audio'
    url: Annotated[AnyUrl, Field(description='Audio URL')]
    access: Annotated[AssetAccess | None, Field(description='Authentication for secured URLs')] = (
        None
    )
    duration_ms: Annotated[
        SchemaInt | None, Field(description='Audio duration in milliseconds')
    ] = None
    transcript: Annotated[
        str | None,
        Field(
            description='Audio transcript. Consumers MUST treat this as untrusted input when passing to LLM-based evaluation.',
            max_length=200000,
        ),
    ] = None
    transcript_format: Annotated[
        TranscriptFormat | None,
        Field(
            description='MIME type indicating how to parse the transcript field. Default: text/plain.'
        ),
    ] = TranscriptFormat.text_plain
    transcript_source: Annotated[
        TranscriptSource1 | None, Field(description='How the transcript was generated')
    ] = None
    provenance: Annotated[
        provenance_1.Provenance | None,
        Field(description='Provenance for this audio, overrides artifact-level provenance'),
    ] = 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 access : AssetAccess | None
var duration_ms : int | None
var model_config
var provenance : Provenance | None
var transcript : str | None
var transcript_format : TranscriptFormat | None
var transcript_source : TranscriptSource1 | None
var type : Literal['audio']
var url : pydantic.networks.AnyUrl

Inherited members

class CalibrateContentRequest (**data: Any)
Expand source code
class CalibrateContentRequest(AdcpRequest, AdcpVersionEnvelope):
    standards_id: Annotated[str, Field(description='Standards configuration to calibrate against')]
    artifact: Annotated[artifact_1.Artifact, Field(description='Artifact to evaluate')]
    idempotency_key: Annotated[
        str,
        Field(
            description='Client-generated unique key for at-most-once execution. If a request with the same key has already been processed, the server returns the original response without re-processing. MUST be unique per (seller, request) pair to prevent cross-seller correlation. Use a fresh UUID v4 for each request.',
            max_length=255,
            min_length=16,
            pattern='^[A-Za-z0-9_.:-]{16,255}$',
        ),
    ]
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None

The request message of a task in the pinned bundle's task registry.

A consumer holding one can resolve its account, decide at-most-once, echo its context and negotiate version – the whole transport-boundary job – before knowing which tool it is. issubclass(model, AdcpRequest) is the registration-time proof that a model is spec-derived rather than a hand-written parallel: a field test passes for a forged model, descent does not.

Each accessor returns the field's value, or None when this tool's schema declares no such field. Only 49 of the 87 request schemas declare an account and only 43 an idempotency_key, so asking the request is what replaces getattr(req, "account", None) against Any at the boundary.

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 artifact : Artifact
var context : ContextObject | None
var ext : ExtensionObject | None
var idempotency_key : str
var model_config
var standards_id : str

Inherited members

class CalibrateContentResponse1 (**data: Any)
Expand source code
class CalibrateContentResponse1(AdcpResponse, AdcpVersionEnvelope, ProtocolEnvelope):
    model_config = ConfigDict(extra='allow')
    verdict: binary_verdict_1.BinaryVerdict
    confidence: Annotated[float, Field(ge=0, le=1)] | None = None
    explanation: str | None = None
    features: list[Feature] | None = None
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None

The response message of a task in the pinned bundle's task registry.

A consumer holding one can route on task state, pick up an async task_id, split envelope from payload and log uniformly, before knowing which tool answered. Which makes one generic poll-to-terminal loop possible for all 77 tasks, where today each arm has no common type at all.

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 confidence : float | None
var context : ContextObject | None
var explanation : str | None
var ext : ExtensionObject | None
var features : list[Feature] | None
var model_config
var verdict : BinaryVerdict

Inherited members

class CalibrateContentResponse2 (**data: Any)
Expand source code
class CalibrateContentResponse2(AdcpResponse, AdcpVersionEnvelope, ProtocolEnvelope):
    model_config = ConfigDict(extra='allow')
    errors: list[error_1.Error]
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None

The response message of a task in the pinned bundle's task registry.

A consumer holding one can route on task state, pick up an async task_id, split envelope from payload and log uniformly, before knowing which tool answered. Which makes one generic poll-to-terminal loop possible for all 77 tasks, where today each arm has no common type at all.

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 context : ContextObject | None
var errors : list[Error]
var ext : ExtensionObject | None
var model_config

Inherited members

class CollectionInfo (**data: Any)
Expand source code
class CollectionInfo(AdcpVersionEnvelope):
    model_config = ConfigDict(extra='allow')
    total_deliveries: int | None = None
    total_collected: int | None = None
    returned_count: int | None = None
    effective_rate: float | 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 effective_rate : float | None
var model_config
var returned_count : int | None
var total_collected : int | None
var total_deliveries : int | None

Inherited members

class ContentFormat (*args, **kwds)
Expand source code
class ContentFormat(StrEnum):
    text_plain = 'text/plain'
    text_markdown = 'text/markdown'
    text_html = 'text/html'
    application_json = 'application/json'

Enum where members are also (and must be) strings

Ancestors

  • enum.StrEnum
  • builtins.str
  • enum.ReprEnum
  • enum.Enum

Class variables

var application_json
var text_html
var text_markdown
var text_plain
class ContentStandards (**data: Any)
Expand source code
class ContentStandards(AdCPBaseModel):
    standards_id: Annotated[
        str, Field(description='Unique identifier for this standards configuration')
    ]
    name: Annotated[
        str | None, Field(description='Human-readable name for this standards configuration')
    ] = None
    countries_all: Annotated[
        list[str] | None,
        Field(
            description='ISO 3166-1 alpha-2 country codes. Standards apply in ALL listed countries (AND logic).',
            min_length=1,
        ),
    ] = None
    channels_any: Annotated[
        list[channels.MediaChannel] | None,
        Field(
            description='Advertising channels. Standards apply to ANY of the listed channels (OR logic).',
            min_length=1,
        ),
    ] = None
    languages_any: Annotated[
        list[str] | None,
        Field(
            description="BCP 47 language tags (e.g., 'en', 'de', 'fr'). Standards apply to content in ANY of these languages (OR logic). Content in unlisted languages is not covered by these standards.",
            min_length=1,
        ),
    ] = None
    policies: Annotated[
        list[policy_entry.PolicyEntry] | None,
        Field(
            description='Bespoke policies for this content-standards configuration, using the same shape as registry entries. Each policy is addressable by policy_id; governance findings reference the policy_id that triggered them.',
            min_length=1,
        ),
    ] = None
    calibration_exemplars: Annotated[
        CalibrationExemplars | None,
        Field(
            description='Training/test set to calibrate policy interpretation. Provides concrete examples of pass/fail decisions.'
        ),
    ] = None
    pricing_options: Annotated[
        list[vendor_pricing_option.VendorPricingOption] | None,
        Field(
            description='Pricing options for this content standards service. The buyer passes the selected pricing_option_id in report_usage for billing verification.',
            min_length=1,
        ),
    ] = 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 calibration_exemplars : CalibrationExemplars | None
var channels_any : list[MediaChannel] | None
var countries_all : list[str] | None
var ext : ExtensionObject | None
var languages_any : list[str] | None
var model_config
var name : str | None
var policies : list[PolicyEntry] | None
var pricing_options : list[VendorPricingOption7 | VendorPricingOption8 | VendorPricingOption9 | VendorPricingOption10 | VendorPricingOption11] | None
var standards_id : str

Inherited members

class CreateContentStandardsRequest (**data: Any)
Expand source code
class CreateContentStandardsRequest(AdcpRequest, AdcpVersionEnvelope):
    model_config = ConfigDict(
        extra='allow',
    )
    scope: Annotated[Scope, Field(description='Where this standards configuration applies')]
    registry_policy_ids: Annotated[
        list[str] | None,
        Field(
            description="Registry policy IDs to use as the evaluation basis for this content standard. When provided, the agent resolves policies from the registry and uses their policy text and exemplars as the evaluation criteria. The 'policy' field becomes optional when registry_policy_ids is provided."
        ),
    ] = None
    policies: Annotated[
        list[policy_entry.PolicyEntry] | None,
        Field(
            description='Bespoke policies for this content-standards configuration, using the same shape as registry entries. Each policy is addressable by policy_id and carries its own enforcement (must|should); governance findings reference the policy_id that triggered them. Inline bespoke policies can omit version/name/category (defaulted by the server). Combines with registry_policy_ids — registry policies and bespoke policies are both evaluated. Bespoke policy_ids MUST be flat (no colons/slashes) to avoid collision with namespaced registry ids.',
            min_length=1,
        ),
    ] = None
    calibration_exemplars: Annotated[
        CalibrationExemplars | None,
        Field(
            description='Training/test set to calibrate policy interpretation. Use URL references for pages to be fetched and analyzed, or full artifacts for pre-extracted content.'
        ),
    ] = None
    idempotency_key: Annotated[
        str,
        Field(
            description='Client-generated unique key for this request. Prevents duplicate content standards creation on retries. MUST be unique per (seller, request) pair to prevent cross-seller correlation. Use a fresh UUID v4 for each request.',
            max_length=255,
            min_length=16,
            pattern='^[A-Za-z0-9_.:-]{16,255}$',
        ),
    ]
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None

    @model_validator(mode='after')
    def _require_schema_required_group(self) -> CreateContentStandardsRequest:
        # ``required`` asks whether the caller supplied the field, which is what
        # model_fields_set answers. An explicit null is a supplied value — on a
        # mutation input it is the command to clear — and a default the caller
        # never sent is not.
        for group in (('policies',), ('registry_policy_ids',),):
            if all(name in self.model_fields_set for name in group):
                return self
        raise ValueError(
            'CreateContentStandardsRequest requires at least one of these field groups: policies | registry_policy_ids'
        )

The request message of a task in the pinned bundle's task registry.

A consumer holding one can resolve its account, decide at-most-once, echo its context and negotiate version – the whole transport-boundary job – before knowing which tool it is. issubclass(model, AdcpRequest) is the registration-time proof that a model is spec-derived rather than a hand-written parallel: a field test passes for a forged model, descent does not.

Each accessor returns the field's value, or None when this tool's schema declares no such field. Only 49 of the 87 request schemas declare an account and only 43 an idempotency_key, so asking the request is what replaces getattr(req, "account", None) against Any at the boundary.

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 calibration_exemplars : CalibrationExemplars | None
var context : ContextObject | None
var ext : ExtensionObject | None
var idempotency_key : str
var model_config
var policies : list[PolicyEntry] | None
var registry_policy_ids : list[str] | None
var scope : Scope

Inherited members

class CreateContentStandardsResponse (**data: Any)
Expand source code
class CreateContentStandardsResponse(AdcpResponse, ResponseArmDispatchMixin, AdcpVersionEnvelope, ProtocolEnvelope):
    """Constructible compatibility base for generated response arms."""

    @classmethod
    def _response_arm_models(cls) -> tuple[type[CreateContentStandardsResponse], ...]:
        return (
            CreateContentStandardsResponse1,
            CreateContentStandardsResponse2,
        )

Constructible compatibility base for generated response arms.

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

Subclasses

Class variables

var model_config

Inherited members

class CreateContentStandardsResponse1 (**data: Any)
Expand source code
class CreateContentStandardsResponse1(CreateContentStandardsResponse):
    standards_id: Annotated[
        str, Field(description='Unique identifier for the created standards configuration')
    ]
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None

Constructible compatibility base for generated response arms.

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 context : ContextObject | None
var ext : ExtensionObject | None
var model_config
var standards_id : str

Inherited members

class CreateContentStandardsResponse2 (**data: Any)
Expand source code
class CreateContentStandardsResponse2(CreateContentStandardsResponse):
    errors: list[error.Error]
    conflicting_standards_id: Annotated[
        str | None,
        Field(
            description='If the error is a scope conflict, the ID of the existing standards that conflict'
        ),
    ] = None
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None

Constructible compatibility base for generated response arms.

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 conflicting_standards_id : str | None
var context : ContextObject | None
var errors : list[Error]
var ext : ExtensionObject | None
var model_config

Inherited members

class GetContentStandardsRequest (**data: Any)
Expand source code
class GetContentStandardsRequest(AdcpRequest, AdcpVersionEnvelope):
    standards_id: Annotated[
        str, Field(description='Identifier for the standards configuration to retrieve')
    ]
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None

The request message of a task in the pinned bundle's task registry.

A consumer holding one can resolve its account, decide at-most-once, echo its context and negotiate version – the whole transport-boundary job – before knowing which tool it is. issubclass(model, AdcpRequest) is the registration-time proof that a model is spec-derived rather than a hand-written parallel: a field test passes for a forged model, descent does not.

Each accessor returns the field's value, or None when this tool's schema declares no such field. Only 49 of the 87 request schemas declare an account and only 43 an idempotency_key, so asking the request is what replaces getattr(req, "account", None) against Any at the boundary.

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 context : ContextObject | None
var ext : ExtensionObject | None
var model_config
var standards_id : str

Inherited members

class GetContentStandardsResponse1 (**data: Any)
Expand source code
class GetContentStandardsResponse1(AdcpResponse, AdcpVersionEnvelope, ProtocolEnvelope):
    model_config = ConfigDict(extra='allow')
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None

The response message of a task in the pinned bundle's task registry.

A consumer holding one can route on task state, pick up an async task_id, split envelope from payload and log uniformly, before knowing which tool answered. Which makes one generic poll-to-terminal loop possible for all 77 tasks, where today each arm has no common type at all.

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 context : ContextObject | None
var ext : ExtensionObject | None
var model_config

Inherited members

class GetContentStandardsResponse2 (**data: Any)
Expand source code
class GetContentStandardsResponse2(AdcpResponse, AdcpVersionEnvelope, ProtocolEnvelope):
    model_config = ConfigDict(extra='allow')
    errors: list[error_1.Error]
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None

The response message of a task in the pinned bundle's task registry.

A consumer holding one can route on task state, pick up an async task_id, split envelope from payload and log uniformly, before knowing which tool answered. Which makes one generic poll-to-terminal loop possible for all 77 tasks, where today each arm has no common type at all.

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 context : ContextObject | None
var errors : list[Error]
var ext : ExtensionObject | None
var model_config

Inherited members

class GetMediaBuyArtifactsRequest (**data: Any)
Expand source code
class GetMediaBuyArtifactsRequest(AdcpRequest, AdcpVersionEnvelope):
    account: Annotated[
        account_ref.AccountReference | None,
        Field(
            description='Filter artifacts to a specific account. When omitted, returns artifacts across all accessible accounts.'
        ),
    ] = None
    media_buy_id: Annotated[str, Field(description='Media buy to get artifacts from')]
    package_ids: Annotated[
        list[str] | None,
        Field(description='Filter to specific packages within the media buy', min_length=1),
    ] = None
    failures_only: Annotated[
        StrictBool | None,
        Field(
            description="When true, only return artifacts where the seller's local model returned local_verdict: 'fail'. Useful for auditing false positives. Not useful when the seller does not run a local evaluation model (all verdicts are 'unevaluated')."
        ),
    ] = False
    time_range: Annotated[TimeRange | None, Field(description='Filter to specific time period')] = (
        None
    )
    pagination: Annotated[
        Pagination | None,
        Field(
            description='Pagination parameters. Uses higher limits than standard pagination because artifact result sets can be very large.'
        ),
    ] = None
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None

The request message of a task in the pinned bundle's task registry.

A consumer holding one can resolve its account, decide at-most-once, echo its context and negotiate version – the whole transport-boundary job – before knowing which tool it is. issubclass(model, AdcpRequest) is the registration-time proof that a model is spec-derived rather than a hand-written parallel: a field test passes for a forged model, descent does not.

Each accessor returns the field's value, or None when this tool's schema declares no such field. Only 49 of the 87 request schemas declare an account and only 43 an idempotency_key, so asking the request is what replaces getattr(req, "account", None) against Any at the boundary.

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 account : AccountReference1 | AccountReference2 | None
var context : ContextObject | None
var ext : ExtensionObject | None
var failures_only : bool | None
var media_buy_id : str
var model_config
var package_ids : list[str] | None
var pagination : Pagination | None
var time_range : TimeRange | None

Inherited members

class GetMediaBuyArtifactsResponse1 (**data: Any)
Expand source code
class GetMediaBuyArtifactsResponse1(AdcpResponse, AdcpVersionEnvelope, ProtocolEnvelope):
    model_config = ConfigDict(extra='allow')
    media_buy_id: str
    artifacts: list[Artifact]
    collection_info: CollectionInfo | None = None
    pagination: pagination_response_1.PaginationResponse | None = None
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None

The response message of a task in the pinned bundle's task registry.

A consumer holding one can route on task state, pick up an async task_id, split envelope from payload and log uniformly, before knowing which tool answered. Which makes one generic poll-to-terminal loop possible for all 77 tasks, where today each arm has no common type at all.

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 artifacts : list[Artifact]
var collection_info : CollectionInfo | None
var context : ContextObject | None
var ext : ExtensionObject | None
var media_buy_id : str
var model_config
var pagination : PaginationResponse | None

Inherited members

class GetMediaBuyArtifactsResponse2 (**data: Any)
Expand source code
class GetMediaBuyArtifactsResponse2(AdcpResponse, AdcpVersionEnvelope, ProtocolEnvelope):
    model_config = ConfigDict(extra='allow')
    errors: list[error_1.Error]
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None

The response message of a task in the pinned bundle's task registry.

A consumer holding one can route on task state, pick up an async task_id, split envelope from payload and log uniformly, before knowing which tool answered. Which makes one generic poll-to-terminal loop possible for all 77 tasks, where today each arm has no common type at all.

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 context : ContextObject | None
var errors : list[Error]
var ext : ExtensionObject | None
var model_config

Inherited members

class Identifiers (**data: Any)
Expand source code
class Identifiers(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    apple_podcast_id: Annotated[str | None, Field(description='Apple Podcasts ID')] = None
    spotify_collection_id: Annotated[str | None, Field(description='Spotify collection ID')] = None
    podcast_guid: Annotated[str | None, Field(description='Podcast GUID (from RSS feed)')] = None
    youtube_video_id: Annotated[str | None, Field(description='YouTube video ID')] = None
    rss_url: Annotated[AnyUrl | None, Field(description='RSS feed URL')] = 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 apple_podcast_id : str | None
var model_config
var podcast_guid : str | None
var rss_url : pydantic.networks.AnyUrl | None
var spotify_collection_id : str | None
var youtube_video_id : str | None

Inherited members

class ListContentStandardsRequest (**data: Any)
Expand source code
class ListContentStandardsRequest(AdcpRequest, AdcpVersionEnvelope):
    model_config = ConfigDict(
        extra='allow',
    )
    channels: Annotated[
        list[channels_1.MediaChannel] | None, Field(description='Filter by channel', min_length=1)
    ] = None
    languages: Annotated[
        list[str] | None, Field(description='Filter by BCP 47 language tags', min_length=1)
    ] = None
    countries: Annotated[
        list[str] | None,
        Field(description='Filter by ISO 3166-1 alpha-2 country codes', min_length=1),
    ] = None
    pagination: pagination_request.PaginationRequest | None = None
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None

The request message of a task in the pinned bundle's task registry.

A consumer holding one can resolve its account, decide at-most-once, echo its context and negotiate version – the whole transport-boundary job – before knowing which tool it is. issubclass(model, AdcpRequest) is the registration-time proof that a model is spec-derived rather than a hand-written parallel: a field test passes for a forged model, descent does not.

Each accessor returns the field's value, or None when this tool's schema declares no such field. Only 49 of the 87 request schemas declare an account and only 43 an idempotency_key, so asking the request is what replaces getattr(req, "account", None) against Any at the boundary.

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 channels : list[MediaChannel] | None
var context : ContextObject | None
var countries : list[str] | None
var ext : ExtensionObject | None
var languages : list[str] | None
var model_config
var pagination : PaginationRequest | None

Inherited members

class ListContentStandardsResponse (**data: Any)
Expand source code
class ListContentStandardsResponse(AdcpResponse, ResponseArmDispatchMixin, AdcpVersionEnvelope, ProtocolEnvelope):
    """Constructible compatibility base for generated response arms."""

    @classmethod
    def _response_arm_models(cls) -> tuple[type[ListContentStandardsResponse], ...]:
        return (
            ListContentStandardsResponse1,
            ListContentStandardsResponse2,
        )

Constructible compatibility base for generated response arms.

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

Subclasses

Class variables

var model_config

Inherited members

class ListContentStandardsResponse1 (**data: Any)
Expand source code
class ListContentStandardsResponse1(ListContentStandardsResponse):
    standards: Annotated[
        list[content_standards.ContentStandards],
        Field(description='Array of content standards configurations matching the filter criteria'),
    ]
    pagination: pagination_response.PaginationResponse | None = None
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None

Constructible compatibility base for generated response arms.

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 context : ContextObject | None
var ext : ExtensionObject | None
var model_config
var pagination : PaginationResponse | None
var standards : list[ContentStandards]

Inherited members

class ListContentStandardsResponse2 (**data: Any)
Expand source code
class ListContentStandardsResponse2(ListContentStandardsResponse):
    errors: list[error.Error]
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None

Constructible compatibility base for generated response arms.

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 context : ContextObject | None
var errors : list[Error]
var ext : ExtensionObject | None
var model_config

Inherited members

class Metadata (**data: Any)
Expand source code
class Metadata(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    canonical: Annotated[AnyUrl | None, Field(description='Canonical URL')] = None
    author: Annotated[str | None, Field(description='Artifact author name')] = None
    keywords: Annotated[str | None, Field(description='Artifact keywords')] = None
    open_graph: Annotated[
        dict[str, Any] | None, Field(description='Open Graph protocol metadata')
    ] = None
    twitter_card: Annotated[dict[str, Any] | None, Field(description='Twitter Card metadata')] = (
        None
    )
    json_ld: Annotated[
        list[dict[str, Any]] | None, Field(description='JSON-LD structured data (schema.org)')
    ] = 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 author : str | None
var canonical : pydantic.networks.AnyUrl | None
var json_ld : list[dict[str, typing.Any]] | None
var keywords : str | None
var model_config
var open_graph : dict[str, typing.Any] | None
var twitter_card : dict[str, typing.Any] | None

Inherited members

class Provider (*args, **kwds)
Expand source code
class Provider(StrEnum):
    gcp = 'gcp'
    aws = 'aws'

Enum where members are also (and must be) strings

Ancestors

  • enum.StrEnum
  • builtins.str
  • enum.ReprEnum
  • enum.Enum

Class variables

var aws
var gcp
class Record (**data: Any)
Expand source code
class Record(AdCPBaseModel):
    record_id: Annotated[str, Field(description='Unique identifier for this delivery record')]
    media_buy_id: Annotated[
        str | None,
        Field(description='Media buy this record belongs to (when batching across multiple buys)'),
    ] = None
    timestamp: Annotated[AwareDatetime | None, Field(description='When the delivery occurred')] = (
        None
    )
    artifact: Annotated[artifact_1.Artifact, Field(description='Artifact where ad was delivered')]
    country: Annotated[
        str | None, Field(description='ISO 3166-1 alpha-2 country code where delivery occurred')
    ] = None
    channel: Annotated[
        str | None, Field(description='Channel type (e.g., display, video, audio, social)')
    ] = None
    brand_context: Annotated[
        BrandContext | None,
        Field(
            description='Brand information for policy evaluation. Schema TBD - placeholder for brand identifiers.'
        ),
    ] = 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 artifact : Artifact
var brand_context : BrandContext | None
var channel : str | None
var country : str | None
var media_buy_id : str | None
var model_config
var record_id : str
var timestamp : pydantic.types.AwareDatetime | None

Inherited members

class Result (**data: Any)
Expand source code
class Result(AdcpVersionEnvelope):
    model_config = ConfigDict(extra='allow')
    record_id: str
    verdict: binary_verdict_1.BinaryVerdict
    features: list[Feature] | 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 features : list[Feature] | None
var model_config
var record_id : str
var verdict : BinaryVerdict

Inherited members

class Role (*args, **kwds)
Expand source code
class Role(StrEnum):
    title = 'title'  # type: ignore[assignment]
    paragraph = 'paragraph'
    heading = 'heading'
    caption = 'caption'
    quote = 'quote'
    list_item = 'list_item'
    description = 'description'

Enum where members are also (and must be) strings

Ancestors

  • enum.StrEnum
  • builtins.str
  • enum.ReprEnum
  • enum.Enum

Class variables

var caption
var description
var heading
var list_item
var paragraph
var quote
var title
class Summary (**data: Any)
Expand source code
class Summary(AdcpVersionEnvelope):
    model_config = ConfigDict(extra='allow')
    total_records: int
    passed_records: int
    failed_records: int

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 failed_records : int
var model_config
var passed_records : int
var total_records : int

Inherited members

class TimeRange (**data: Any)
Expand source code
class TimeRange(AdCPBaseModel):
    start: Annotated[AwareDatetime | None, Field(description='Start of time range (inclusive)')] = (
        None
    )
    end: Annotated[AwareDatetime | None, Field(description='End of time range (exclusive)')] = 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 end : pydantic.types.AwareDatetime | None
var model_config
var start : pydantic.types.AwareDatetime | None

Inherited members

class TranscriptFormat (*args, **kwds)
Expand source code
class TranscriptFormat(StrEnum):
    text_plain = 'text/plain'
    text_markdown = 'text/markdown'
    application_json = 'application/json'

Enum where members are also (and must be) strings

Ancestors

  • enum.StrEnum
  • builtins.str
  • enum.ReprEnum
  • enum.Enum

Class variables

var application_json
var text_markdown
var text_plain
class TranscriptSource (*args, **kwds)
Expand source code
class TranscriptSource(StrEnum):
    original_script = 'original_script'
    subtitles = 'subtitles'
    closed_captions = 'closed_captions'
    dub = 'dub'
    generated = 'generated'

Enum where members are also (and must be) strings

Ancestors

  • enum.StrEnum
  • builtins.str
  • enum.ReprEnum
  • enum.Enum

Class variables

var closed_captions
var dub
var generated
var original_script
var subtitles
class TranscriptSource1 (*args, **kwds)
Expand source code
class TranscriptSource1(StrEnum):
    original_script = 'original_script'
    closed_captions = 'closed_captions'
    generated = 'generated'

Enum where members are also (and must be) strings

Ancestors

  • enum.StrEnum
  • builtins.str
  • enum.ReprEnum
  • enum.Enum

Class variables

var closed_captions
var generated
var original_script
class UpdateContentStandardsRequest (**data: Any)
Expand source code
class UpdateContentStandardsRequest(AdcpRequest, AdcpVersionEnvelope):
    model_config = ConfigDict(
        extra='allow',
    )
    standards_id: Annotated[str, Field(description='ID of the standards configuration to update')]
    scope: Annotated[
        Scope | None,
        Field(description='Updated scope for where this standards configuration applies'),
    ] = None
    registry_policy_ids: Annotated[
        list[str] | None,
        Field(
            description='Registry policy IDs to use as the evaluation basis. When provided, the agent resolves policies from the registry and uses their policy text and exemplars as the evaluation criteria.'
        ),
    ] = None
    policies: Annotated[
        list[policy_entry.PolicyEntry] | None,
        Field(
            description='Updated bespoke policies for this content-standards configuration, using the same shape as registry entries. Replaces the existing policies array; use stable policy_ids to track policies across versions. Combines with registry_policy_ids. Bespoke policy_ids MUST be flat (no colons/slashes).',
            min_length=1,
        ),
    ] = None
    calibration_exemplars: Annotated[
        CalibrationExemplars | None,
        Field(
            description='Updated training/test set to calibrate policy interpretation. Use URL references for pages to be fetched and analyzed, or full artifacts for pre-extracted content.'
        ),
    ] = None
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None
    idempotency_key: Annotated[
        str,
        Field(
            description='Client-generated unique key for at-most-once execution. If a request with the same key has already been processed, the server returns the original response without re-processing. MUST be unique per (seller, request) pair to prevent cross-seller correlation. Use a fresh UUID v4 for each request.',
            max_length=255,
            min_length=16,
            pattern='^[A-Za-z0-9_.:-]{16,255}$',
        ),
    ]

The request message of a task in the pinned bundle's task registry.

A consumer holding one can resolve its account, decide at-most-once, echo its context and negotiate version – the whole transport-boundary job – before knowing which tool it is. issubclass(model, AdcpRequest) is the registration-time proof that a model is spec-derived rather than a hand-written parallel: a field test passes for a forged model, descent does not.

Each accessor returns the field's value, or None when this tool's schema declares no such field. Only 49 of the 87 request schemas declare an account and only 43 an idempotency_key, so asking the request is what replaces getattr(req, "account", None) against Any at the boundary.

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 calibration_exemplars : CalibrationExemplars | None
var context : ContextObject | None
var ext : ExtensionObject | None
var idempotency_key : str
var model_config
var policies : list[PolicyEntry] | None
var registry_policy_ids : list[str] | None
var scope : Scope | None
var standards_id : str

Inherited members

class UpdateContentStandardsResponse (**data: Any)
Expand source code
class UpdateContentStandardsResponse(AdcpResponse, ResponseArmDispatchMixin, AdcpVersionEnvelope, ProtocolEnvelope):
    """Constructible compatibility base for generated response arms."""

    @classmethod
    def _response_arm_models(cls) -> tuple[type[UpdateContentStandardsResponse], ...]:
        return (
            UpdateContentStandardsResponse1,
            UpdateContentStandardsResponse2,
        )

Constructible compatibility base for generated response arms.

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

Subclasses

Class variables

var model_config

Inherited members

class UpdateContentStandardsResponse1 (**data: Any)
Expand source code
class UpdateContentStandardsResponse1(UpdateContentStandardsResponse):
    model_config = ConfigDict(
        extra='allow',
    )
    success: Annotated[
        Literal[True], Field(description='Indicates the update was applied successfully')
    ]
    standards_id: Annotated[str, Field(description='ID of the updated standards configuration')]
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None

Constructible compatibility base for generated response arms.

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 context : ContextObject | None
var ext : ExtensionObject | None
var model_config
var standards_id : str
var success : Literal[True]

Inherited members

class UpdateContentStandardsResponse2 (**data: Any)
Expand source code
class UpdateContentStandardsResponse2(UpdateContentStandardsResponse):
    model_config = ConfigDict(
        extra='allow',
    )
    success: Annotated[Literal[False], Field(description='Indicates the update failed')]
    errors: Annotated[
        list[error.Error], Field(description='Errors that occurred during the update', min_length=1)
    ]
    conflicting_standards_id: Annotated[
        str | None,
        Field(
            description='If scope change conflicts with another configuration, the ID of the conflicting standards'
        ),
    ] = None
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None

Constructible compatibility base for generated response arms.

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 conflicting_standards_id : str | None
var context : ContextObject | None
var errors : list[Error]
var ext : ExtensionObject | None
var model_config
var success : Literal[False]

Inherited members

class ValidateContentDeliveryRequest (**data: Any)
Expand source code
class ValidateContentDeliveryRequest(AdcpRequest, AdcpVersionEnvelope):
    standards_id: Annotated[str, Field(description='Standards configuration to validate against')]
    records: Annotated[
        list[Record],
        Field(
            description='Delivery records to validate (max 10,000)', max_length=10000, min_length=1
        ),
    ]
    feature_ids: Annotated[
        list[str] | None,
        Field(description='Specific features to evaluate (defaults to all)', min_length=1),
    ] = None
    include_passed: Annotated[
        StrictBool | None, Field(description='Include passed records in results')
    ] = True
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None

The request message of a task in the pinned bundle's task registry.

A consumer holding one can resolve its account, decide at-most-once, echo its context and negotiate version – the whole transport-boundary job – before knowing which tool it is. issubclass(model, AdcpRequest) is the registration-time proof that a model is spec-derived rather than a hand-written parallel: a field test passes for a forged model, descent does not.

Each accessor returns the field's value, or None when this tool's schema declares no such field. Only 49 of the 87 request schemas declare an account and only 43 an idempotency_key, so asking the request is what replaces getattr(req, "account", None) against Any at the boundary.

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 context : ContextObject | None
var ext : ExtensionObject | None
var feature_ids : list[str] | None
var include_passed : bool | None
var model_config
var records : list[Record]
var standards_id : str

Inherited members

class ValidateContentDeliveryResponse1 (**data: Any)
Expand source code
class ValidateContentDeliveryResponse1(AdcpResponse, AdcpVersionEnvelope, ProtocolEnvelope):
    model_config = ConfigDict(extra='allow')
    summary: Summary
    results: list[Result]
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None

The response message of a task in the pinned bundle's task registry.

A consumer holding one can route on task state, pick up an async task_id, split envelope from payload and log uniformly, before knowing which tool answered. Which makes one generic poll-to-terminal loop possible for all 77 tasks, where today each arm has no common type at all.

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 context : ContextObject | None
var ext : ExtensionObject | None
var model_config
var results : list[Result]
var summary : Summary

Inherited members

class ValidateContentDeliveryResponse2 (**data: Any)
Expand source code
class ValidateContentDeliveryResponse2(AdcpResponse, AdcpVersionEnvelope, ProtocolEnvelope):
    model_config = ConfigDict(extra='allow')
    errors: list[error_1.Error]
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None

The response message of a task in the pinned bundle's task registry.

A consumer holding one can route on task state, pick up an async task_id, split envelope from payload and log uniformly, before knowing which tool answered. Which makes one generic poll-to-terminal loop possible for all 77 tasks, where today each arm has no common type at all.

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 context : ContextObject | None
var errors : list[Error]
var ext : ExtensionObject | None
var model_config

Inherited members