Module adcp.types.error_details

The AdCP structured error-details models, with their field types.

Error.details is typed dict, so nothing constrains what a raise site puts in it. One model per error-details/*.json schema encodes the required keys, and this module exports every one of them together with the transitive closure of their field types — the enums and nested models their annotations reference — so a seller constructs the payload with typed values:

from adcp.types.error_details import SupportedVersion, VersionUnsupportedDetails

VersionUnsupportedDetails(
    adcp_version="3.2",
    supported_versions=[SupportedVersion("3.1"), SupportedVersion("3.2")],
)

A nested name that two error-details schemas both define carries the defining file in its name (Scope) instead of a bare one.

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

Classes

class AcceptedGovernanceAgents (**data: Any)
Expand source code
class AcceptedGovernanceAgents(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    any_of: Annotated[list[AnyOf], Field(min_length=1)]

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 any_of : list[AnyOf]
var model_config

Inherited members

class AccessibilityViolationDetails (**data: Any)
Expand source code
class AccessibilityViolationDetails(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    violations: Annotated[
        list[Violation],
        Field(
            description='Accessibility requirements the creative or its assets failed. This is distinct from error.issues, which carries JSON Schema validator failures.',
            max_length=4,
            min_length=1,
        ),
    ]
    truncated: Annotated[
        StrictBool | None,
        Field(
            description='True when the producer omitted additional violations or remediation text to keep the complete serialized error within the 4096-byte transport safety limit. Omission means false.'
        ),
    ] = 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 model_config
var truncated : bool | None
var violations : list[Violation]

Inherited members

class AccountMovedDetails (**data: Any)
Expand source code
class AccountMovedDetails(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    current_account: Annotated[
        canonical_account_ref.CanonicalAccountReference,
        Field(
            description='Current canonical reference. Buyer-declared account sellers return the complete current natural key; account-id namespaces may return account_id.'
        ),
    ]
    revision: Annotated[
        SchemaInt | None,
        Field(
            description='Current account revision when the seller exposes account revisions.', ge=1
        ),
    ] = 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 current_account : CanonicalAccountReference1 | CanonicalAccountReference2
var model_config
var revision : int | None

Inherited members

class AccountSetupRequiredDetails (**data: Any)
Expand source code
class AccountSetupRequiredDetails(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    setup_url: Annotated[
        AnyUrl | None, Field(description='URL where account setup can be completed')
    ] = None
    setup_steps: Annotated[
        list[str] | None, Field(description='Steps remaining before the account is ready')
    ] = 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 model_config
var setup_steps : list[str] | None
var setup_url : pydantic.networks.AnyUrl | None

Inherited members

class ActionNotAllowedDetails (**data: Any)
Expand source code
class ActionNotAllowedDetails(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    attempted_action: Annotated[
        media_buy_available_action_id.MediaBuyAvailableActionId,
        Field(
            description='The action the request mapped to, per the normative action-to-field mapping in update_media_buy task-reference.'
        ),
    ]
    reason: Annotated[
        action_not_allowed_reason.ActionNotAllowedReason,
        Field(
            description='Why the action was rejected. Buyer SDKs branch on this to choose a recovery path.'
        ),
    ]
    currently_available_actions: Annotated[
        list[media_buy_available_action.MediaBuyAvailableAction] | None,
        Field(
            description="Echo of the buy's resolved `available_actions[]` at rejection time. Buyer SDKs render this to the caller as the recovery option set."
        ),
    ] = None
    decline_reason: Annotated[
        seller_policy_decline_reason.SellerPolicyDeclineReason | None,
        Field(
            description='Coarse seller-policy dimension behind a buy-specific denial. Sellers SHOULD populate this for `reason: not_supported_on_buy` when they have a structured reason and disclosure does not expose private thresholds or enforcement controls. It SHOULD be omitted for structural reasons such as `wrong_status`, `not_supported_on_product`, `mode_mismatch`, and `condition_unresolved`. When present, it MUST be consistent with the enclosing error.recovery classification.'
        ),
    ] = 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 attempted_action : MediaBuyValidAction | Literal['update_media_buy_frequency_cap']
var currently_available_actions : list[MediaBuyAvailableAction] | None
var decline_reason : SellerPolicyDeclineReason | None
var model_config
var reason : ActionNotAllowedReason

Inherited members

class ActionNotAllowedReason (*args, **kwds)
Expand source code
class ActionNotAllowedReason(StrEnum):
    wrong_status = 'wrong_status'
    not_supported_on_product = 'not_supported_on_product'
    not_supported_on_buy = 'not_supported_on_buy'
    mode_mismatch = 'mode_mismatch'
    condition_unresolved = 'condition_unresolved'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var condition_unresolved
var mode_mismatch
var not_supported_on_buy
var not_supported_on_product
var wrong_status
class AgentPermissionDeniedDetails (**data: Any)
Expand source code
class AgentPermissionDeniedDetails(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    scope: Annotated[
        Literal['agent'],
        Field(
            description='Discriminator that this `PERMISSION_DENIED` was triggered by a per-buyer-agent provisioning gate (as opposed to a generic credential-shaped failure). Registered subset of `enums/error-scope.json` — sellers MUST set this field exactly to `"agent"` for this shape, and MUST omit `scope` entirely when responding on the unauthenticated/unestablished-identity path required by the cross-tenant oracle clamp. The `AGENT_SUSPENDED` / `AGENT_BLOCKED` codes (per-agent commercial status) do NOT carry an explicit `scope` field — the code itself is the discriminator on those paths, mirroring `BILLING_NOT_PERMITTED_FOR_AGENT`.'
        ),
    ] = 'agent'
    reason: Annotated[
        Literal['sandbox_only'],
        Field(
            description='Registered per-agent provisioning gate that fired. `"sandbox_only"` — the agent is provisioned for sandbox traffic only and the request was against a non-sandbox account. New `reason` values MUST be added here (the enum is closed by `additionalProperties: false`) so cross-language SDKs can dispatch without parsing prose.'
        ),
    ] = 'sandbox_only'

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 model_config
var reason : Literal['sandbox_only']
var scope : Literal['agent']

Inherited members

class AnyOf (root: RootModelRootType = PydanticUndefined, **data)
Expand source code
class AnyOf(RootModel[AnyOf1 | AnyOf2]):
    root: Annotated[AnyOf1 | AnyOf2, Field(discriminator='kind')]
    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[AnyOf1, AnyOf2]]
  • pydantic.root_model.RootModel
  • pydantic.main.BaseModel
  • typing.Generic

Class variables

var model_config
var root : AnyOf1 | AnyOf2
class AnyOf1 (**data: Any)
Expand source code
class AnyOf1(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    kind: Literal['agent_url'] = 'agent_url'
    agent_url: Annotated[
        AnyUrl,
        Field(
            description='Exact canonical agent endpoint without userinfo, query, or fragment. Redirect targets, DNS aliases, and URLs asserted by the candidate do not satisfy this matcher.'
        ),
    ]

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 agent_url : pydantic.networks.AnyUrl
var kind : Literal['agent_url']
var model_config

Inherited members

class AnyOf2 (**data: Any)
Expand source code
class AnyOf2(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    kind: Literal['verification'] = 'verification'
    registry: Annotated[
        AnyUrl,
        Field(
            description='Seller-configured trusted verification registry without userinfo, query, or fragment. The candidate cannot supply or override this URL; fetches use the registry-resolution security contract.'
        ),
    ]
    role: Annotated[
        str,
        Field(
            description="Role asserted by the trusted registry's verified record, never by candidate self-description.",
            pattern='^[a-z][a-z0-9_-]*$',
        ),
    ]
    adcp_version: Annotated[
        str,
        Field(
            description='Registry protocol version in canonical MAJOR.MINOR form.',
            pattern='^(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)$',
        ),
    ]
    verification_modes: Annotated[list[VerificationMode], Field(min_length=1)]
    max_age_seconds: Annotated[
        SchemaInt,
        Field(
            description='Maximum age of the registry evidence at binding time. Zero requires a fresh result. Evidence is pinned to the accepted binding; later registry drift does not silently revoke an existing binding.',
            ge=0,
        ),
    ]

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 adcp_version : str
var kind : Literal['verification']
var max_age_seconds : int
var model_config
var registry : pydantic.networks.AnyUrl
var role : str
var verification_modes : list[VerificationMode]

Inherited members

class AudienceTooSmallDetails (**data: Any)
Expand source code
class AudienceTooSmallDetails(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    minimum_size: Annotated[
        StrictFloat | None, Field(description='Minimum audience size required')
    ] = None
    current_size: Annotated[StrictFloat | None, Field(description='Current audience size')] = 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 current_size : float | None
var minimum_size : float | None
var model_config

Inherited members

class AuthorizationRequiredDetails (**data: Any)
Expand source code
class AuthorizationRequiredDetails(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    required_connections: Annotated[
        list[downstream_connection_requirement.DownstreamConnectionRequirement] | None,
        Field(
            description='Complete set of downstream connections known to be required for the relevant product, format, or request.'
        ),
    ] = None
    missing_connections: Annotated[
        list[downstream_connection_requirement.DownstreamConnectionRequirement] | None,
        Field(
            description='Subset of downstream connections that blocked the current request. Sellers SHOULD populate this array when the caller needs to route a human through a connections flow. Entries with `status` of `missing`, `pending`, `expired`, or `revoked` MUST include either `provider` or `authorization_url` so the buyer can route the remediation unambiguously.'
        ),
    ] = None
    authorization_url: Annotated[
        AnyUrl | None,
        Field(
            description='General recovery URL when there is a single obvious authorization step or when the seller has its own connection-management page.'
        ),
    ] = None
    authorization_instructions: Annotated[
        str | None,
        Field(
            description='Human-readable recovery instructions. Use `missing_connections[].authorization_instructions` when instructions differ per downstream connection.'
        ),
    ] = None
    reference_authorization: Annotated[
        dict[str, Any] | None,
        Field(
            deprecated=True,
            description='Legacy or provider-specific authorization hint for the referenced object. Prefer `missing_connections[]` for new implementations.',
        ),
    ] = 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 authorization_instructions : str | None
var authorization_url : pydantic.networks.AnyUrl | None
var missing_connections : list[DownstreamConnectionRequirement] | None
var model_config
var reference_authorization : dict[str, typing.Any] | None
var required_connections : list[DownstreamConnectionRequirement] | None

Inherited members

class BillingNotPermittedForAgentDetails (**data: Any)
Expand source code
class BillingNotPermittedForAgentDetails(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    rejected_billing: Annotated[
        billing_party.BillingParty,
        Field(
            description='The `billing` value the seller rejected — echoed verbatim from the request for caller-side reconciliation.'
        ),
    ]
    suggested_billing: Annotated[
        billing_party.BillingParty | None,
        Field(
            description="A single billing value the calling buyer agent MAY retry with autonomously. Typically `operator` for passthrough-only agents. Sellers MAY omit this field when no retryable value exists for this agent's commercial relationship — in that case the rejection is terminal-pending-onboarding and the buyer MUST complete offline payments-relationship onboarding before any value other than the original request will succeed. Sellers MUST NOT populate this field with the full subset of values the agent may use; the field surfaces at most one canonical retry."
        ),
    ] = 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 model_config
var rejected_billing : BillingParty
var suggested_billing : BillingParty | None

Inherited members

class BillingNotSupportedDetails (**data: Any)
Expand source code
class BillingNotSupportedDetails(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    scope: Annotated[
        Scope | None,
        Field(
            description='Which gate fired. `"capability"` — the seller\'s `supported_billing` capability does not include the requested value (advice: choose from `supported_billing` and retry). `"account"` — the seller\'s capability accepts the value generally but not for the specific operator on this account (advice: try the next-most-permissive value the capability allows). Registered subset of the shared discriminator vocabulary in `enums/error-scope.json` — the per-agent scope is reserved for `BILLING_NOT_PERMITTED_FOR_AGENT` (which carries no explicit `scope` field) and for `PERMISSION_DENIED` with `error-details/agent-permission-denied.json`. Sellers MUST omit this field when the response is being returned to a caller whose agent identity has not been established (signed-request derivation or credential-to-agent mapping); see the uniform-response requirement in error-handling.mdx Billing and Account Setup.'
        ),
    ] = None
    supported_billing: Annotated[
        list[billing_party.BillingParty] | None,
        Field(
            description='Echoed copy of the seller\'s `supported_billing` capability for the caller\'s convenience — saves a `get_adcp_capabilities` round-trip when `scope` is `"capability"`. Sellers MAY omit this field; callers MUST treat absence as "call `get_adcp_capabilities`" rather than "any value is permitted."',
            min_length=1,
        ),
    ] = 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 model_config
var scope : Scope | None
var supported_billing : list[BillingParty] | None

Inherited members

class BillingParty (*args, **kwds)
Expand source code
class BillingParty(StrEnum):
    operator = 'operator'
    agent = 'agent'
    advertiser = 'advertiser'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var advertiser
var agent
var operator
class BrandKey (**data: Any)
Expand source code
class BrandKey(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    domain: Annotated[
        str,
        Field(
            description='Domain that hosts /.well-known/brand.json or is registered for the brand.',
            pattern='^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$',
        ),
    ]
    brand_id: Annotated[
        brand_id_1.BrandId | None,
        Field(
            description='Brand within a house-of-brands manifest. Omit for a single-brand domain.'
        ),
    ] = None
    countries: Annotated[
        list[Country] | None,
        Field(
            description='Canonical set of ISO 3166-1 alpha-2 countries for this advertiser identity. Omit when the identity is global or the house does not split the brand geographically. Array order is not meaningful; producers MUST sort codes lexicographically before computing keys or signatures. This qualifies account and proposal identity and is not delivery targeting.',
            min_length=1,
        ),
    ] = 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 brand_id : BrandId | None
var countries : list[Country] | None
var domain : str
var model_config

Inherited members

class BudgetTooLowDetails (**data: Any)
Expand source code
class BudgetTooLowDetails(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    minimum_budget: Annotated[
        StrictFloat | None, Field(description="Seller's minimum budget for this product")
    ] = None
    currency: Annotated[str | None, Field(description='ISO 4217 currency code')] = 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 currency : str | None
var minimum_budget : float | None
var model_config

Inherited members

class CanonicalAccountReference1 (**data: Any)
Expand source code
class CanonicalAccountReference1(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    account_id: Annotated[str, Field(min_length=1)]

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 account_id : str
var model_config

Inherited members

class CanonicalAccountReference2 (**data: Any)
Expand source code
class CanonicalAccountReference2(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    brand: brand_key.BrandKey
    operator: Annotated[
        str, Field(pattern='^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$')
    ]
    operator_unit: Annotated[
        operator_unit_1.OperatorUnit | None,
        Field(
            description='Optional operator-owned business unit, agency seat, or platform account. Only id participates in identity; name is mutable display metadata.'
        ),
    ] = None
    currency: Annotated[
        str | None,
        Field(
            description='Immutable ISO 4217 transaction currency when the advertiser object is currency-bound. When present, this is part of the natural key and all media buys on the account use it. Omit for per-media-buy currency selection.',
            pattern='^[A-Z]{3}$',
        ),
    ] = None
    timezone: Annotated[
        str | None,
        Field(
            description='Immutable account timezone. Include it in the natural key only for buyer-selected account_fixed provisioning.',
            min_length=1,
        ),
    ] = None
    sandbox: StrictBool | None = False

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 brand : BrandKey
var currency : str | None
var model_config
var operator : str
var operator_unit : OperatorUnit | None
var sandbox : bool | None
var timezone : str | None

Inherited members

class CatalogType (*args, **kwds)
Expand source code
class CatalogType(StrEnum):
    offering = 'offering'
    product = 'product'
    inventory = 'inventory'
    store = 'store'
    promotion = 'promotion'
    hotel = 'hotel'
    flight = 'flight'
    job = 'job'
    vehicle = 'vehicle'
    real_estate = 'real_estate'
    education = 'education'
    destination = 'destination'
    app = 'app'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var app
var destination
var education
var flight
var hotel
var inventory
var job
var offering
var product
var promotion
var real_estate
var store
var vehicle
class Code (*args, **kwds)
Expand source code
class Code(StrEnum):
    incompatible_format_kind = 'incompatible_format_kind'
    format_option_mismatch = 'format_option_mismatch'
    unsupported_delivery_type = 'unsupported_delivery_type'
    vast_version_mismatch = 'vast_version_mismatch'
    macro_unsupported = 'macro_unsupported'
    tracker_contract_mismatch = 'tracker_contract_mismatch'
    asset_requirement_failed = 'asset_requirement_failed'
    other = 'other'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var asset_requirement_failed
var format_option_mismatch
var incompatible_format_kind
var macro_unsupported
var other
var tracker_contract_mismatch
var unsupported_delivery_type
var vast_version_mismatch
class Codes (**data: Any)
Expand source code
class Codes(AdCPBaseModel):
    description: str
    recovery: Recovery

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 description : str
var model_config
var recovery : Recovery

Inherited members

class ConflictDetails (**data: Any)
Expand source code
class ConflictDetails(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    resource_id: Annotated[
        str | None, Field(description='Identifier of the conflicting resource')
    ] = None
    expected_version: Annotated[
        StrictFloat | str | None,
        Field(description='Version or ETag the client was operating against'),
    ] = None
    current_version: Annotated[
        StrictFloat | str | None, Field(description='Current version or ETag on the server')
    ] = 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 current_version : float | str | None
var expected_version : float | str | None
var model_config
var resource_id : str | None

Inherited members

class Connection (**data: Any)
Expand source code
class Connection(DownstreamConnectionRequirement):
    status: Annotated[
        Literal['unknown'],
        Field(
            description='Current seller-observed state for this downstream connection when known. Product declarations MAY omit status or use `unknown`; AUTHORIZATION_REQUIRED details SHOULD use `missing`, `expired`, or `revoked` for the connection that blocked the call.'
        ),
    ] = 'unknown'
    required_for: Annotated[
        list[RequiredForItem] | None,
        Field(
            description='Concrete AdCP protocol operation names that require this downstream connection. Sellers SHOULD include this in product declarations when the requirement is known ahead of time, and in AUTHORIZATION_REQUIRED details when it explains the failed operation. Prefer specific operation names such as `list_creatives`, `sync_creatives`, `create_media_buy`, `get_media_buy_delivery`, or `get_creative_delivery` over broad category labels such as `reporting`.'
        ),
    ] = 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 model_config
var required_for : list[RequiredForItem] | None
var status : Literal['unknown']

Inherited members

class ConnectionType (*args, **kwds)
Expand source code
class ConnectionType(StrEnum):
    advertiser_account = 'advertiser_account'
    publisher_identity = 'publisher_identity'
    post_authorization = 'post_authorization'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var advertiser_account
var post_authorization
var publisher_identity
class CreativeRejectedDetails (**data: Any)
Expand source code
class CreativeRejectedDetails(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    policy_id: Annotated[str | None, Field(description='Identifier for the violated policy')] = None
    policy_url: Annotated[
        AnyUrl | None, Field(description='URL where the full policy can be reviewed')
    ] = None
    reasons: Annotated[
        list[str] | None, Field(description='Specific reasons the creative was rejected')
    ] = 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 model_config
var policy_id : str | None
var policy_url : pydantic.networks.AnyUrl | None
var reasons : list[str] | None

Inherited members

class CreativeRepresentationUnresolvedDetails (**data: Any)
Expand source code
class CreativeRepresentationUnresolvedDetails(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    representation_rejections: Annotated[
        list[representation_rejection.RepresentationRejection], Field(min_length=1)
    ]

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 model_config
var representation_rejections : list[RepresentationRejection]

Inherited members

class CreativeRevisionContentMismatchDetails (**data: Any)
Expand source code
class CreativeRevisionContentMismatchDetails(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    creative_id: Annotated[str, Field(min_length=1)]
    revision_id: creative_revision_id.CreativeRevisionId

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 creative_id : str
var model_config
var revision_id : CreativeRevisionId

Inherited members

class DocumentRole (*args, **kwds)
Expand source code
class DocumentRole(StrEnum):
    submitted = 'submitted'
    wrapper = 'wrapper'
    terminal_inline = 'terminal_inline'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var submitted
var terminal_inline
var wrapper
class DownstreamConnectionRequirement (**data: Any)
Expand source code
class DownstreamConnectionRequirement(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    provider: Annotated[
        str | None,
        Field(
            description='Stable provider or platform namespace, preferably lowercase. Examples: `social.example`, `shortvideo.example`, or a seller-defined namespace. Omit only when the requirement is provider-agnostic, or when an `authorization_url` fully routes the human to the correct provider-specific connection flow.'
        ),
    ] = None
    connection_type: Annotated[
        ConnectionType,
        Field(
            description='Kind of downstream connection required. `advertiser_account` is the platform account used to buy/manage ads. `publisher_identity` is the creator, page, channel, organization, or profile that owns source posts. `post_authorization` is a post-scoped grant when the platform authorizes individual posts instead of, or in addition to, the owning identity.'
        ),
    ]
    required_for: Annotated[
        list[RequiredForItem] | None,
        Field(
            description='Concrete AdCP protocol operation names that require this downstream connection. Sellers SHOULD include this in product declarations when the requirement is known ahead of time, and in AUTHORIZATION_REQUIRED details when it explains the failed operation. Prefer specific operation names such as `list_creatives`, `sync_creatives`, `create_media_buy`, `get_media_buy_delivery`, or `get_creative_delivery` over broad category labels such as `reporting`.'
        ),
    ] = None
    scope: Annotated[Scope | None, Field(description='Granularity of the downstream grant.')] = None
    status: Annotated[
        Status | None,
        Field(
            description='Current seller-observed state for this downstream connection when known. Product declarations MAY omit status or use `unknown`; AUTHORIZATION_REQUIRED details SHOULD use `missing`, `expired`, or `revoked` for the connection that blocked the call.'
        ),
    ] = None
    connection_id: Annotated[
        str | None,
        Field(
            description='Seller-defined identifier for an already-created downstream connection. Omit when no connection exists yet or when exposing it would leak platform/account state.'
        ),
    ] = None
    resource_ref: Annotated[
        ResourceRef | None,
        Field(
            description='Optional opaque provider-native resource hint, such as a platform account id, profile URL, handle, channel id, post id, or post URL. This is a hint for routing authorization, not proof that authorization exists.'
        ),
    ] = None
    authorization_url: Annotated[
        AnyUrl | None,
        Field(
            description='Seller-hosted or provider-hosted URL where a human can complete or restore this downstream connection.'
        ),
    ] = None
    authorization_instructions: Annotated[
        str | None,
        Field(
            description='Human-readable instructions for completing or restoring this downstream connection.'
        ),
    ] = None
    expires_at: Annotated[
        AwareDatetime | None,
        Field(description='Expiration time for the downstream grant, when known.'),
    ] = 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

Subclasses

Class variables

var authorization_instructions : str | None
var authorization_url : pydantic.networks.AnyUrl | None
var connection_id : str | None
var connection_type : ConnectionType
var expires_at : pydantic.types.AwareDatetime | None
var model_config
var provider : str | None
var required_for : list[RequiredForItem] | None
var resource_ref : ResourceRef | None
var scope : Scope | None
var status : Status | None

Inherited members

class EnvelopeField (value: Any = <object object>, *, root: Any = <object object>)
Expand source code
class EnvelopeField(ScalarStr):
    __slots__ = ()
    _constraints = {'min_length': 1}
    _json_schema_extra = {
        'description': 'Buyer-visible request field path or paths that breached the accepted commercial envelope. Values MUST NOT name seller-internal objects or identifiers. New emitters SHOULD use the array form even for one path; the scalar form remains valid for compatibility with existing 3.x sellers.',
    }

A str generated from a JSON Schema string root.

Ancestors

  • adcp.types._scalar.ScalarStr
  • adcp.types._scalar._ScalarRoot
  • builtins.str
class EnvelopeField1 (root: RootModelRootType = PydanticUndefined, **data)
Expand source code
class EnvelopeField1(RootModel[list[EnvelopeField1Item]]):
    root: Annotated[
        list[EnvelopeField1Item],
        Field(
            description='Buyer-visible request field path or paths that breached the accepted commercial envelope. Values MUST NOT name seller-internal objects or identifiers. New emitters SHOULD use the array form even for one path; the scalar form remains valid for compatibility with existing 3.x sellers.',
            min_length=1,
        ),
    ]

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[list[EnvelopeField1Item]]
  • pydantic.root_model.RootModel
  • pydantic.main.BaseModel
  • typing.Generic

Class variables

var model_config
var root : list[EnvelopeField1Item]
class EnvelopeField1Item (value: Any = <object object>, *, root: Any = <object object>)
Expand source code
class EnvelopeField1Item(ScalarStr):
    __slots__ = ()
    _constraints = {'min_length': 1}

A str generated from a JSON Schema string root.

Ancestors

  • adcp.types._scalar.ScalarStr
  • adcp.types._scalar._ScalarRoot
  • builtins.str
class EventType (*args, **kwds)
Expand source code
class EventType(StrEnum):
    page_view = 'page_view'
    view_content = 'view_content'
    select_content = 'select_content'
    select_item = 'select_item'
    search = 'search'
    share = 'share'
    add_to_cart = 'add_to_cart'
    remove_from_cart = 'remove_from_cart'
    viewed_cart = 'viewed_cart'
    add_to_wishlist = 'add_to_wishlist'
    initiate_checkout = 'initiate_checkout'
    add_payment_info = 'add_payment_info'
    purchase = 'purchase'
    refund = 'refund'
    lead = 'lead'
    qualify_lead = 'qualify_lead'
    close_convert_lead = 'close_convert_lead'
    disqualify_lead = 'disqualify_lead'
    complete_registration = 'complete_registration'
    subscribe = 'subscribe'
    follow = 'follow'
    content_view = 'content_view'
    watch_milestone = 'watch_milestone'
    start_trial = 'start_trial'
    app_install = 'app_install'
    app_launch = 'app_launch'
    contact = 'contact'
    schedule = 'schedule'
    donate = 'donate'
    submit_application = 'submit_application'
    custom = 'custom'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var add_payment_info
var add_to_cart
var add_to_wishlist
var app_install
var app_launch
var close_convert_lead
var complete_registration
var contact
var content_view
var custom
var disqualify_lead
var donate
var follow
var initiate_checkout
var lead
var page_view
var purchase
var qualify_lead
var refund
var remove_from_cart
var schedule
var search
var select_content
var select_item
var share
var start_trial
var submit_application
var subscribe
var view_content
var viewed_cart
var watch_milestone
class ExecutionRequirementUnmetDetails (**data: Any)
Expand source code
class ExecutionRequirementUnmetDetails(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    unmet_requirements: Annotated[list[UnmetRequirement], Field(min_length=1)]

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 model_config
var unmet_requirements : list[UnmetRequirement]

Inherited members

class ExtensionObject (**data: Any)
Expand source code
class ExtensionObject(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )

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 model_config

Inherited members

class FailureKind (*args, **kwds)
Expand source code
class FailureKind(StrEnum):
    alt_text_missing = 'alt_text_missing'
    contrast_ratio_insufficient = 'contrast_ratio_insufficient'
    captions_missing = 'captions_missing'
    transcript_missing = 'transcript_missing'
    keyboard_navigation_failure = 'keyboard_navigation_failure'
    focus_order_invalid = 'focus_order_invalid'
    aria_label_missing = 'aria_label_missing'
    other = 'other'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var alt_text_missing
var aria_label_missing
var captions_missing
var contrast_ratio_insufficient
var focus_order_invalid
var keyboard_navigation_failure
var other
var transcript_missing
class FailureKind1 (value: Any = <object object>, *, root: Any = <object object>)
Expand source code
class FailureKind1(ScalarStr):
    __slots__ = ()
    _constraints = {'max_length': 64, 'pattern': '^x_[a-z0-9]+(?:_[a-z0-9]+)*$'}
    _json_schema_extra = {
        'description': 'Diagnostic failure category. Canonical values cover common portable cases. Vendor-local extensions use an x_ prefix. Portable recovery dispatches on criterion_source plus criterion after validating this details schema; failure_kind may refine diagnostics but does not select the recovery class.',
    }

A str generated from a JSON Schema string root.

Ancestors

  • adcp.types._scalar.ScalarStr
  • adcp.types._scalar._ScalarRoot
  • builtins.str
class FormatOptionReference1 (**data: Any)
Expand source code
class FormatOptionReference1(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    scope: Annotated[
        Literal['publisher'],
        Field(
            description="Reference resolves against the named publisher's adagents.json top-level `formats[]` catalog."
        ),
    ] = 'publisher'
    publisher_domain: Annotated[
        str,
        Field(
            description='Publisher domain where the adagents.json declaring this format option is hosted.',
            pattern='^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$',
        ),
    ]
    format_option_id: Annotated[
        str,
        Field(
            description="Stable format option ID from the publisher's adagents.json top-level `formats[]`, matching a publisher-catalog-backed entry in the target product's `format_options[]`."
        ),
    ]

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 format_option_id : str
var model_config
var publisher_domain : str
var scope : Literal['publisher']

Inherited members

class FormatOptionReference2 (**data: Any)
Expand source code
class FormatOptionReference2(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    scope: Annotated[
        Literal['product'],
        Field(
            description="Reference resolves only against the target product's inline `format_options[]`."
        ),
    ] = 'product'
    format_option_id: Annotated[
        str,
        Field(
            description="Stable format option ID from the target product's inline `format_options[]`."
        ),
    ]
    publisher_domain: Any | 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 format_option_id : str
var model_config
var publisher_domain : typing.Any | None
var scope : Literal['product']

Inherited members

class GovernanceAgentNotAcceptedDetails1 (**data: Any)
Expand source code
class GovernanceAgentNotAcceptedDetails1(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    disclosure: Literal['disclosed'] = 'disclosed'
    attempted_agent_origin: Annotated[
        AnyUrl,
        Field(
            description='Parsed HTTPS origin only. The seller MUST strip userinfo, path, query, and fragment and MUST NOT echo the raw candidate URL.'
        ),
    ]
    accepted_governance_agents: accepted_governance_agents_1.AcceptedGovernanceAgents

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 accepted_governance_agents : AcceptedGovernanceAgents
var attempted_agent_origin : pydantic.networks.AnyUrl
var disclosure : Literal['disclosed']
var model_config

Inherited members

class GovernanceAgentNotAcceptedDetails2 (**data: Any)
Expand source code
class GovernanceAgentNotAcceptedDetails2(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    disclosure: Literal['opaque'] = 'opaque'
    rejection_ref: Annotated[
        str | None,
        Field(
            description='Optional seller-local correlation reference. It does not identify or reveal an acceptance rule.',
            max_length=128,
            pattern='^[A-Za-z0-9_.:-]+$',
        ),
    ] = 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 disclosure : Literal['opaque']
var model_config
var rejection_ref : str | None

Inherited members

class Kind (*args, **kwds)
Expand source code
class Kind(StrEnum):
    none = 'none'
    rfc3986 = 'rfc3986'
    iab_vast_uri = 'iab_vast_uri'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var iab_vast_uri
var none
var rfc3986
class MacroDialectFamily (*args, **kwds)
Expand source code
class MacroDialectFamily(StrEnum):
    adcp = 'adcp'
    iab_vast = 'iab_vast'
    iab_daast = 'iab_daast'
    vendor = 'vendor'
    unknown = 'unknown'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var adcp
var iab_daast
var iab_vast
var unknown
var vendor
class MacroEncoding (**data: Any)
Expand source code
class MacroEncoding(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    kind: Kind
    depth: Annotated[SchemaInt, Field(ge=0)]

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 depth : int
var kind : Kind
var model_config

Inherited members

class MacroMappingStatus (*args, **kwds)
Expand source code
class MacroMappingStatus(StrEnum):
    verified_universal = 'verified_universal'
    dialect_defined = 'dialect_defined'
    unresolved = 'unresolved'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var dialect_defined
var unresolved
var verified_universal
class MacroProcessingActor (*args, **kwds)
Expand source code
class MacroProcessingActor(StrEnum):
    buyer = 'buyer'
    creative_agent = 'creative_agent'
    seller = 'seller'
    request_executor = 'request_executor'
    source_ad_server = 'source_ad_server'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var buyer
var creative_agent
var request_executor
var seller
var source_ad_server
class MacroProcessingOperation (*args, **kwds)
Expand source code
class MacroProcessingOperation(StrEnum):
    translate_to_native = 'translate_to_native'
    resolve_value = 'resolve_value'
    preserve = 'preserve'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var preserve
var resolve_value
var translate_to_native
class MacroResolutionFailedDetails (**data: Any)
Expand source code
class MacroResolutionFailedDetails(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    macro_resolution_results: Annotated[
        list[macro_resolution_result.MacroResolutionResult], Field(min_length=1)
    ]

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 macro_resolution_results : list[MacroResolutionResult]
var model_config

Inherited members

class MacroResolutionReason (*args, **kwds)
Expand source code
class MacroResolutionReason(StrEnum):
    capability_match = 'capability_match'
    preserved_unknown = 'preserved_unknown'
    preserved_for_downstream = 'preserved_for_downstream'
    dialect_unsupported = 'dialect_unsupported'
    namespace_mismatch = 'namespace_mismatch'
    revision_mismatch = 'revision_mismatch'
    semantic_unsupported = 'semantic_unsupported'
    operation_unsupported = 'operation_unsupported'
    resolver_mismatch = 'resolver_mismatch'
    context_unsupported = 'context_unsupported'
    encoding_unsupported = 'encoding_unsupported'
    ambiguous_mapping = 'ambiguous_mapping'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var ambiguous_mapping
var capability_match
var context_unsupported
var dialect_unsupported
var encoding_unsupported
var namespace_mismatch
var operation_unsupported
var preserved_for_downstream
var preserved_unknown
var resolver_mismatch
var revision_mismatch
var semantic_unsupported
class MacroResolutionResult (**data: Any)
Expand source code
class MacroResolutionResult(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    declaration_id: Annotated[str, Field(min_length=1)]
    asset_path: Annotated[
        str, Field(description='JSON Pointer to the asset carrying the declaration.', pattern='^/')
    ]
    token: Annotated[str, Field(min_length=1)]
    dialect: macro_dialect.MacroDialectFamily
    dialect_namespace: AnyUrl | None = None
    dialect_revision: Annotated[str | None, Field(min_length=1)] = None
    dialect_semantic: Annotated[str, Field(min_length=1)]
    mapping_status: macro_mapping_status.MacroMappingStatus
    universal_semantic: universal_macro.UniversalMacro | None = None
    operation: macro_processing_operation.MacroProcessingOperation
    performed_by: macro_resolver.MacroProcessingActor | None = None
    requested_encoding: macro_encoding.MacroEncoding
    required: StrictBool
    unavailable_behavior: UnavailableBehavior
    status: Status
    reason: macro_resolution_reason.MacroResolutionReason
    matched_encodings: Annotated[
        list[macro_encoding.MacroEncoding] | None,
        Field(description='Exact advertised profiles considered for this match, when relevant.'),
    ] = None
    message: Annotated[str | None, Field(min_length=1)] = 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 asset_path : str
var declaration_id : str
var dialect : MacroDialectFamily
var dialect_namespace : pydantic.networks.AnyUrl | None
var dialect_revision : str | None
var dialect_semantic : str
var mapping_status : MacroMappingStatus
var matched_encodings : list[MacroEncoding] | None
var message : str | None
var model_config
var operation : MacroProcessingOperation
var performed_by : MacroProcessingActor | None
var reason : MacroResolutionReason
var requested_encoding : MacroEncoding
var required : bool
var status : Status
var token : str
var unavailable_behavior : UnavailableBehavior
var universal_semantic : UniversalMacro | None

Inherited members

class MediaBuyActionMode (*args, **kwds)
Expand source code
class MediaBuyActionMode(StrEnum):
    self_serve = 'self_serve'
    conditional_self_serve = 'conditional_self_serve'
    seller_managed = 'seller_managed'
    requires_approval = 'requires_approval'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var conditional_self_serve
var requires_approval
var self_serve
var seller_managed
class MediaBuyAvailableAction (**data: Any)
Expand source code
class MediaBuyAvailableAction(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    action: Annotated[
        media_buy_available_action_id.MediaBuyAvailableActionId,
        Field(description='The action identifier.'),
    ]
    mode: Annotated[
        media_buy_action_mode.MediaBuyActionMode,
        Field(
            description='The single mode that applies right now on this buy for this action. Singular because the buy has a concrete state, exactly one mode applies. Buyer SDKs branch on this to decide whether to expect a synchronous response, conditional handling, or an asynchronous approval callback.'
        ),
    ]
    task: Annotated[
        Task | None,
        Field(
            description='Compact-lifecycle task for this resolved action: operational control, commercial refinement, or creative lifecycle mutation.'
        ),
    ] = None
    sla: Annotated[
        sla_window.SlaWindow | None,
        Field(
            description='Optional SLA commitment for this action on this buy. Absence means no commitment, not zero commitment.'
        ),
    ] = None
    change_term_id: media_buy_change_term_id.MediaBuyChangeTermId | None = None
    terms_ref: media_buy_legacy_terms_ref.MediaBuyTermsReference | None = None
    applicable_package_ids: Annotated[
        list[applicable_package_id.ApplicablePackageId] | None,
        Field(
            description='For a package-scoped action, the exact packages currently eligible. Omission means every relevant package. Root actions omit this field.',
            min_length=1,
        ),
    ] = 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 action : MediaBuyValidAction | Literal['update_media_buy_frequency_cap']
var applicable_package_ids : list[ApplicablePackageId] | None
var change_term_id : MediaBuyChangeTermId | None
var mode : MediaBuyActionMode
var model_config
var sla : SlaWindow | None
var task : Task | None
var terms_ref : MediaBuyTermsReference | None

Inherited members

class MediaBuyValidAction (*args, **kwds)
Expand source code
class MediaBuyValidAction(StrEnum):
    pause = 'pause'
    resume = 'resume'
    cancel = 'cancel'
    update_name = 'update_name'
    extend_flight = 'extend_flight'
    shorten_flight = 'shorten_flight'
    update_flight_dates = 'update_flight_dates'
    increase_budget = 'increase_budget'
    decrease_budget = 'decrease_budget'
    reallocate_budget = 'reallocate_budget'
    update_budget_allocation = 'update_budget_allocation'
    update_targeting = 'update_targeting'
    update_pacing = 'update_pacing'
    update_bidding = 'update_bidding'
    update_frequency_caps = 'update_frequency_caps'
    replace_creative = 'replace_creative'
    update_creative_assignments = 'update_creative_assignments'
    remove_creative = 'remove_creative'
    add_packages = 'add_packages'
    remove_packages = 'remove_packages'
    update_budget = 'update_budget'
    update_dates = 'update_dates'
    update_packages = 'update_packages'
    sync_creatives = 'sync_creatives'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var add_packages
var cancel
var decrease_budget
var extend_flight
var increase_budget
var pause
var reallocate_budget
var remove_creative
var remove_packages
var replace_creative
var resume
var shorten_flight
var sync_creatives
var update_bidding
var update_budget
var update_budget_allocation
var update_creative_assignments
var update_dates
var update_flight_dates
var update_frequency_caps
var update_name
var update_pacing
var update_packages
var update_targeting
class MismatchReason (*args, **kwds)
Expand source code
class MismatchReason(StrEnum):
    asset_outside_acceptance = 'asset_outside_acceptance'
    document_version_mismatch = 'document_version_mismatch'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var asset_outside_acceptance
var document_version_mismatch
class OperatorUnit (**data: Any)
Expand source code
class OperatorUnit(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    id: Annotated[
        str,
        Field(
            description='Stable identifier assigned by the operator. Numeric platform IDs and durable slugs are both valid. Scoped by the enclosing operator domain.',
            max_length=255,
            min_length=1,
            pattern='^[A-Za-z0-9][A-Za-z0-9._:/-]*$',
        ),
    ]
    name: Annotated[
        str | None,
        Field(
            description='Human-readable seat or business-unit name, such as Nova EMEA. This label may change and is not part of the natural account key.',
            max_length=200,
            min_length=1,
        ),
    ] = 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 id : str
var model_config
var name : str | None

Inherited members

class Origin (*args, **kwds)
Expand source code
class Origin(StrEnum):
    buyer_plan = 'buyer_plan'
    registry = 'registry'
    seller = 'seller'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var buyer_plan
var registry
var seller
class OriginalError (**data: Any)
Expand source code
class OriginalError(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    code: Annotated[
        str | None,
        Field(
            description="Error code from the underlying failure, e.g., SERVICE_UNAVAILABLE, or a transport-level identifier like 'TIMEOUT' / 'CONNECTION_REFUSED' when the underlying call did not produce an AdCP error code."
        ),
    ] = None
    message: Annotated[
        str | None,
        Field(
            description="Short human-readable description of the underlying failure (e.g., 'Connection timeout after 20s'). MUST NOT include credentials, internal hostnames, or stack traces."
        ),
    ] = 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 code : str | None
var message : str | None
var model_config

Inherited members

class PolicyViolationDetails (**data: Any)
Expand source code
class PolicyViolationDetails(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    origin: Annotated[
        Origin | None,
        Field(
            description='Whose policy produced the rejection. Optional so undisclosed seller policies can return only the typed POLICY_VIOLATION code if even origin would reveal sensitive information.'
        ),
    ] = None
    policy_id: Annotated[
        str | None,
        Field(
            description='Shared policy-registry identifier for the violated policy. Use seller_policy_ref instead when the seller is not disclosing a registry policy.'
        ),
    ] = None
    seller_policy_ref: Annotated[
        str | None,
        Field(
            description='Opaque seller-scoped reference that lets support and audit records correlate an undisclosed policy without publishing its rules. This is not a shared policy-registry ID.',
            min_length=1,
        ),
    ] = None
    policy_url: Annotated[
        AnyUrl | None, Field(description='URL where the full policy can be reviewed')
    ] = None
    violated_rules: Annotated[
        list[str] | None, Field(description='Specific rules that were violated')
    ] = None
    category: Annotated[
        str | None,
        Field(
            description="Optional coarse policy category disclosed at the seller's discretion.",
            pattern='^[a-z][a-z0-9_]*$',
        ),
    ] = 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 category : str | None
var model_config
var origin : Origin | None
var policy_id : str | None
var policy_url : pydantic.networks.AnyUrl | None
var seller_policy_ref : str | None
var violated_rules : list[str] | None

Inherited members

class ProductExecutionRequirement1 (**data: Any)
Expand source code
class ProductExecutionRequirement1(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    kind: Literal['event_source'] = 'event_source'
    event_types: Annotated[
        list[event_type.EventType] | None,
        Field(
            description='Event types that satisfy the requirement (any-of): the satisfying `event_sources[]` entry MUST use one of these `event_type` values. Omit when any event type satisfies it.',
            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 event_types : list[EventType] | None
var ext : ExtensionObject | None
var kind : Literal['event_source']
var model_config

Inherited members

class ProductExecutionRequirement2 (**data: Any)
Expand source code
class ProductExecutionRequirement2(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    kind: Literal['catalog'] = 'catalog'
    catalog_types: Annotated[
        list[catalog_type.CatalogType],
        Field(
            description='Catalog types that satisfy the requirement (any-of). One catalog of any listed type satisfies it.',
            min_length=1,
        ),
    ]
    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 catalog_types : list[CatalogType]
var ext : ExtensionObject | None
var kind : Literal['catalog']
var model_config

Inherited members

class ProductExecutionRequirement3 (**data: Any)
Expand source code
class ProductExecutionRequirement3(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    kind: Literal['downstream_connection'] = 'downstream_connection'
    connection: Annotated[
        Connection,
        Field(
            description='The required connection. Account-independent: `status` is omitted or `unknown`; `resource_ref`, `connection_id`, and `expires_at` MUST be omitted; `required_for`, when present, includes `create_media_buy`.'
        ),
    ]
    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 connection : Connection
var ext : ExtensionObject | None
var kind : Literal['downstream_connection']
var model_config

Inherited members

class RateLimitedDetails (**data: Any)
Expand source code
class RateLimitedDetails(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    limit: Annotated[
        StrictFloat | None, Field(description='Maximum requests allowed in the window')
    ] = None
    remaining: Annotated[
        StrictFloat | None, Field(description='Requests remaining in the current window')
    ] = None
    window_seconds: Annotated[
        StrictFloat | None, Field(description='Duration of the rate-limit window in seconds')
    ] = None
    scope: Annotated[Scope | None, Field(description='What the limit applies to')] = 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 limit : float | None
var model_config
var remaining : float | None
var scope : Scope | None
var window_seconds : float | None

Inherited members

class Reason (*args, **kwds)
Expand source code
class Reason(StrEnum):
    not_bound = 'not_bound'
    not_found = 'not_found'
    ineligible = 'ineligible'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var ineligible
var not_bound
var not_found
class Recovery (*args, **kwds)
Expand source code
class Recovery(StrEnum):
    transient = 'transient'
    correctable = 'correctable'
    terminal = 'terminal'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var correctable
var terminal
var transient
class RepresentationRejection (**data: Any)
Expand source code
class RepresentationRejection(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    representation_id: Annotated[str, Field(min_length=1)]
    code: Code
    message: Annotated[str, Field(min_length=1)]
    details: dict[str, Any] | 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 code : Code
var details : dict[str, typing.Any] | None
var message : str
var model_config
var representation_id : str

Inherited members

class RequoteRequiredDetails (**data: Any)
Expand source code
class RequoteRequiredDetails(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    envelope_field: Annotated[
        EnvelopeField | EnvelopeField1 | None,
        Field(
            description='Buyer-visible request field path or paths that breached the accepted commercial envelope. Values MUST NOT name seller-internal objects or identifiers. New emitters SHOULD use the array form even for one path; the scalar form remains valid for compatibility with existing 3.x sellers.'
        ),
    ] = None
    change_term_id: Annotated[
        media_buy_change_term_id.MediaBuyChangeTermId | None,
        Field(
            description='Accepted proposal change term whose typed constraint the request exceeded.'
        ),
    ] = None
    decline_reason: Annotated[
        seller_policy_decline_reason.SellerPolicyDeclineReason | None,
        Field(
            description='Coarse seller-policy dimension that declined the requested shape. Sellers SHOULD populate this when they have a structured reason and disclosure does not expose private thresholds or enforcement controls. When present, it MUST be consistent with the enclosing error.recovery classification.'
        ),
    ] = 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 change_term_id : MediaBuyChangeTermId | None
var decline_reason : SellerPolicyDeclineReason | None
var envelope_field : EnvelopeField | EnvelopeField1 | None
var model_config

Inherited members

class ResourceRef (**data: Any)
Expand source code
class ResourceRef(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    platform_account_id: Annotated[
        str | None,
        Field(
            description='Provider-native advertiser or business account id, when safe to disclose.'
        ),
    ] = None
    identity_id: Annotated[
        str | None,
        Field(
            description='Provider-native creator, page, channel, organization, or profile id, when safe to disclose.'
        ),
    ] = None
    handle: Annotated[
        str | None,
        Field(description='Provider-native public handle for the owning identity, when available.'),
    ] = None
    profile_url: Annotated[
        AnyUrl | None, Field(description='Public URL for the owning identity, when available.')
    ] = None
    post_id: Annotated[
        str | None,
        Field(
            description='Provider-native post id, when the grant is post-scoped or the failed request referenced a specific post.'
        ),
    ] = None
    post_url: Annotated[
        AnyUrl | None, Field(description='Public URL for the referenced post, when available.')
    ] = 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 handle : str | None
var identity_id : str | None
var model_config
var platform_account_id : str | None
var post_id : str | None
var post_url : pydantic.networks.AnyUrl | None
var profile_url : pydantic.networks.AnyUrl | None

Inherited members

class ScopeFromBillingNotSupported (*args, **kwds)
Expand source code
class Scope(StrEnum):
    capability = 'capability'
    account = 'account'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var account
var capability
class ScopeFromDownstreamConnectionRequirement (*args, **kwds)
Expand source code
class Scope(StrEnum):
    account = 'account'
    identity = 'identity'
    post = 'post'
    unknown = 'unknown'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var account
var identity
var post
var unknown
class ScopeFromRateLimited (*args, **kwds)
Expand source code
class Scope(StrEnum):
    account = 'account'
    tool = 'tool'
    global_ = 'global'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var account
var global_
var tool
class SellerPolicyDeclineReason (*args, **kwds)
Expand source code
class SellerPolicyDeclineReason(StrEnum):
    inventory = 'inventory'
    share_of_voice = 'share_of_voice'
    minimum_commitment = 'minimum_commitment'
    notice_period = 'notice_period'
    contract_terms = 'contract_terms'
    frequency_cap = 'frequency_cap'
    other = 'other'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var contract_terms
var frequency_cap
var inventory
var minimum_commitment
var notice_period
var other
var share_of_voice
class SlaWindow (**data: Any)
Expand source code
class SlaWindow(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
        regex_engine="python-re",
    )
    response_max: Annotated[
        str | None,
        Field(
            description='Maximum elapsed time from when the buyer issues the action to when the seller acknowledges receipt (mode-appropriate: synchronous response for self_serve, tolerance decision for conditional_self_serve, or queue acknowledgement for seller_managed and legacy requires_approval). Sellers include weekends and non-working periods in the maximum. ISO 8601 duration.',
            examples=['PT5M', 'PT4H', 'P1D'],
            pattern='^P(?!$)(\\d+Y)?(\\d+M)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$',
        ),
    ] = None
    completion_max: Annotated[
        str | None,
        Field(
            description='Maximum elapsed time from buyer issuing the action to the seller completing it (mutation applied, proposal finalized, or seller-managed decision resolved). Sellers include weekends and non-working periods in the maximum. ISO 8601 duration.',
            examples=['PT1H', 'PT24H', 'P2D'],
            pattern='^P(?!$)(\\d+Y)?(\\d+M)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$',
        ),
    ] = 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 completion_max : str | None
var model_config
var response_max : str | None

Inherited members

class StaleResponseDetails (**data: Any)
Expand source code
class StaleResponseDetails(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    served_from_cache: Annotated[
        Literal[True],
        Field(
            description='Always true for STALE_RESPONSE. Acts as a positive shape sentinel so consumers can validate the details payload matches the code.'
        ),
    ]
    cache_age_seconds: Annotated[
        SchemaInt,
        Field(
            description='Age of the cached payload in seconds at the time of the response. Informational — buyer agents MAY use this to decide whether to immediately retry for fresh data or accept the cached value.',
            ge=0,
        ),
    ]
    freshness_target_seconds: Annotated[
        SchemaInt | None,
        Field(
            description="The seller's freshness target for this surface, in seconds. `cache_age_seconds - freshness_target_seconds` is how far beyond target the cached entry is. Optional — sellers MAY omit when no public freshness contract is declared.",
            ge=0,
        ),
    ] = None
    upstream: Annotated[
        Upstream | None,
        Field(
            description='Identifies the upstream or sub-agent whose fetch failed and triggered cache fallback. When N upstreams are stale, the seller emits N separate STALE_RESPONSE entries (one per upstream) rather than aggregating into a single entry — mirrors the per-asset advisory precedent set by PIXEL_TRACKER_LOSSY_DOWNGRADE.'
        ),
    ] = None
    original_error: Annotated[
        OriginalError | None,
        Field(
            description='Minimal subset of the underlying failure that triggered cache fallback. Sellers MUST NOT include internal stack traces, credentials, or connection strings.'
        ),
    ] = 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 cache_age_seconds : int
var freshness_target_seconds : int | None
var model_config
var original_error : OriginalError | None
var served_from_cache : Literal[True]
var upstream : Upstream | None

Inherited members

class StatusFromDownstreamConnectionRequirement (*args, **kwds)
Expand source code
class Status(StrEnum):
    connected = 'connected'
    missing = 'missing'
    pending = 'pending'
    expired = 'expired'
    revoked = 'revoked'
    not_required = 'not_required'
    unknown = 'unknown'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var connected
var expired
var missing
var not_required
var pending
var revoked
var unknown
class StatusFromMacroResolutionResult (*args, **kwds)
Expand source code
class Status(StrEnum):
    resolvable = 'resolvable'
    preserved_for_downstream = 'preserved_for_downstream'
    unsupported = 'unsupported'
    ambiguous = 'ambiguous'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var ambiguous
var preserved_for_downstream
var resolvable
var unsupported
class SupportedDimension (value: Any = <object object>, *, root: Any = <object object>)
Expand source code
class SupportedDimension(ScalarStr):
    __slots__ = ()
    _constraints = {'min_length': 1}

A str generated from a JSON Schema string root.

Ancestors

  • adcp.types._scalar.ScalarStr
  • adcp.types._scalar._ScalarRoot
  • builtins.str
class SupportedMajor (value: Any = <object object>, *, root: Any = <object object>)
Expand source code
class SupportedMajor(ScalarInt):
    __slots__ = ()
    _constraints = {'ge': 1}

An int generated from a JSON Schema integer root.

Validates the way SchemaInt validates an integer field: strict, so "1" and True are refused, with a float carrying no fractional part narrowed to int because JSON Schema counts it as one.

Ancestors

  • adcp.types._scalar.ScalarInt
  • adcp.types._scalar._ScalarRoot
  • builtins.int
class SupportedVersion (value: Any = <object object>, *, root: Any = <object object>)
Expand source code
class SupportedVersion(ScalarStr):
    __slots__ = ()
    _constraints = {
        'pattern': '^(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-[a-zA-Z0-9](?:[a-zA-Z0-9.-]*[a-zA-Z0-9])?)?$',
    }

A str generated from a JSON Schema string root.

Ancestors

  • adcp.types._scalar.ScalarStr
  • adcp.types._scalar._ScalarRoot
  • builtins.str
class Task (*args, **kwds)
Expand source code
class Task(StrEnum):
    control_media_buy = 'control_media_buy'
    refine_proposals = 'refine_proposals'
    sync_creatives = 'sync_creatives'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var control_media_buy
var refine_proposals
var sync_creatives
class UnavailableBehavior (*args, **kwds)
Expand source code
class UnavailableBehavior(StrEnum):
    preserve = 'preserve'
    omit_parameter = 'omit_parameter'
    dialect_sentinel = 'dialect_sentinel'
    reject = 'reject'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var dialect_sentinel
var omit_parameter
var preserve
var reject
class UniversalMacro (*args, **kwds)
Expand source code
class UniversalMacro(StrEnum):
    MEDIA_BUY_ID = 'MEDIA_BUY_ID'
    PACKAGE_ID = 'PACKAGE_ID'
    CREATIVE_ID = 'CREATIVE_ID'
    CACHEBUSTER = 'CACHEBUSTER'
    TIMESTAMP = 'TIMESTAMP'
    CLICK_URL = 'CLICK_URL'
    GDPR = 'GDPR'
    GDPR_CONSENT = 'GDPR_CONSENT'
    US_PRIVACY = 'US_PRIVACY'
    GPP_STRING = 'GPP_STRING'
    GPP_SID = 'GPP_SID'
    IP_ADDRESS = 'IP_ADDRESS'
    LIMIT_AD_TRACKING = 'LIMIT_AD_TRACKING'
    DEVICE_TYPE = 'DEVICE_TYPE'
    OS = 'OS'
    OS_VERSION = 'OS_VERSION'
    DEVICE_MAKE = 'DEVICE_MAKE'
    DEVICE_MODEL = 'DEVICE_MODEL'
    USER_AGENT = 'USER_AGENT'
    APP_BUNDLE = 'APP_BUNDLE'
    APP_NAME = 'APP_NAME'
    COUNTRY = 'COUNTRY'
    REGION = 'REGION'
    CITY = 'CITY'
    ZIP = 'ZIP'
    DMA = 'DMA'
    LAT = 'LAT'
    LONG = 'LONG'
    DEVICE_ID = 'DEVICE_ID'
    DEVICE_ID_TYPE = 'DEVICE_ID_TYPE'
    DOMAIN = 'DOMAIN'
    PAGE_URL = 'PAGE_URL'
    REFERRER = 'REFERRER'
    KEYWORDS = 'KEYWORDS'
    PLACEMENT_ID = 'PLACEMENT_ID'
    FOLD_POSITION = 'FOLD_POSITION'
    AD_WIDTH = 'AD_WIDTH'
    AD_HEIGHT = 'AD_HEIGHT'
    VIDEO_ID = 'VIDEO_ID'
    VIDEO_TITLE = 'VIDEO_TITLE'
    VIDEO_DURATION = 'VIDEO_DURATION'
    VIDEO_CATEGORY = 'VIDEO_CATEGORY'
    CONTENT_GENRE = 'CONTENT_GENRE'
    CONTENT_RATING = 'CONTENT_RATING'
    PLAYER_WIDTH = 'PLAYER_WIDTH'
    PLAYER_HEIGHT = 'PLAYER_HEIGHT'
    POD_POSITION = 'POD_POSITION'
    POD_SIZE = 'POD_SIZE'
    AD_BREAK_ID = 'AD_BREAK_ID'
    STATION_ID = 'STATION_ID'
    COLLECTION_NAME = 'COLLECTION_NAME'
    INSTALLMENT_ID = 'INSTALLMENT_ID'
    AUDIO_DURATION = 'AUDIO_DURATION'
    TMPX = 'TMPX'
    IMPRESSION_ID = 'IMPRESSION_ID'
    AXEM = 'AXEM'
    CATALOG_ID = 'CATALOG_ID'
    SKU = 'SKU'
    GTIN = 'GTIN'
    OFFERING_ID = 'OFFERING_ID'
    JOB_ID = 'JOB_ID'
    HOTEL_ID = 'HOTEL_ID'
    FLIGHT_ID = 'FLIGHT_ID'
    VEHICLE_ID = 'VEHICLE_ID'
    LISTING_ID = 'LISTING_ID'
    STORE_ID = 'STORE_ID'
    PROGRAM_ID = 'PROGRAM_ID'
    DESTINATION_ID = 'DESTINATION_ID'
    CREATIVE_VARIANT_ID = 'CREATIVE_VARIANT_ID'
    APP_ITEM_ID = 'APP_ITEM_ID'
    ITEM_NAME = 'ITEM_NAME'
    ITEM_DESCRIPTION = 'ITEM_DESCRIPTION'
    ITEM_TAGLINE = 'ITEM_TAGLINE'
    ITEM_PRICE = 'ITEM_PRICE'
    ITEM_PRICE_CURRENCY = 'ITEM_PRICE_CURRENCY'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var AD_BREAK_ID
var AD_HEIGHT
var AD_WIDTH
var APP_BUNDLE
var APP_ITEM_ID
var APP_NAME
var AUDIO_DURATION
var AXEM
var CACHEBUSTER
var CATALOG_ID
var CITY
var CLICK_URL
var COLLECTION_NAME
var CONTENT_GENRE
var CONTENT_RATING
var COUNTRY
var CREATIVE_ID
var CREATIVE_VARIANT_ID
var DESTINATION_ID
var DEVICE_ID
var DEVICE_ID_TYPE
var DEVICE_MAKE
var DEVICE_MODEL
var DEVICE_TYPE
var DMA
var DOMAIN
var FLIGHT_ID
var FOLD_POSITION
var GDPR
var GPP_SID
var GPP_STRING
var GTIN
var HOTEL_ID
var IMPRESSION_ID
var INSTALLMENT_ID
var IP_ADDRESS
var ITEM_DESCRIPTION
var ITEM_NAME
var ITEM_PRICE
var ITEM_PRICE_CURRENCY
var ITEM_TAGLINE
var JOB_ID
var KEYWORDS
var LAT
var LIMIT_AD_TRACKING
var LISTING_ID
var LONG
var MEDIA_BUY_ID
var OFFERING_ID
var OS
var OS_VERSION
var PACKAGE_ID
var PAGE_URL
var PLACEMENT_ID
var PLAYER_HEIGHT
var PLAYER_WIDTH
var POD_POSITION
var POD_SIZE
var PROGRAM_ID
var REFERRER
var REGION
var SKU
var STATION_ID
var STORE_ID
var TIMESTAMP
var TMPX
var USER_AGENT
var US_PRIVACY
var VEHICLE_ID
var VIDEO_CATEGORY
var VIDEO_DURATION
var VIDEO_ID
var VIDEO_TITLE
var ZIP
class UnmetRequirement (**data: Any)
Expand source code
class UnmetRequirement(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    product_id: Annotated[
        str, Field(description='Product whose requirement is unmet.', min_length=1)
    ]
    field: Annotated[
        str,
        Field(
            description='Request path where the resource binds, in the same JSONPath-lite form as `error.field`: `packages[i].optimization_goals` or `packages[i].catalogs` on `create_media_buy`; `new_packages[i].…` or `packages[i].…` on `update_media_buy`. For `not_found` and `ineligible`, sellers SHOULD point at the offending entry (for example `packages[0].optimization_goals[1].event_sources[0]` or `packages[0].catalogs[0]`).',
            min_length=1,
        ),
    ]
    reason: Annotated[
        Reason,
        Field(
            description='`not_bound`: the package does not reference a resource of this kind. `not_found`: the referenced resource is not available to the account (for example an `event_source_id` that was never registered through `sync_event_sources`); register or sync it, then retry. `ineligible`: the referenced resource exists but does not satisfy the requirement (for example an event type or catalog type the requirement does not list).'
        ),
    ]
    requirement: Annotated[
        product_execution_requirement.ProductExecutionRequirement,
        Field(
            description="The product's declared requirement, echoed so the buyer can fix the request without another `get_products` call."
        ),
    ]

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 field : str
var model_config
var product_id : str
var reason : Reason
var requirement : ProductExecutionRequirement1 | ProductExecutionRequirement2 | ProductExecutionRequirement3

Inherited members

class UnsupportedRefinementDimensionDetails (**data: Any)
Expand source code
class UnsupportedRefinementDimensionDetails(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    unsupported_dimension: Annotated[
        str,
        Field(
            description='The first typed revision dimension in the request that the seller does not support, named with the supported_dimensions vocabulary.',
            min_length=1,
        ),
    ]
    supported_dimensions: Annotated[
        list[SupportedDimension],
        Field(
            description="The seller's complete supported_dimensions declaration, echoed so the buyer can reconstruct a valid request. An empty array means ask-only refinement."
        ),
    ]

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 model_config
var supported_dimensions : list[SupportedDimension]
var unsupported_dimension : str

Inherited members

class Upstream (**data: Any)
Expand source code
class Upstream(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    url: Annotated[
        AnyUrl | None,
        Field(
            description='URL of the unreachable upstream, when the upstream is HTTP-addressable. Sellers MUST omit when the upstream is an internal (non-URL) dependency.'
        ),
    ] = None
    name: Annotated[
        str | None,
        Field(
            description="Human-readable identifier for the upstream, e.g., 'creative-agent-foo' or 'inventory-service'. Used when the upstream is internal or when the URL is not informative on its own."
        ),
    ] = 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 model_config
var name : str | None
var url : pydantic.networks.AnyUrl | None

Inherited members

class VastVersion (*args, **kwds)
Expand source code
class VastVersion(StrEnum):
    field_2_0 = '2.0'
    field_3_0 = '3.0'
    field_4_0 = '4.0'
    field_4_1 = '4.1'
    field_4_2 = '4.2'
    field_4_3 = '4.3'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var field_2_0
var field_3_0
var field_4_0
var field_4_1
var field_4_2
var field_4_3
class VastVersionMismatchDetails1 (**data: Any)
Expand source code
class VastVersionMismatchDetails1(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    mismatch_reason: Annotated[
        Literal['asset_outside_acceptance'],
        Field(description='Machine-readable modern mismatch branch.'),
    ] = 'asset_outside_acceptance'
    asset_vast_version: vast_version.VastVersion
    observed_document_vast_version: Annotated[
        str | None,
        Field(
            description='Raw version observed on the inspected VAST document whose root is being validated. `null` means the required version attribute was missing. This field is intentionally not limited to the governed supported-version enum so diagnostics can report future or invalid document values.',
            min_length=1,
        ),
    ] = None
    document_role: Annotated[
        DocumentRole | None,
        Field(
            description='Role of the inspected document. Only the submitted document is required to equal the asset declaration; wrapper and terminal documents are checked against the applicable acceptance sets.'
        ),
    ] = None
    product_vast_versions: Annotated[list[vast_version.VastVersion], Field(min_length=1)]
    seller_vast_versions: Annotated[list[vast_version.VastVersion], Field(min_length=1)]
    format_option_ref: Annotated[
        format_option_ref_1.FormatOptionReference | None,
        Field(
            description='Selected option reference when the product option is addressable. Omitted for a unique id-less product option.'
        ),
    ] = None
    supported_versions: Annotated[
        list[vast_version.VastVersion] | None,
        Field(
            deprecated=True,
            description='Deprecated 3.x compatibility field. For an acceptance mismatch, this is the effective product/seller intersection when known. Modern emitters use the typed sets and mismatch_reason.',
            min_length=1,
        ),
    ] = 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 asset_vast_version : VastVersion
var document_role : DocumentRole | None
var format_option_ref : FormatOptionReference1 | FormatOptionReference2 | None
var mismatch_reason : Literal['asset_outside_acceptance']
var model_config
var observed_document_vast_version : str | None
var product_vast_versions : list[VastVersion]
var seller_vast_versions : list[VastVersion]
var supported_versions : list[VastVersion] | None

Inherited members

class VastVersionMismatchDetails2 (**data: Any)
Expand source code
class VastVersionMismatchDetails2(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    mismatch_reason: Annotated[
        Literal['document_version_mismatch'],
        Field(description='Machine-readable modern mismatch branch.'),
    ] = 'document_version_mismatch'
    asset_vast_version: vast_version.VastVersion
    observed_document_vast_version: Annotated[
        str | None,
        Field(
            description='Raw version observed on the inspected VAST document whose root is being validated. `null` means the required version attribute was missing. This field is intentionally not limited to the governed supported-version enum so diagnostics can report future or invalid document values.',
            min_length=1,
        ),
    ]
    document_role: Annotated[
        DocumentRole,
        Field(
            description='Role of the inspected document. Only the submitted document is required to equal the asset declaration; wrapper and terminal documents are checked against the applicable acceptance sets.'
        ),
    ]
    product_vast_versions: Annotated[list[vast_version.VastVersion] | None, Field(min_length=1)] = (
        None
    )
    seller_vast_versions: Annotated[list[vast_version.VastVersion] | None, Field(min_length=1)] = (
        None
    )
    format_option_ref: Annotated[
        format_option_ref_1.FormatOptionReference | None,
        Field(
            description='Selected option reference when the product option is addressable. Omitted for a unique id-less product option.'
        ),
    ] = None
    supported_versions: Annotated[
        list[vast_version.VastVersion] | None,
        Field(
            deprecated=True,
            description='Deprecated 3.x compatibility field. For an acceptance mismatch, this is the effective product/seller intersection when known. Modern emitters use the typed sets and mismatch_reason.',
            min_length=1,
        ),
    ] = 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 asset_vast_version : VastVersion
var document_role : DocumentRole
var format_option_ref : FormatOptionReference1 | FormatOptionReference2 | None
var mismatch_reason : Literal['document_version_mismatch']
var model_config
var observed_document_vast_version : str | None
var product_vast_versions : list[VastVersion] | None
var seller_vast_versions : list[VastVersion] | None
var supported_versions : list[VastVersion] | None

Inherited members

class VastVersionMismatchDetails3 (**data: Any)
Expand source code
class VastVersionMismatchDetails3(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    mismatch_reason: Annotated[
        MismatchReason | None, Field(description='Machine-readable modern mismatch branch.')
    ] = None
    asset_vast_version: vast_version.VastVersion | None = None
    observed_document_vast_version: Annotated[
        str | None,
        Field(
            description='Raw version observed on the inspected VAST document whose root is being validated. `null` means the required version attribute was missing. This field is intentionally not limited to the governed supported-version enum so diagnostics can report future or invalid document values.',
            min_length=1,
        ),
    ] = None
    document_role: Annotated[
        DocumentRole | None,
        Field(
            description='Role of the inspected document. Only the submitted document is required to equal the asset declaration; wrapper and terminal documents are checked against the applicable acceptance sets.'
        ),
    ] = None
    product_vast_versions: Annotated[list[vast_version.VastVersion] | None, Field(min_length=1)] = (
        None
    )
    seller_vast_versions: Annotated[list[vast_version.VastVersion] | None, Field(min_length=1)] = (
        None
    )
    format_option_ref: Annotated[
        format_option_ref_1.FormatOptionReference | None,
        Field(
            description='Selected option reference when the product option is addressable. Omitted for a unique id-less product option.'
        ),
    ] = None
    supported_versions: Annotated[
        list[vast_version.VastVersion],
        Field(
            deprecated=True,
            description='Deprecated 3.x compatibility field. For an acceptance mismatch, this is the effective product/seller intersection when known. Modern emitters use the typed sets and mismatch_reason.',
            min_length=1,
        ),
    ]

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 asset_vast_version : VastVersion | None
var document_role : DocumentRole | None
var format_option_ref : FormatOptionReference1 | FormatOptionReference2 | None
var mismatch_reason : MismatchReason | None
var model_config
var observed_document_vast_version : str | None
var product_vast_versions : list[VastVersion] | None
var seller_vast_versions : list[VastVersion] | None
var supported_versions : list[VastVersion]

Inherited members

class VendorErrorCodeRegistry (**data: Any)
Expand source code
class VendorErrorCodeRegistry(AdCPBaseModel):
    vendors: Annotated[
        dict[str, Vendors] | None,
        Field(description='Map of vendor prefix to vendor metadata and codes'),
    ] = 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 model_config
var vendors : dict[str, Vendors] | None

Inherited members

class Vendors (**data: Any)
Expand source code
class Vendors(AdCPBaseModel):
    name: Annotated[str, Field(description='Full vendor name')]
    url: Annotated[AnyUrl | None, Field(description='Vendor website or documentation URL')] = None
    codes: Annotated[
        dict[str, Codes],
        Field(description='Map of code suffix to description and recovery classification'),
    ]

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 codes : dict[str, Codes]
var model_config
var name : str
var url : pydantic.networks.AnyUrl | None

Inherited members

class VerificationMode (*args, **kwds)
Expand source code
class VerificationMode(StrEnum):
    spec = 'spec'
    live = 'live'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var live
var spec
class VersionUnsupportedDetails (**data: Any)
Expand source code
class VersionUnsupportedDetails(AdcpVersionEnvelope):
    model_config = ConfigDict(
        extra='allow',
    )
    supported_versions: Annotated[
        list[SupportedVersion],
        Field(
            description='Release-precision versions the seller speaks. Authoritative — buyers SHOULD select a value from this list and retry.',
            examples=[['3.0', '3.1']],
            min_length=1,
        ),
    ]
    supported_majors: Annotated[
        list[SupportedMajor] | None,
        Field(
            deprecated=True,
            description='DEPRECATED in favor of `supported_versions`. Major versions the seller supports. Servers SHOULD emit both through 3.x; removed in 4.0.',
        ),
    ] = None
    build_version: Annotated[
        str | None,
        Field(
            description="Optional advisory: full semver build identifier of the seller's deployment (MAJOR.MINOR.PATCH plus optional pre-release and build-metadata segments per semver §9–§10), for incident triage. Buyers MUST NOT use this field for negotiation.",
            examples=[
                '3.1.2',
                '3.1.0-beta.3',
                '3.1.2+scope3.deploy.4821',
                '3.1.0-beta.3+sha.a1b2c3d',
            ],
            pattern='^\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9.-]+)?(\\+[a-zA-Z0-9.-]+)?$',
        ),
    ] = 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 build_version : str | None
var model_config
var supported_majors : list[SupportedMajor] | None
var supported_versions : list[SupportedVersion]

Inherited members

class Violation (**data: Any)
Expand source code
class Violation(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    pointer: Annotated[
        str,
        Field(
            description='RFC 6901 JSON Pointer rooted at the complete task request payload, not at the nested creative manifest. For example, inline build_creative uses /creative_manifest/assets/hero_image and a sync_creatives batch uses /creatives/0/assets/hero_image. If build_creative resolves a stored manifest from creative_id, use /creative_id because the failing asset is not present in the request.',
            max_length=256,
            pattern='^(?:/(?:[^~/\\u0000-\\u001F\\u007F]|~0|~1)*)*$',
        ),
    ]
    criterion: Annotated[
        str,
        Field(
            description='Stable criterion identifier within criterion_source, for example 1.4.3. Open string so external standards can evolve without an AdCP enum update.',
            max_length=32,
            min_length=1,
            pattern='^[^\\u0000-\\u001F\\u007F]+$',
        ),
    ]
    criterion_source: Annotated[
        str,
        Field(
            description='Standard or policy namespace defining the criterion, for example WCAG21, WCAG22, or EN301549.',
            max_length=64,
            min_length=1,
            pattern='^[A-Za-z][A-Za-z0-9._:-]{0,63}$',
        ),
    ]
    required_level: Annotated[
        str,
        Field(
            description="Conformance level or policy threshold that applied, for example AA. Kept open because not every accessibility standard uses WCAG's A/AA/AAA vocabulary.",
            max_length=64,
            min_length=1,
            pattern='^[^\\u0000-\\u001F\\u007F]+$',
        ),
    ]
    failure_kind: Annotated[
        FailureKind | FailureKind1,
        Field(
            description='Diagnostic failure category. Canonical values cover common portable cases. Vendor-local extensions use an x_ prefix. Portable recovery dispatches on criterion_source plus criterion after validating this details schema; failure_kind may refine diagnostics but does not select the recovery class.'
        ),
    ]
    remediation: Annotated[
        str | None,
        Field(
            description='Optional human-readable correction guidance. Plain text only; consumers treat it as untrusted agent input.',
            max_length=256,
            pattern='^[^\\u0000-\\u001F\\u007F]*$',
        ),
    ] = 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 criterion : str
var criterion_source : str
var failure_kind : FailureKind | FailureKind1
var model_config
var pointer : str
var remediation : str | None
var required_level : str

Inherited members