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

from __future__ import annotations

from typing import Annotated

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

from . import duration


class OutcomeMeasurement(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    attribution: Annotated[
        str,
        Field(
            description='Attribution methodology',
            examples=['deterministic_purchase', 'probabilistic'],
        ),
    ]
    reporting: Annotated[
        str,
        Field(
            description='Reporting frequency and format',
            examples=['weekly_dashboard', 'real_time_api'],
        ),
    ]
    type: Annotated[
        str,
        Field(
            description='Type of measurement',
            examples=['incremental_sales_lift', 'brand_lift', 'foot_traffic'],
        ),
    ]
    window: Annotated[
        duration.Duration | None,
        Field(
            description='Attribution window as a structured duration (e.g., {"interval": 30, "unit": "days"}).'
        ),
    ] = None
