# generated by datamodel-codegen:
#   filename:  url-asset.json
#   timestamp: 2025-11-15T22:03:55+00:00

from __future__ import annotations

from enum import Enum
from typing import Annotated

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


class UrlType(Enum):
    clickthrough = "clickthrough"
    tracker_pixel = "tracker_pixel"
    tracker_script = "tracker_script"


class UrlAsset(AdCPBaseModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    description: Annotated[
        str | None, Field(description="Description of what this URL points to")
    ] = None
    url: Annotated[AnyUrl, Field(description="URL reference")]
    url_type: Annotated[
        UrlType | None,
        Field(
            description="Type of URL asset: 'clickthrough' for user click destination (landing page), 'tracker_pixel' for impression/event tracking via HTTP request (fires GET, expects pixel/204 response), 'tracker_script' for measurement SDKs that must load as <script> tag (OMID verification, native event trackers using method:2)"
        ),
    ] = None
