# generated by datamodel-codegen:
#   filename:  core/attribution_window.json
#   timestamp: 2026-02-12T02:11:19+00:00

from __future__ import annotations

from typing import Annotated

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

from ..enums import attribution_model


class AttributionWindow(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    click_window_days: Annotated[
        int | None,
        Field(
            description='Click-through attribution window in days. Conversions occurring within this many days after a click are attributed to the ad.',
            ge=0,
        ),
    ] = None
    model: Annotated[
        attribution_model.AttributionModel,
        Field(
            description='Attribution model used to assign credit when multiple touchpoints exist'
        ),
    ]
    view_window_days: Annotated[
        int | None,
        Field(
            description='View-through attribution window in days. Conversions occurring within this many days after an ad impression (without click) are attributed to the ad.',
            ge=0,
        ),
    ] = None
