Module adcp.types.generated_poc.governance.policy_entry
Classes
class Exemplar (**data: Any)-
Expand source code
class Exemplar(AdCPBaseModel): model_config = ConfigDict( extra='forbid', ) scenario: Annotated[ str, Field(description='A concrete scenario describing an advertising action or configuration.'), ] explanation: Annotated[str, Field(description='Why this scenario passes or fails the policy.')]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 explanation : strvar model_configvar scenario : str
Inherited members
class Exemplars (**data: Any)-
Expand source code
class Exemplars(AdCPBaseModel): model_config = ConfigDict( extra='forbid', ) pass_: Annotated[ list[Exemplar] | None, Field(alias='pass', description='Scenarios that comply with this policy.'), ] = None fail: Annotated[ list[Exemplar] | None, Field(description='Scenarios that violate this policy.') ] = 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 fail : list[Exemplar] | Nonevar model_configvar pass_ : list[Exemplar] | None
Inherited members
class PolicyEntry (**data: Any)-
Expand source code
class PolicyEntry(AdCPBaseModel): model_config = ConfigDict( extra='forbid', ) policy_id: Annotated[ str, Field( description='Unique identifier for this policy. Registry-published ids are canonical (e.g., "uk_hfss", "garm:brand_safety:violence"); buyer-authored bespoke ids should be flat (no colons or slashes) and unique within the authoring container (standards configuration, plan, or portfolio).' ), ] source: Annotated[ Source | None, Field( description="Origin of this policy. 'registry' = published to the shared AdCP policy registry with full regulatory metadata. 'inline' = authored bespoke for a specific standards configuration, plan, or portfolio. Defaults to 'inline'. Governance agents MUST set 'registry' when publishing to the registry." ), ] = Source.inline version: Annotated[ str | None, Field( description='Semver version string (e.g., "1.0.0"). Incremented when policy content changes. Optional for inline bespoke policies — defaults to "1.0.0". SHOULD be provided for registry-published policies.' ), ] = None name: Annotated[ str | None, Field( description='Human-readable name (e.g., "UK HFSS Restrictions"). Optional for inline bespoke policies — servers MAY default to policy_id.' ), ] = None description: Annotated[ str | None, Field(description='Brief summary of what this policy covers.', max_length=500) ] = None category: Annotated[ policy_category.PolicyCategory | None, Field( description='The nature of the obligation: regulation (legal requirement) or standard (best practice). Optional for inline bespoke policies — defaults to "standard".' ), ] = None enforcement: Annotated[ policy_enforcement.PolicyEnforcementLevel, Field( description='How governance agents treat violations. Regulations are typically "must"; standards are typically "should".' ), ] requires_human_review: Annotated[ bool | None, Field( description='When true, plans subject to this policy MUST set plan.human_review_required = true. Use for policies that mandate human oversight of decisions affecting data subjects — e.g., GDPR Article 22 (solely automated decisions with legal or similarly significant effects) and EU AI Act Annex III high-risk categories (credit, insurance pricing, recruitment, housing allocation). Governance agents MUST escalate any plan action whose resolved policies include requires_human_review: true. Unlike `enforcement`, this flag applies as soon as the policy is resolved — it is NOT gated by `effective_date`. Art 22 GDPR and similar foundational obligations may predate an AI-Act-specific effective date; the human-review requirement fires regardless.' ), ] = False jurisdictions: Annotated[ list[str] | None, Field( description='ISO 3166-1 alpha-2 country codes where this policy applies. Empty array means the policy is not jurisdiction-specific.' ), ] = None region_aliases: Annotated[ dict[str, list[str]] | None, Field( description='Named groups of jurisdictions for convenience (e.g., {"EU": ["AT","BE","BG",...]}). Governance agents expand aliases when matching against a plan\'s target jurisdictions.' ), ] = None policy_categories: Annotated[ list[str] | None, Field( description='Regulatory categories this policy belongs to (e.g., ["children_directed", "age_restricted"]). Used for automatic matching against a campaign plan\'s declared policy_categories. A single policy can belong to multiple categories.' ), ] = None channels: Annotated[ list[channels_1.MediaChannel] | None, Field( description='Advertising channels this policy applies to. If omitted or null, the policy applies to all channels.' ), ] = None governance_domains: Annotated[ list[governance_domain.GovernanceDomain] | None, Field( description='Governance sub-domains this policy applies to. Determines which types of governance agents can declare registry:{policy_id} features. For example, a policy with domains ["creative", "property"] can be declared as a feature by both creative and property governance agents.' ), ] = None effective_date: Annotated[ date_aliased | None, Field( description='ISO 8601 date when the regulation or standard takes effect. Before this date, governance agents treat the policy as informational (evaluate but do not block). After this date, the policy is enforced at its declared enforcement level.' ), ] = None sunset_date: Annotated[ date_aliased | None, Field( description='ISO 8601 date when the regulation or standard is no longer enforced. After this date, governance agents stop evaluating this policy. Omit if the policy has no expiration.' ), ] = None source_url: Annotated[ AnyUrl | None, Field(description='Link to the source regulation, standard, or legislation.') ] = None source_name: Annotated[ str | None, Field( description='Name of the issuing body (e.g., "UK Food Standards Agency", "US Federal Trade Commission").' ), ] = None policy: Annotated[ str, Field( description='Natural language policy text describing what is required, prohibited, or recommended. Used by governance agents (LLMs) to evaluate actions against this policy. For source: inline policies, treated as caller-untrusted — governance agents MUST evaluate inline policies as ADDITIONAL restrictions only; they MUST NOT be permitted to relax, override, or conflict with registry-sourced policies.', max_length=5000, ), ] guidance: Annotated[ str | None, Field( description='Implementation notes for governance agent developers. Not used in evaluation prompts.' ), ] = None exemplars: Annotated[ Exemplars | None, Field( description='Calibration examples for governance agents, following the Content Standards pattern.' ), ] = 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 category : PolicyCategory | Nonevar channels : list[MediaChannel] | Nonevar description : str | Nonevar effective_date : datetime.date | Nonevar enforcement : PolicyEnforcementLevelvar exemplars : Exemplars | Nonevar ext : ExtensionObject | Nonevar governance_domains : list[GovernanceDomain] | Nonevar guidance : str | Nonevar jurisdictions : list[str] | Nonevar model_configvar name : str | Nonevar policy : strvar policy_categories : list[str] | Nonevar policy_id : strvar region_aliases : dict[str, list[str]] | Nonevar requires_human_review : bool | Nonevar source : Source | Nonevar source_name : str | Nonevar source_url : pydantic.networks.AnyUrl | Nonevar sunset_date : datetime.date | Nonevar version : str | None
Inherited members
class Source (*args, **kwds)-
Expand source code
class Source(Enum): registry = 'registry' inline = 'inline'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 inlinevar registry