Module adcp.types.domains.trusted_match.context_match_response
Classes
class ContextMatchResponseRouterPublisher (**data: Any)-
Expand source code
class ContextMatchResponseRouterPublisher(AdcpVersionEnvelope, ProtocolEnvelope): model_config = ConfigDict( extra='allow', ) type: Annotated[ Literal['context_match_response'], Field(description='Message type discriminator for deserialization.'), ] = 'context_match_response' request_id: Annotated[ str, Field(description='Echoed request identifier from the context match request.') ] offers: Annotated[ list[offer.Offer], Field( description='Offers collected across the provider fan-out, one per activated package. An empty array means no packages matched. For simple activation, each offer has just package_id. For richer responses, offers include brand, price, summary, and creative manifest.' ), ] signals: Annotated[ Signals | None, Field( description='Merged non-keyed response-level signals. Provider-local targeting pairs do not pass through this object; the router emits them only in signals_by_provider.' ), NoExplicitNull, ] = None signals_by_provider: Annotated[ dict[Annotated[str, StringConstraints(pattern=r'^[A-Za-z0-9_]+$', min_length=1, max_length=64)], SignalsByProvider] | None, Field( description="Router-authored map of provider targeting pairs, keyed by the publisher-assigned provider_id from provider registration. For every provider response containing a non-empty signals.targeting_kvs list, the router copies the complete list unchanged into that provider's bucket. The router derives the map key from its registration and MUST ignore or reject provider-supplied signals_by_provider data. A provider with no targeting pairs is omitted. Publishers resolve each (provider_id, key) tuple to a local ad-server destination and drop tuples that have no local mapping.", min_length=1, ), NoExplicitNull, ] = 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
- AdcpVersionEnvelope
- ProtocolEnvelope
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var model_configvar offers : list[adcp.types._forward_compat._ReadbackOffer]var request_id : strvar signals : Signals | Nonevar signals_by_provider : dict[str, SignalsByProvider] | Nonevar type : Literal['context_match_response']
Inherited members
class Signals (**data: Any)-
Expand source code
class Signals(AdCPBaseModel): model_config = ConfigDict( extra='allow', ) segments: Annotated[ list[str] | None, Field(description='Contextual segment identifiers combined across provider responses.'), NoExplicitNull, ] = 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 model_configvar segments : list[str] | None
Inherited members
class SignalsByProvider (**data: Any)-
Expand source code
class SignalsByProvider(AdCPBaseModel): model_config = ConfigDict( extra='forbid', ) targeting_kvs: TargetingKvsBase 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 model_configvar targeting_kvs : TargetingKvs
Inherited members
class TargetingKv (**data: Any)-
Expand source code
class TargetingKv(AdCPBaseModel): model_config = ConfigDict( extra='forbid', ) key: Annotated[ str, Field( description='Provider-local targeting key. Publishers resolve this together with provider_id; it is not a globally unique or publisher-owned ad-server key.' ), ] value: Annotated[str, Field(description='Targeting value preserved unchanged by the router.')]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 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 key : strvar model_configvar value : str
Inherited members
class TargetingKvs (root: RootModelRootType = PydanticUndefined, **data)-
Expand source code
class TargetingKvs(AdCPRootModel[list[TargetingKv]]): root: Annotated[ list[TargetingKv], Field( description='Provider-local key-value pairs for ad-server targeting. The router preserves each pair unchanged and attributes it by provider_id; the publisher maps the tuple (provider_id, key) to a local ad-server destination.' ), ]RootModelunder the SDK's deferred-build policy.class X(RootModel[A | B])parametrizes a concrete class at theRootModel[…]expression, and that class carries pydantic's default config: its validator for the whole union is built right there, beforeXand any configXdeclares exist. For a composing root such asadagents.AdcpAgentsAuthorizationthat walked most of its domain into pydantic-core at import (#1694). Parametrizing this class instead inheritsdefer_build=TrueintoAdCPRootModel[A | B]and intoX, so the build waits for first use like every other generated model's.scripts/post_generate_fixes.defer_rootmodel_buildspoints every generated composing root here; a value root is a scalar subclass instead (adcp.types._scalar).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
- AdCPRootModel[list[TargetingKv]]
- AdCPRootModel
- pydantic.root_model.RootModel[~_RootT]
- pydantic.root_model.RootModel
- pydantic.main.BaseModel
- typing.Generic
Class variables
var model_configvar root : list[TargetingKv]