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

from . import ext as ext_1


class Content(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    brand: Annotated[str | None, Field(description='Brand name of this item')] = None
    id: Annotated[str, Field(description='Product or content identifier')]
    price: Annotated[float | None, Field(description='Price per unit of this item', ge=0.0)] = None
    quantity: Annotated[int | None, Field(description='Quantity of this item', ge=1)] = None


class EventCustomData(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    content_category: Annotated[
        str | None, Field(description='Category of the product or content')
    ] = None
    content_ids: Annotated[
        list[str] | None,
        Field(
            description="Item identifiers for catalog attribution. Values are matched against catalog items using the identifier type declared by the catalog's content_id_type field (e.g., SKUs, GTINs, or vertical-specific IDs like job_id)."
        ),
    ] = None
    content_name: Annotated[str | None, Field(description='Name of the product or content')] = None
    content_type: Annotated[
        str | None,
        Field(
            description="Category of content associated with the event (e.g., 'product', 'job', 'hotel'). Corresponds to the catalog type when used for catalog attribution."
        ),
    ] = None
    contents: Annotated[
        list[Content] | None, Field(description='Per-item details for e-commerce events')
    ] = None
    currency: Annotated[
        str | None, Field(description='ISO 4217 currency code', pattern='^[A-Z]{3}$')
    ] = None
    ext: ext_1.ExtensionObject | None = None
    num_items: Annotated[int | None, Field(description='Number of items in the event', ge=0)] = None
    order_id: Annotated[str | None, Field(description='Unique order or transaction identifier')] = (
        None
    )
    search_string: Annotated[str | None, Field(description='Search query for search events')] = None
    value: Annotated[
        float | None,
        Field(
            description='Monetary value of the event (should be accompanied by currency)', ge=0.0
        ),
    ] = None
