Module adcp.types.generated_poc.property.validation_result

Classes

class Feature (**data: Any)
Expand source code
class Feature(AdCPBaseModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    feature_id: Annotated[
        str,
        Field(
            description="Which feature was evaluated. Data features come from the governance agent's feature catalog (e.g., 'mfa_score', 'carbon_score'). Record-level structural checks use reserved namespaces: 'record:list_membership', 'record:excluded', 'delivery:seller_authorization', 'delivery:click_url_presence'. Reserved prefixes: 'record:', 'delivery:'."
        ),
    ]
    status: Status52
    policy_id: Annotated[
        str | None,
        Field(
            description="Registry policy ID that triggered this result. Enables programmatic routing by looking up the policy in the registry."
        ),
    ] = None
    explanation: Annotated[
        str | None, Field(description="Directional human-readable explanation of the result.")
    ] = None
    requirement: Annotated[
        Requirement | None,
        Field(
            description="The feature requirement that was not met. MAY be present on failed features when the caller authored the requirement (e.g., feature_requirements on a property list). The buyer set these thresholds — echoing them back enables fix-and-retry loops without looking up the list definition."
        ),
    ] = None
    confidence: Annotated[
        float | None,
        Field(
            description="Optional evaluator confidence in this result (0-1). Distinguishes certain verdicts from ambiguous ones.",
            ge=0.0,
            le=1.0,
        ),
    ] = 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 confidence : float | None
var explanation : str | None
var feature_id : str
var model_config
var policy_id : str | None
var requirementRequirement | None
var statusStatus52

Inherited members

class Requirement (**data: Any)
Expand source code
class Requirement(AdCPBaseModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    min_value: Annotated[float | None, Field(description="Minimum value that was required")] = None
    max_value: Annotated[float | None, Field(description="Maximum value that was allowed")] = None
    allowed_values: Annotated[
        list[Any] | None, Field(description="Values that would have been acceptable")
    ] = 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 allowed_values : list[typing.Any] | None
var max_value : float | None
var min_value : float | None
var model_config

Inherited members

class Status (*args, **kwds)
Expand source code
class Status(Enum):
    compliant = "compliant"
    non_compliant = "non_compliant"
    not_covered = "not_covered"
    unidentified = "unidentified"

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 compliant
var non_compliant
var not_covered
var unidentified
class Status52 (*args, **kwds)
Expand source code
class Status52(Enum):
    passed = "passed"
    failed = "failed"
    warning = "warning"
    unevaluated = "unevaluated"

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 failed
var passed
var unevaluated
var warning
class ValidationResult (**data: Any)
Expand source code
class ValidationResult(AdCPBaseModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    identifier: Annotated[
        identifier_1.Identifier, Field(description="The identifier that was validated")
    ]
    record_id: Annotated[
        str | None, Field(description="Client-provided ID from the delivery record (if provided)")
    ] = None
    status: Annotated[
        Status,
        Field(
            description="Validation status: compliant (in list), non_compliant (not in list), not_covered (identifier recognized but no data available), unidentified (identifier type not resolvable by this governance agent)"
        ),
    ]
    impressions: Annotated[int, Field(description="Number of impressions from this record", ge=0)]
    features: Annotated[
        list[Feature] | None,
        Field(
            description="Per-feature breakdown for this record. SHOULD include all failed and warning features. MAY include passed features. For property validation the buyer authored the requirement, so the `requirement` that was not met MAY be echoed back on failures — this is contract data, not evaluator IP."
        ),
    ] = None
    authorization: Annotated[
        authorization_result.AuthorizationResult | None,
        Field(
            description="Authorization validation result (only present if sales_agent_url was provided in the delivery record)"
        ),
    ] = 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 authorizationAuthorizationResult | None
var extExtensionObject | None
var features : list[Feature] | None
var identifierIdentifier
var impressions : int
var model_config
var record_id : str | None
var statusStatus

Inherited members