Module adcp.types.domains.governance.sync_plans_response

Classes

class Category (**data: Any)
Expand source code
class Category(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    category_id: Annotated[str, Field(description='Validation category identifier.')]
    status: Annotated[Status51, Field(description='Whether this category is active for this plan.')]

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_id : str
var model_config
var status : Status51

Inherited members

class Plan (**data: Any)
Expand source code
class Plan(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    plan_id: Annotated[str, Field(description='Plan identifier.')]
    status: Annotated[
        Status,
        Field(
            description="Sync result status. 'active' means sync succeeded; 'error' means sync failed."
        ),
    ]
    version: Annotated[SchemaInt, Field(description='Plan version (increments on each sync).')]
    categories: Annotated[
        list[Category] | None, Field(description='Validation categories active for this plan.')
    ] = None
    resolved_policies: Annotated[
        list[ResolvedPolicy] | None,
        Field(
            description='Policies the governance agent will enforce for this plan. Includes explicitly referenced policies from the brand compliance configuration and auto-applied policies matched by jurisdiction or policy category. Present when the governance agent supports policy resolution.'
        ),
    ] = 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 categories : list[Category] | None
var model_config
var plan_id : str
var resolved_policies : list[ResolvedPolicy] | None
var status : Status
var version : int

Inherited members

class ResolvedPolicy (**data: Any)
Expand source code
class ResolvedPolicy(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    policy_id: Annotated[str, Field(description='Registry policy ID.')]
    source: Annotated[
        Source,
        Field(
            description="How this policy was included. 'explicit': referenced in the brand compliance configuration. 'auto_applied': matched automatically by jurisdiction or policy category."
        ),
    ]
    enforcement: Annotated[
        policy_enforcement.PolicyEnforcementLevel,
        Field(description='Enforcement level for this policy.'),
    ]
    reason: Annotated[
        str | None,
        Field(
            description="Why this policy was included (e.g., 'Matched jurisdiction US and policy category pharmaceutical_advertising')."
        ),
    ] = 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 enforcement : PolicyEnforcementLevel
var model_config
var policy_id : str
var reason : str | None
var source : Source

Inherited members

class Source (*args, **kwds)
Expand source code
class Source(StrEnum):
    explicit = 'explicit'
    auto_applied = 'auto_applied'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var auto_applied
var explicit
class Status (*args, **kwds)
Expand source code
class Status(StrEnum):
    active = 'active'
    error = 'error'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var active
var error
class Status51 (*args, **kwds)
Expand source code
class Status51(StrEnum):
    active = 'active'
    inactive = 'inactive'

Enum where members are also (and must be) strings

Ancestors

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

Class variables

var active
var inactive
class SyncPlansResponse (**data: Any)
Expand source code
class SyncPlansResponse(AdcpResponse, AdcpVersionEnvelope, ProtocolEnvelope):
    model_config = ConfigDict(
        extra='allow',
    )
    plans: Annotated[list[Plan], Field(description='Status for each synced plan.')]
    replayed: Annotated[
        StrictBool | None,
        Field(
            description="Set to true when this response was returned from the idempotency cache rather than from a fresh execution. Set to false (or omitted) when the request was executed fresh. Buyers use this to distinguish cached replays from new executions — matters for billing reconciliation, audit logs, state-machine routing (cached state-tracking fields are historical snapshots, not current state — re-read via the resource's read endpoint), and any downstream system that assumes exactly-once event semantics. `replayed` appears only when the request actually resolved through the idempotency cache. Pure reads may ignore an optional `idempotency_key`; when a seller voluntarily caches keyed reads, those responses use the same replay indicator and full cache contract."
        ),
    ] = False
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None

The response message of a task in the pinned bundle's task registry.

A consumer holding one can route on task state, pick up an async task_id, split envelope from payload and log uniformly, before knowing which tool answered. Which makes one generic poll-to-terminal loop possible for all 77 tasks, where today each arm has no common type at all.

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 context : ContextObject | None
var ext : ExtensionObject | None
var model_config
var plans : list[Plan]
var replayed : bool | None

Inherited members