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

from __future__ import annotations

from typing import Annotated, Any

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

from ..core import ext as ext_1


class CreativeFeatureResult(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    confidence: Annotated[
        float | None, Field(description='Confidence score for this value (0-1)', ge=0.0, le=1.0)
    ] = None
    details: Annotated[
        dict[str, Any] | None,
        Field(description='Additional vendor-specific details about this evaluation'),
    ] = None
    expires_at: Annotated[
        AwareDatetime | None,
        Field(description='When this evaluation expires and should be refreshed'),
    ] = None
    ext: ext_1.ExtensionObject | None = None
    feature_id: Annotated[
        str,
        Field(
            description="The feature that was evaluated (e.g., 'auto_redirect', 'brand_consistency', 'iab_casinos_gambling')"
        ),
    ]
    measured_at: Annotated[
        AwareDatetime | None, Field(description='When this feature was evaluated')
    ] = None
    methodology_version: Annotated[
        str | None, Field(description='Version of the methodology used to evaluate this feature')
    ] = None
    unit: Annotated[
        str | None,
        Field(
            description="Unit of measurement for quantitative values (e.g., 'percentage', 'score')"
        ),
    ] = None
    value: Annotated[
        bool | float | str,
        Field(
            description='The feature value. Type depends on feature definition: boolean for binary, number for quantitative, string for categorical.'
        ),
    ]
