Module adcp.types.domains.property.validate_property_delivery_response

Classes

class Aggregate (**data: Any)
Expand source code
class Aggregate(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    score: Annotated[
        StrictFloat | None,
        Field(description='Numeric score (0-100 scale typical, but agent-defined)'),
    ] = None
    grade: Annotated[
        str | None,
        Field(description="Letter grade or category (e.g., 'A+', 'B-', 'Gold', 'Compliant')"),
    ] = None
    label: Annotated[
        str | None,
        Field(description="Human-readable summary (e.g., '85% compliant', 'High quality')"),
    ] = None
    methodology_url: Annotated[
        AnyUrl | None, Field(description='URL explaining how this aggregate was calculated')
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so 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.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

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 grade : str | None
var label : str | None
var methodology_url : pydantic.networks.AnyUrl | None
var model_config
var score : float | None

Inherited members

class AuthorizationSummary (**data: Any)
Expand source code
class AuthorizationSummary(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    records_checked: Annotated[
        SchemaInt, Field(description='Number of records with sales_agent_url provided')
    ]
    impressions_checked: Annotated[
        SchemaInt, Field(description='Total impressions from records with sales_agent_url')
    ]
    authorized_records: Annotated[
        SchemaInt, Field(description='Number of records where sales agent was authorized')
    ]
    authorized_impressions: Annotated[
        SchemaInt, Field(description='Impressions from authorized records')
    ]
    unauthorized_records: Annotated[
        SchemaInt, Field(description='Number of records where sales agent was NOT authorized')
    ]
    unauthorized_impressions: Annotated[
        SchemaInt, Field(description='Impressions from unauthorized records')
    ]
    unknown_records: Annotated[
        SchemaInt,
        Field(
            description='Number of records where authorization could not be determined (adagents.json unavailable)'
        ),
    ]
    unknown_impressions: Annotated[
        SchemaInt,
        Field(description='Impressions from records where authorization could not be determined'),
    ]

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so 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.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

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 authorized_impressions : int
var authorized_records : int
var impressions_checked : int
var model_config
var records_checked : int
var unauthorized_impressions : int
var unauthorized_records : int
var unknown_impressions : int
var unknown_records : int

Inherited members

class Summary (**data: Any)
Expand source code
class Summary(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    total_records: Annotated[SchemaInt, Field(description='Total number of records validated')]
    total_impressions: Annotated[
        SchemaInt, Field(description='Total impressions across all records')
    ]
    compliant_records: Annotated[
        SchemaInt, Field(description='Number of records with compliant status')
    ]
    compliant_impressions: Annotated[
        SchemaInt, Field(description='Impressions from compliant records')
    ]
    non_compliant_records: Annotated[
        SchemaInt, Field(description='Number of records with non_compliant status')
    ]
    non_compliant_impressions: Annotated[
        SchemaInt, Field(description='Impressions from non_compliant records')
    ]
    not_covered_records: Annotated[
        SchemaInt,
        Field(
            description='Number of records where identifier was recognized but no data available'
        ),
    ]
    not_covered_impressions: Annotated[
        SchemaInt, Field(description='Impressions from not_covered records')
    ]
    unidentified_records: Annotated[
        SchemaInt, Field(description='Number of records where identifier type was not resolvable')
    ]
    unidentified_impressions: Annotated[
        SchemaInt, Field(description='Impressions from unidentified records')
    ]

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so 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.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

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 compliant_impressions : int
var compliant_records : int
var model_config
var non_compliant_impressions : int
var non_compliant_records : int
var not_covered_impressions : int
var not_covered_records : int
var total_impressions : int
var total_records : int
var unidentified_impressions : int
var unidentified_records : int

Inherited members

class ValidatePropertyDeliveryResponse (**data: Any)
Expand source code
class ValidatePropertyDeliveryResponse(AdcpVersionEnvelope, ProtocolEnvelope):
    model_config = ConfigDict(
        extra='allow',
    )
    compliant: Annotated[
        StrictBool | None,
        Field(
            description='Overall compliance flag for the submitted delivery — true when every record is compliant, false when any record is non_compliant. Derived from summary.non_compliant_records === 0 but surfaced at the root as a convenience signal for buyers. Agents MAY omit this field when the response represents a partial validation (e.g., when include_compliant is false and results only contains non_compliant records); consumers SHOULD fall back to summary counts if compliant is absent.'
        ),
    ] = None
    list_id: Annotated[str, Field(description='ID of the property list validated against')]
    summary: Annotated[Summary, Field(description='Aggregate validation statistics')]
    aggregate: Annotated[
        Aggregate | None,
        Field(
            description='Optional aggregate measurements computed by the governance agent. Format and meaning are agent-specific.'
        ),
    ] = None
    authorization_summary: Annotated[
        AuthorizationSummary | None,
        Field(
            description='Aggregate authorization statistics. Only present if any records included sales_agent_url.'
        ),
    ] = None
    results: Annotated[
        list[validation_result.ValidationResult],
        Field(
            description='Per-record validation results. By default only includes non_compliant and unknown records. Set include_compliant=true to include all records.'
        ),
    ]
    validated_at: Annotated[
        AwareDatetime, Field(description='Timestamp when validation was performed')
    ]
    list_resolved_at: Annotated[
        AwareDatetime | None,
        Field(description='Timestamp of the property list resolution used for validation'),
    ] = None
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so 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.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

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 aggregate : Aggregate | None
var authorization_summary : AuthorizationSummary | None
var compliant : bool | None
var context : ContextObject | None
var ext : ExtensionObject | None
var list_id : str
var list_resolved_at : pydantic.types.AwareDatetime | None
var model_config
var results : list[ValidationResult]
var summary : Summary
var validated_at : pydantic.types.AwareDatetime

Inherited members