# generated by datamodel-codegen:
#   filename:  content_standards/calibrate_content_response.json
#   timestamp: 2026-02-28T17:39:50+00:00

from __future__ import annotations

from enum import Enum
from typing import Annotated

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

from ..core import context as context_1
from ..core import error
from ..core import ext as ext_1


class Status(Enum):
    passed = 'passed'
    failed = 'failed'
    warning = 'warning'
    unevaluated = 'unevaluated'


class Feature(AdCPBaseModel):
    explanation: Annotated[
        str | None,
        Field(description='Human-readable explanation of why this feature passed or failed'),
    ] = None
    feature_id: Annotated[
        str,
        Field(
            description='Which feature was evaluated (e.g., brand_safety, brand_suitability, competitor_adjacency)'
        ),
    ]
    status: Annotated[Status, Field(description='Evaluation status for this feature')]


class Verdict(Enum):
    pass_ = 'pass'
    fail = 'fail'


class CalibrateContentResponse1(AdCPBaseModel):
    confidence: Annotated[
        float | None, Field(description='Model confidence in the verdict (0-1)', ge=0.0, le=1.0)
    ] = None
    context: context_1.ContextObject | None = None
    explanation: Annotated[
        str | None, Field(description='Detailed natural language explanation of the decision')
    ] = None
    ext: ext_1.ExtensionObject | None = None
    features: Annotated[
        list[Feature] | None, Field(description='Per-feature breakdown with explanations')
    ] = None
    verdict: Annotated[
        Verdict, Field(description='Overall pass/fail verdict for the content evaluation')
    ]


class CalibrateContentResponse2(AdCPBaseModel):
    context: context_1.ContextObject | None = None
    errors: list[error.Error]
    ext: ext_1.ExtensionObject | None = None


class CalibrateContentResponse(RootModel[CalibrateContentResponse1 | CalibrateContentResponse2]):
    root: Annotated[
        CalibrateContentResponse1 | CalibrateContentResponse2,
        Field(
            description='Response payload with verdict and detailed explanations for collaborative calibration',
            title='Calibrate Content Response',
        ),
    ]
