# generated by datamodel-codegen:
#   filename:  property/feature_requirement.json
#   timestamp: 2026-02-23T01:56:40+00:00

from __future__ import annotations

from enum import Enum
from typing import Annotated, Any

from adcp.types.base import AdCPBaseModel
from pydantic import ConfigDict, Field


class IfNotCovered(Enum):
    exclude = 'exclude'
    include = 'include'


class FeatureRequirement(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    allowed_values: Annotated[
        list[Any] | None,
        Field(
            description='Values that pass the requirement (for binary/categorical features)',
            min_length=1,
        ),
    ] = None
    feature_id: Annotated[
        str, Field(description='Feature to evaluate (discovered via get_adcp_capabilities)')
    ]
    if_not_covered: Annotated[
        IfNotCovered | None,
        Field(
            description="How to handle properties where this feature is not covered. 'exclude' (default): property is removed from the list. 'include': property passes this requirement (fail-open)."
        ),
    ] = IfNotCovered.exclude
    max_value: Annotated[
        float | None, Field(description='Maximum numeric value allowed (for quantitative features)')
    ] = None
    min_value: Annotated[
        float | None,
        Field(description='Minimum numeric value required (for quantitative features)'),
    ] = None
