Module adcp.types.generated_poc.governance.check_governance_response
Classes
class CheckGovernanceResponse (**data: Any)-
Expand source code
class CheckGovernanceResponse(AdCPBaseModel): model_config = ConfigDict( extra='forbid', ) check_id: Annotated[ str, Field( description='Unique identifier for this governance check record. Use in report_plan_outcome to link outcomes to the check that authorized them.' ), ] status: Annotated[ Status, Field( description="Governance decision. 'approved': proceed as planned. 'denied': do not proceed. 'conditions': approved if the caller accepts the listed conditions, then re-calls check_governance with the adjusted parameters." ), ] plan_id: Annotated[str, Field(description='Echoed from request.')] explanation: Annotated[ str, Field(description='Human-readable explanation of the governance decision.') ] findings: Annotated[ list[Finding] | None, Field( description="Specific issues found during the governance check. Present when status is 'denied' or 'conditions'. MAY also be present on 'approved' for informational findings (e.g., budget approaching limit)." ), ] = None conditions: Annotated[ list[Condition] | None, Field( description="Present when status is 'conditions'. Specific adjustments the caller must make. After applying conditions, the caller MUST re-call check_governance with the adjusted parameters before proceeding." ), ] = None expires_at: Annotated[ AwareDatetime | None, Field( description="When this approval expires. Present when status is 'approved' or 'conditions'. The caller must act before this time or re-call check_governance. A lapsed approval is no approval." ), ] = None next_check: Annotated[ AwareDatetime | None, Field( description='When the seller should next call check_governance with delivery metrics. Present when the governance agent expects ongoing delivery reporting.' ), ] = None categories_evaluated: Annotated[ list[str] | None, Field(description='Governance categories evaluated during this check.') ] = None policies_evaluated: Annotated[ list[str] | None, Field(description='Registry policy IDs evaluated during this check.') ] = None governance_context: Annotated[ str | None, Field( description="Governance context token for this governed action. The buyer MUST attach this to the protocol envelope when sending the purchase request (media buy, rights acquisition, signal activation) to the seller. The seller MUST persist it and include it on all subsequent check_governance calls for this action's lifecycle.\n\nValue format: in 3.0 governance agents MUST emit a compact JWS per the AdCP JWS profile (see Security — Signed Governance Context). Sellers MAY verify; sellers that do not verify MUST persist and forward the token unchanged so auditors can verify downstream. In 3.1 all sellers MUST verify per the checklist. Non-JWS values from pre-3.0 governance agents are deprecated and will be rejected in 3.1.\n\nSellers that implement verification MUST verify signature, `aud`, `exp`, `jti` replay, and revocation per the profile before treating the request as governance-approved. This is the primary correlation key for audit and reporting across the governance lifecycle — the governance agent decodes its own signed token to look up internal plan state (buyer correlation IDs, policy decision log, etc.).", max_length=4096, min_length=1, pattern='^[\\x20-\\x7E]+$', ), ] = None context: context_1.ContextObject | None = None ext: ext_1.ExtensionObject | None = NoneBase 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 setadditionalProperties: trueoverride this withextra='allow'in their ownmodel_config. Consumers who want strict validation can override withextra='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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var categories_evaluated : list[str] | Nonevar check_id : strvar conditions : list[Condition] | Nonevar context : ContextObject | Nonevar expires_at : pydantic.types.AwareDatetime | Nonevar explanation : strvar ext : ExtensionObject | Nonevar findings : list[Finding] | Nonevar governance_context : str | Nonevar model_configvar next_check : pydantic.types.AwareDatetime | Nonevar plan_id : strvar policies_evaluated : list[str] | Nonevar status : Status
Inherited members
class Condition (**data: Any)-
Expand source code
class Condition(AdCPBaseModel): model_config = ConfigDict( extra='forbid', ) field: Annotated[ str, Field( description='Dot-path to the field that needs adjustment (in payload for proposed, in planned_delivery for committed).' ), ] required_value: Annotated[ Any | None, Field( description='The value the field must have for approval. When present, the condition is machine-actionable. When absent, the condition is advisory.' ), ] = None reason: Annotated[str, Field(description='Why this condition is required.')]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 setadditionalProperties: trueoverride this withextra='allow'in their ownmodel_config. Consumers who want strict validation can override withextra='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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var field : strvar model_configvar reason : strvar required_value : typing.Any | None
Inherited members
class Finding (**data: Any)-
Expand source code
class Finding(AdCPBaseModel): model_config = ConfigDict( extra='forbid', ) category_id: Annotated[ str, Field( description="Validation category that flagged the issue (e.g., 'budget_compliance', 'regulatory_compliance', 'brand_safety')." ), ] policy_id: Annotated[ str | None, Field( description='ID of the policy that triggered this finding. May reference a registry policy (with source: registry) or a bespoke inline policy (with source: inline). Bespoke policy_ids are unique within their authoring container; use source_plan_id when findings aggregate across multiple plans (e.g., portfolio evaluations).' ), ] = None source_plan_id: Annotated[ str | None, Field( description="For portfolio or aggregated evaluations where findings draw on bespoke policies from multiple member plans: identifies the plan whose policy triggered this finding. Omit when the finding's policy_id is unambiguous within the response context (e.g., single-plan check_governance)." ), ] = None severity: escalation_severity.EscalationSeverity explanation: Annotated[str, Field(description='Human-readable description of the issue.')] details: Annotated[ dict[str, Any] | None, Field(description='Structured details for programmatic consumption.') ] = None confidence: Annotated[ float | None, Field( description="Confidence score (0-1) in this finding. Distinguishes 'this definitely violates the policy' (0.95) from 'this might violate depending on how audience segments resolve' (0.6). When absent, the finding is presented without a confidence qualifier.", ge=0.0, le=1.0, ), ] = None uncertainty_reason: Annotated[ str | None, Field( description="Explanation of why confidence is below 1.0 (e.g., 'Targeting includes regions that partially overlap jurisdiction boundaries'). Present when confidence is below a governance-agent-defined threshold." ), ] = NoneBase 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 setadditionalProperties: trueoverride this withextra='allow'in their ownmodel_config. Consumers who want strict validation can override withextra='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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var category_id : strvar confidence : float | Nonevar details : dict[str, typing.Any] | Nonevar explanation : strvar model_configvar policy_id : str | Nonevar severity : EscalationSeverityvar source_plan_id : str | Nonevar uncertainty_reason : str | None
Inherited members
class Status (*args, **kwds)-
Expand source code
class Status(Enum): approved = 'approved' denied = 'denied' conditions = 'conditions'Create a collection of name/value pairs.
Example enumeration:
>>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3Access them by:
- attribute access::
>>> Color.RED <Color.RED: 1>- value lookup:
>>> Color(1) <Color.RED: 1>- name lookup:
>>> Color['RED'] <Color.RED: 1>Enumerations can be iterated over, and know how many members they have:
>>> len(Color) 3>>> list(Color) [<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.
Ancestors
- enum.Enum
Class variables
var approvedvar conditionsvar denied