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 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 category_id : strvar model_configvar 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.' ), ] = 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 categories : list[Category] | Nonevar model_configvar plan_id : strvar resolved_policies : list[ResolvedPolicy] | Nonevar status : Statusvar 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')." ), ] = 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 enforcement : PolicyEnforcementLevelvar model_configvar policy_id : strvar reason : str | Nonevar 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_appliedvar 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 activevar 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 activevar 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 = NoneThe 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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdcpResponse
- adcp.types.base._AdcpMessage
- AdcpVersionEnvelope
- ProtocolEnvelope
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var context : ContextObject | Nonevar ext : ExtensionObject | Nonevar model_configvar plans : list[Plan]var replayed : bool | None
Inherited members