# generated by datamodel-codegen:
#   filename:  core/assets/url_asset.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 AnyUrl, ConfigDict, Field

from ...enums import url_asset_type
from .. import provenance as provenance_1


class UrlAsset(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    description: Annotated[
        str | None, Field(description='Description of what this URL points to')
    ] = None
    provenance: Annotated[
        provenance_1.Provenance | None,
        Field(
            description='Provenance metadata for this asset, overrides manifest-level provenance'
        ),
    ] = None
    url: Annotated[AnyUrl, Field(description='URL reference')]
    url_type: Annotated[
        url_asset_type.UrlAssetType | 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
