Module adcp.types.generated_poc.governance.policy_entry
Classes
class Exemplar (**data: Any)-
Expand source code
class Exemplar(AdCPBaseModel): model_config = ConfigDict( extra='forbid', ) explanation: Annotated[str, Field(description='Why this scenario passes or fails the policy.')] scenario: Annotated[ str, Field(description='A concrete scenario describing an advertising action or configuration.'), ]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', ) fail: Annotated[ list[Exemplar] | None, Field(description='Scenarios that violate this policy.') ] = None pass_: Annotated[ list[Exemplar] | None, Field(alias='pass', description='Scenarios that comply with 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', ) category: Annotated[ policy_category.PolicyCategory, Field( description='The nature of the obligation: regulation (legal requirement) or standard (best practice).' ), ] 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 description: Annotated[ str | None, Field(description='Brief summary of what this policy covers.') ] = 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 enforcement: Annotated[ policy_enforcement.PolicyEnforcementLevel, Field( description='How governance agents treat violations. Regulations are typically "must"; standards are typically "should".' ), ] exemplars: Annotated[ Exemplars | None, Field( description='Calibration examples for governance agents, following the Content Standards pattern.' ), ] = None ext: ext_1.ExtensionObject | None = 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 guidance: Annotated[ str | None, Field( description='Implementation notes for governance agent developers. Not used in evaluation prompts.' ), ] = None 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 name: Annotated[str, Field(description='Human-readable name (e.g., "UK HFSS Restrictions").')] 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.' ), ] 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 policy_id: Annotated[ str, Field( description='Unique identifier for this policy (e.g., "uk_hfss", "us_coppa", "alcohol_advertising").' ), ] 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 source_name: Annotated[ str | None, Field( description='Name of the issuing body (e.g., "UK Food Standards Agency", "US Federal Trade Commission").' ), ] = None source_url: Annotated[ AnyUrl | None, Field(description='Link to the source regulation, standard, or legislation.') ] = 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 version: Annotated[ str, Field( description='Semver version string (e.g., "1.0.0"). Incremented when policy content changes.' ), ]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 category : PolicyCategoryvar 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 : strvar policy : strvar policy_categories : list[str] | Nonevar policy_id : strvar region_aliases : dict[str, list[str]] | Nonevar source_name : str | Nonevar source_url : pydantic.networks.AnyUrl | Nonevar sunset_date : datetime.date | Nonevar version : str
Inherited members