Module adcp.types.generated_poc.governance.check_governance_request
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 = 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 committedvar proposed
class CheckGovernanceRequest (**data: Any)-
Expand source code
class CheckGovernanceRequest(AdCPBaseModel): model_config = ConfigDict( extra='forbid', ) plan_id: Annotated[str, Field(description='Campaign governance plan identifier.')] buyer_campaign_ref: Annotated[ str, Field( description="Buyer's campaign identifier. The governance agent tracks state per campaign within a plan." ), ] binding: Annotated[ Binding, Field( description="Whether this is an advisory check or a binding commitment. 'proposed': the orchestrator is checking before sending to a seller — no budget is committed. 'committed': the seller is about to execute — the governance agent validates the planned delivery against the plan. Budget is committed later via report_plan_outcome, not on approval." ), ] caller: Annotated[ AnyUrl, Field( description='URL of the agent making the request (orchestrator for proposed, seller for committed).' ), ] tool: Annotated[ str | None, Field( description="The AdCP tool being checked (e.g., 'create_media_buy', 'get_products'). Expected for proposed checks. The governance agent uses this to apply tool-specific validation rules." ), ] = None payload: Annotated[ dict[str, Any] | None, Field( description='The full tool arguments as they would be sent to the seller. Expected for proposed checks. The governance agent can inspect any field to validate against the plan.' ), ] = None governance_context: Annotated[ governance_context_1.GovernanceContext | None, Field( description='Normalized governance-relevant fields extracted from the tool payload. When present, the governance agent SHOULD use these fields for plan validation instead of parsing the payload directly. The caller is responsible for extracting these from the tool arguments.' ), ] = None media_buy_id: Annotated[ str | None, Field( description="The seller's identifier for the media buy. Expected for committed checks." ), ] = None buyer_ref: Annotated[ str | None, Field(description="The buyer's reference identifier from the create_media_buy request."), ] = None phase: Annotated[ governance_phase.GovernancePhase | None, Field( description="The phase of the media buy lifecycle. 'purchase': initial create_media_buy. 'modification': update_media_buy. 'delivery': periodic delivery reporting. Defaults to 'purchase' if omitted." ), ] = governance_phase.GovernancePhase.purchase planned_delivery: Annotated[ planned_delivery_1.PlannedDelivery | None, Field( description="What the seller will actually deliver. For committed checks, this is the seller's interpreted delivery parameters. For proposed checks, the orchestrator may include this if it has computed delivery expectations." ), ] = None delivery_metrics: Annotated[ DeliveryMetrics | None, Field( description="Actual delivery performance data. MUST be present for 'delivery' phase. The governance agent compares these metrics against the planned delivery to detect drift." ), ] = None modification_summary: Annotated[ str | None, Field( description="Human-readable summary of what changed. SHOULD be present for 'modification' phase." ), ] = 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 binding : Bindingvar buyer_campaign_ref : strvar buyer_ref : str | Nonevar caller : pydantic.networks.AnyUrlvar delivery_metrics : DeliveryMetrics | Nonevar governance_context : GovernanceContext | Nonevar media_buy_id : str | Nonevar model_configvar modification_summary : str | Nonevar payload : dict[str, typing.Any] | Nonevar phase : GovernancePhase | Nonevar plan_id : strvar planned_delivery : PlannedDelivery | Nonevar tool : str | None
Inherited members
class DeliveryMetrics (**data: Any)-
Expand source code
class DeliveryMetrics(AdCPBaseModel): model_config = ConfigDict( extra='forbid', ) reporting_period: Annotated[ ReportingPeriod, Field(description='Start and end timestamps for the reporting window.') ] spend: Annotated[ float | None, Field(description='Total spend during the reporting period.', ge=0.0) ] = None cumulative_spend: Annotated[ float | None, Field(description='Total spend since the media buy started.', ge=0.0) ] = None impressions: Annotated[ int | None, Field(description='Impressions delivered during the reporting period.', ge=0) ] = None cumulative_impressions: Annotated[ int | None, Field(description='Total impressions since the media buy started.', ge=0) ] = None geo_distribution: Annotated[ dict[str, float] | None, Field( description='Actual geographic distribution. Keys are ISO 3166-1 alpha-2 codes, values are percentages.' ), ] = None channel_distribution: Annotated[ dict[str, float] | None, Field( description='Actual channel distribution. Keys are channel enum values, values are percentages.' ), ] = None pacing: Annotated[ Pacing | None, Field( description='Whether delivery is ahead of, on track with, or behind the planned pace.' ), ] = 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 channel_distribution : dict[str, float] | Nonevar cumulative_impressions : int | Nonevar cumulative_spend : float | Nonevar geo_distribution : dict[str, float] | Nonevar impressions : int | Nonevar model_configvar pacing : Pacing | Nonevar reporting_period : ReportingPeriodvar spend : float | None
Inherited members
class Pacing (*args, **kwds)-
Expand source code
class Pacing(Enum): ahead = 'ahead' on_track = 'on_track' behind = 'behind'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 aheadvar behindvar on_track
class ReportingPeriod (**data: Any)-
Expand source code
class ReportingPeriod(AdCPBaseModel): model_config = ConfigDict( extra='forbid', ) start: AwareDatetime end: AwareDatetimeBase 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 end : pydantic.types.AwareDatetimevar model_configvar start : pydantic.types.AwareDatetime
Inherited members