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

from __future__ import annotations

from typing import Annotated

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

from ..core import context as context_1
from ..core import ext as ext_1
from . import artifact as artifact_1


class BrandContext(AdCPBaseModel):
    brand_id: Annotated[str | None, Field(description='Brand identifier')] = None
    sku_id: Annotated[str | None, Field(description='Product/SKU identifier if applicable')] = None


class Record(AdCPBaseModel):
    artifact: Annotated[artifact_1.Artifact, Field(description='Artifact where ad was delivered')]
    brand_context: Annotated[
        BrandContext | None,
        Field(
            description='Brand information for policy evaluation. Schema TBD - placeholder for brand identifiers.'
        ),
    ] = None
    channel: Annotated[
        str | None, Field(description='Channel type (e.g., display, video, audio, social)')
    ] = None
    country: Annotated[
        str | None, Field(description='ISO 3166-1 alpha-2 country code where delivery occurred')
    ] = None
    media_buy_id: Annotated[
        str | None,
        Field(description='Media buy this record belongs to (when batching across multiple buys)'),
    ] = None
    record_id: Annotated[str, Field(description='Unique identifier for this delivery record')]
    timestamp: Annotated[AwareDatetime | None, Field(description='When the delivery occurred')] = (
        None
    )


class ValidateContentDeliveryRequest(AdCPBaseModel):
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None
    feature_ids: Annotated[
        list[str] | None,
        Field(description='Specific features to evaluate (defaults to all)', min_length=1),
    ] = None
    include_passed: Annotated[
        bool | None, Field(description='Include passed records in results')
    ] = True
    records: Annotated[
        list[Record],
        Field(
            description='Delivery records to validate (max 10,000)', max_length=10000, min_length=1
        ),
    ]
    standards_id: Annotated[str, Field(description='Standards configuration to validate against')]
