# generated by datamodel-codegen:
#   filename:  content_standards/content_standards.json
#   timestamp: 2026-02-27T02:10:10+00:00

from __future__ import annotations

from typing import Annotated

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

from ..core import ext as ext_1
from ..core import pricing_option
from ..enums import channels
from . import artifact


class CalibrationExemplars(AdCPBaseModel):
    fail: Annotated[
        list[artifact.Artifact] | None,
        Field(description='Artifacts that fail the content standards'),
    ] = None
    pass_: Annotated[
        list[artifact.Artifact] | None,
        Field(alias='pass', description='Artifacts that pass the content standards'),
    ] = None


class ContentStandards(AdCPBaseModel):
    calibration_exemplars: Annotated[
        CalibrationExemplars | None,
        Field(
            description='Training/test set to calibrate policy interpretation. Provides concrete examples of pass/fail decisions.'
        ),
    ] = None
    channels_any: Annotated[
        list[channels.MediaChannel] | None,
        Field(
            description='Advertising channels. Standards apply to ANY of the listed channels (OR logic).',
            min_length=1,
        ),
    ] = None
    countries_all: Annotated[
        list[str] | None,
        Field(
            description='ISO 3166-1 alpha-2 country codes. Standards apply in ALL listed countries (AND logic).',
            min_length=1,
        ),
    ] = None
    ext: ext_1.ExtensionObject | None = None
    languages_any: Annotated[
        list[str] | None,
        Field(
            description="BCP 47 language tags (e.g., 'en', 'de', 'fr'). Standards apply to content in ANY of these languages (OR logic). Content in unlisted languages is not covered by these standards.",
            min_length=1,
        ),
    ] = None
    name: Annotated[
        str | None, Field(description='Human-readable name for this standards configuration')
    ] = None
    policy: Annotated[
        str | None,
        Field(
            description='Natural language policy describing acceptable and unacceptable content contexts. Used by LLMs and human reviewers to make judgments.'
        ),
    ] = None
    pricing_options: Annotated[
        list[pricing_option.PricingOption] | None,
        Field(
            description='Pricing options for this content standards service. The buyer passes the selected pricing_option_id in report_usage for billing verification.',
            min_length=1,
        ),
    ] = None
    standards_id: Annotated[
        str, Field(description='Unique identifier for this standards configuration')
    ]
