Module adcp.types.generated_poc.tmp.context_match_response

Classes

class ContextMatchResponse (**data: Any)
Expand source code
class ContextMatchResponse(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    cache_ttl: Annotated[
        int | None,
        Field(
            description='Optional override for the default 5-minute cache TTL, in seconds. When present, the router MUST use this value instead of its default. Set to 0 to disable caching (e.g., when targeting configuration has just changed).',
            ge=0,
            le=86400,
        ),
    ] = None
    offers: Annotated[
        list[offer.Offer],
        Field(
            description='Offers from the buyer, 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.'
        ),
    ]
    request_id: Annotated[
        str, Field(description='Echoed request identifier from the context match request')
    ]
    signals: Annotated[
        Signals | None,
        Field(
            description='Response-level targeting signals for ad server pass-through. In the GAM case, these carry the key-value pairs that trigger line items. Not per-offer — applies to the response as a whole.'
        ),
    ] = None
    type: Annotated[
        Literal['context_match_response'],
        Field(description='Message type discriminator for deserialization.'),
    ]

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so that 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. Consumers who want strict validation can override with extra='forbid'.

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_ttl : int | None
var model_config
var offers : list[Offer]
var request_id : str
var signalsSignals | None
var 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')] = (
        None
    )
    targeting_kvs: Annotated[
        list[TargetingKv] | None, Field(description='Key-value pairs for ad server targeting')
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so that 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. Consumers who want strict validation can override with extra='forbid'.

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 segments : list[str] | None
var targeting_kvs : list[TargetingKv] | None

Inherited members

class TargetingKv (**data: Any)
Expand source code
class TargetingKv(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    key: Annotated[str, Field(description='Targeting key')]
    value: Annotated[str, Field(description='Targeting value')]

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so that 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. Consumers who want strict validation can override with extra='forbid'.

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

Inherited members