Module adcp.types.domains.error_details

Types the AdCP error_details schemas declare.

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

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

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

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

Sub-modules

adcp.types.domains.error_details.accessibility_violation
adcp.types.domains.error_details.account_moved
adcp.types.domains.error_details.account_setup_required
adcp.types.domains.error_details.action_not_allowed
adcp.types.domains.error_details.agent_permission_denied
adcp.types.domains.error_details.audience_too_small
adcp.types.domains.error_details.authorization_required
adcp.types.domains.error_details.billing_not_permitted_for_agent
adcp.types.domains.error_details.billing_not_supported
adcp.types.domains.error_details.budget_too_low
adcp.types.domains.error_details.conflict
adcp.types.domains.error_details.creative_rejected
adcp.types.domains.error_details.creative_representation_unresolved
adcp.types.domains.error_details.creative_revision_content_mismatch
adcp.types.domains.error_details.execution_requirement_unmet
adcp.types.domains.error_details.governance_agent_not_accepted
adcp.types.domains.error_details.macro_resolution_failed
adcp.types.domains.error_details.policy_violation
adcp.types.domains.error_details.rate_limited
adcp.types.domains.error_details.requote_required
adcp.types.domains.error_details.stale_response
adcp.types.domains.error_details.unsupported_refinement_dimension
adcp.types.domains.error_details.vast_version_mismatch
adcp.types.domains.error_details.vendor_error_codes
adcp.types.domains.error_details.version_unsupported

Classes

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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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