Module adcp.types.domains.content_standards.artifact_webhook_payload
Classes
class Artifact (**data: Any)-
Expand source code
class Artifact(AdCPBaseModel): artifact: Annotated[artifact_1.Artifact, Field(description='The content artifact')] delivered_at: Annotated[ AwareDatetime, Field(description='When the impression was delivered (ISO 8601)') ] impression_id: Annotated[ str | None, Field(description='Optional impression identifier for correlation with delivery reports'), ] = None package_id: Annotated[ str | None, Field(description='Package within the media buy this artifact relates to') ] = NoneBase model for AdCP types with spec-compliant serialization.
Defaults to
extra='ignore'so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas setadditionalProperties: trueoverride this withextra='allow'in their ownmodel_config.Set
ADCP_STRICT_VALIDATION=1in the environment ("1","true","yes","on"are accepted) to flip the default toextra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.Important
The env var is resolved once at module import time. Set it in your shell or CI environment before
import adcpruns — mutatingos.environ["ADCP_STRICT_VALIDATION"]after the firstadcpimport has no effect on already-imported model classes (they captured the policy at class-body evaluation).Consumers who want per-model strict validation can override
model_configon their subclass.Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var artifact : Artifactvar delivered_at : pydantic.types.AwareDatetimevar impression_id : str | Nonevar model_configvar package_id : str | None
Inherited members
class ArtifactWebhookPayload (**data: Any)-
Expand source code
class ArtifactWebhookPayload(AdCPBaseModel): model_config = ConfigDict( extra='allow', ) idempotency_key: Annotated[ str, Field( description='Sender-generated key stable across retries of the same webhook event. Sales agents MUST generate a cryptographically random value (UUID v4 recommended) per distinct emission of a batch and reuse the same key on every retry. Recipients MUST dedupe by this key, scoped to the authenticated sender identity (HMAC secret or Bearer credential) — keys from different sales agents are independent. Distinct from `batch_id`, which identifies the logical batch: `idempotency_key` identifies this specific emission event, so a re-emission of the same `batch_id` (e.g., after a correction) is a different event and MUST carry a fresh `idempotency_key`.', max_length=255, min_length=16, pattern='^[A-Za-z0-9_.:-]{16,255}$', ), ] media_buy_id: Annotated[ str, Field(description='Media buy identifier these artifacts belong to') ] batch_id: Annotated[ str, Field( description='Unique identifier for this batch of artifacts. Use for deduplication and acknowledgment.' ), ] timestamp: Annotated[ AwareDatetime, Field(description='When this batch was generated (ISO 8601)') ] artifacts: Annotated[ list[Artifact], Field(description='Content artifacts from delivered impressions') ] pagination: Annotated[ Pagination | None, Field(description='Pagination info when batching large artifact sets') ] = None ext: ext_1.ExtensionObject | None = NoneBase model for AdCP types with spec-compliant serialization.
Defaults to
extra='ignore'so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas setadditionalProperties: trueoverride this withextra='allow'in their ownmodel_config.Set
ADCP_STRICT_VALIDATION=1in the environment ("1","true","yes","on"are accepted) to flip the default toextra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.Important
The env var is resolved once at module import time. Set it in your shell or CI environment before
import adcpruns — mutatingos.environ["ADCP_STRICT_VALIDATION"]after the firstadcpimport has no effect on already-imported model classes (they captured the policy at class-body evaluation).Consumers who want per-model strict validation can override
model_configon their subclass.Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var artifacts : list[Artifact]var batch_id : strvar ext : ExtensionObject | Nonevar idempotency_key : strvar media_buy_id : strvar model_configvar pagination : Pagination | Nonevar timestamp : pydantic.types.AwareDatetime
Inherited members
class Pagination (**data: Any)-
Expand source code
class Pagination(AdCPBaseModel): total_artifacts: Annotated[ SchemaInt | None, Field(description='Total artifacts in the delivery period') ] = None batch_number: Annotated[ SchemaInt | None, Field(description='Current batch number (1-indexed)') ] = None total_batches: Annotated[ SchemaInt | None, Field(description='Total batches for this delivery period') ] = NoneBase model for AdCP types with spec-compliant serialization.
Defaults to
extra='ignore'so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas setadditionalProperties: trueoverride this withextra='allow'in their ownmodel_config.Set
ADCP_STRICT_VALIDATION=1in the environment ("1","true","yes","on"are accepted) to flip the default toextra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.Important
The env var is resolved once at module import time. Set it in your shell or CI environment before
import adcpruns — mutatingos.environ["ADCP_STRICT_VALIDATION"]after the firstadcpimport has no effect on already-imported model classes (they captured the policy at class-body evaluation).Consumers who want per-model strict validation can override
model_configon their subclass.Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var batch_number : int | Nonevar model_configvar total_artifacts : int | Nonevar total_batches : int | None
Inherited members