Module adcp.types.generated_poc.property.property_feature_definition

Classes

class Coverage (**data: Any)
Expand source code
class Coverage(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    countries: Annotated[
        list[str] | None, Field(description='Countries where this feature is available')
    ] = None
    property_types: Annotated[
        list[str] | None, Field(description='Property types this feature applies to')
    ] = 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 countries : list[str] | None
var model_config
var property_types : list[str] | None

Inherited members

class PropertyFeatureDefinition (**data: Any)
Expand source code
class PropertyFeatureDefinition(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    allowed_values: Annotated[
        list[str] | None, Field(description='For categorical features, the set of valid values')
    ] = None
    coverage: Annotated[
        Coverage | None, Field(description='What this feature covers (empty arrays = all)')
    ] = None
    description: Annotated[
        str | None, Field(description='Description of what this feature measures or represents')
    ] = None
    ext: ext_1.ExtensionObject | None = None
    feature_id: Annotated[
        str,
        Field(
            description="Unique identifier for this feature (e.g., 'consent_quality', 'carbon_score'). Features prefixed with 'registry:' reference standardized policies from the shared policy registry (e.g., 'registry:us_coppa', 'registry:uk_hfss'). Unprefixed feature IDs are agent-defined."
        ),
    ]
    methodology_url: Annotated[
        AnyUrl,
        Field(
            description='URL to documentation explaining how this feature is calculated/measured'
        ),
    ]
    methodology_version: Annotated[
        str | None, Field(description='Version identifier for the methodology (for audit trails)')
    ] = None
    name: Annotated[str, Field(description='Human-readable name for the feature')]
    range: Annotated[
        Range | None, Field(description='For quantitative features, the valid range of values')
    ] = None
    type: Annotated[
        Type,
        Field(
            description='The type of values this feature produces: binary (true/false), quantitative (numeric range), categorical (enumerated values)'
        ),
    ]

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[str] | None
var coverageCoverage | None
var description : str | None
var extExtensionObject | None
var feature_id : str
var methodology_url : pydantic.networks.AnyUrl
var methodology_version : str | None
var model_config
var name : str
var rangeRange | None
var typeType

Inherited members

class Range (**data: Any)
Expand source code
class Range(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    max: Annotated[float, Field(description='Maximum value')]
    min: Annotated[float, Field(description='Minimum value')]

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 max : float
var min : float
var model_config

Inherited members

class Type (*args, **kwds)
Expand source code
class Type(Enum):
    binary = 'binary'
    quantitative = 'quantitative'
    categorical = 'categorical'

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 binary
var categorical
var quantitative