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

from __future__ import annotations

from typing import Annotated, Literal

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


class CpcPricingOption(AdCPBaseModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    currency: Annotated[
        str,
        Field(
            description="ISO 4217 currency code",
            examples=["USD", "EUR", "GBP", "JPY"],
            pattern="^[A-Z]{3}$",
        ),
    ]
    min_spend_per_package: Annotated[
        float | None,
        Field(
            description="Minimum spend requirement per package using this pricing option, in the specified currency",
            ge=0.0,
        ),
    ] = None
    pricing_model: Annotated[Literal["cpc"], Field(description="Cost per click")]
    pricing_option_id: Annotated[
        str,
        Field(
            description="Unique identifier for this pricing option within the product (e.g., 'cpc_usd_fixed')"
        ),
    ]
    rate: Annotated[float, Field(description="Fixed CPC rate (cost per click)", ge=0.0)]
