Module adcp.types.generated_poc.governance.check_governance_response

Classes

class Binding (*args, **kwds)
Expand source code
class Binding(Enum):
    proposed = 'proposed'
    committed = 'committed'

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 committed
var proposed
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. 'escalated': halted pending human review."
        ),
    ]
    binding: Annotated[
        Binding,
        Field(
            description='Echoed from request. Lets the caller confirm the governance agent understood the commitment level.'
        ),
    ]
    plan_id: Annotated[str, Field(description='Echoed from request.')]
    buyer_campaign_ref: Annotated[str, Field(description='Echoed from request.')]
    explanation: Annotated[
        str, Field(description='Human-readable explanation of the governance decision.')
    ]
    mode: Annotated[
        governance_mode.GovernanceMode | None,
        Field(
            description="The governance mode under which this check was evaluated. Present so audit trails can distinguish 'denied in advisory mode (action proceeded)' from 'denied in enforce mode (action blocked)'."
        ),
    ] = None
    findings: Annotated[
        list[Finding] | None,
        Field(
            description="Specific issues found during the governance check. Present when status is 'denied', 'conditions', or 'escalated'. MAY also be present on 'approved' for advisory 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
    escalation: Annotated[
        Escalation | None,
        Field(
            description="Present when status is 'escalated'. The action is halted pending human review."
        ),
    ] = 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

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 bindingBinding
var buyer_campaign_ref : str
var categories_evaluated : list[str] | None
var check_id : str
var conditions : list[Condition] | None
var escalationEscalation | None
var expires_at : pydantic.types.AwareDatetime | None
var explanation : str
var findings : list[Finding] | None
var modeGovernanceMode | 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 Escalation (**data: Any)
Expand source code
class Escalation(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    reason: Annotated[
        str, Field(description='Human-readable explanation of why the action was escalated.')
    ]
    severity: Annotated[
        escalation_severity.EscalationSeverity, Field(description='Escalation severity level.')
    ]
    requires_human: Annotated[
        bool, Field(description='Whether human approval is required before proceeding.')
    ]
    approval_tier: Annotated[
        str | None,
        Field(
            description="Organizational role or tier required to resolve this escalation. The value is organization-defined; the governance agent infers the tier from the escalation context. Common values include 'manager', 'director', 'legal', 'cfo'. Enables programmatic routing of escalations to the right person."
        ),
    ] = 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 approval_tier : str | None
var model_config
var reason : str
var requires_human : bool
var severityEscalationSeverity

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='Registry policy ID that triggered this finding. Present when the finding originates from a specific registry policy. Enables programmatic routing of compliance failures.'
        ),
    ] = 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 uncertainty_reason : str | None

Inherited members

class Status (*args, **kwds)
Expand source code
class Status(Enum):
    approved = 'approved'
    denied = 'denied'
    conditions = 'conditions'
    escalated = 'escalated'

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
var escalated