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 = 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 categories_evaluated : list[str] | None
var check_id : str
var conditions : list[Condition] | None
var contextContextObject | None
var expires_at : pydantic.types.AwareDatetime | None
var explanation : str
var extExtensionObject | None
var findings : list[Finding] | None
var governance_context : str | None
var model_config
var next_check : pydantic.types.AwareDatetime | None
var plan_id : str
var policies_evaluated : list[str] | None
var statusStatus

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 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 field : str
var model_config
var reason : str
var 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."
        ),
    ] = 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 category_id : str
var confidence : float | None
var details : dict[str, typing.Any] | None
var explanation : str
var model_config
var policy_id : str | None
var severityEscalationSeverity
var source_plan_id : str | None
var 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 = 3

Access 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 approved
var conditions
var denied