# generated by datamodel-codegen:
#   filename:  signals/get_signals_response.json
#   timestamp: 2026-01-08T19:25:24+00:00

from __future__ import annotations

from typing import Annotated

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

from ..core import context as context_1
from ..core import deployment, error
from ..core import ext as ext_1
from ..enums import signal_catalog_type


class Pricing(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    cpm: Annotated[float, Field(description='Cost per thousand impressions', ge=0.0)]
    currency: Annotated[str, Field(description='Currency code', pattern='^[A-Z]{3}$')]


class Signal(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    coverage_percentage: Annotated[
        float, Field(description='Percentage of audience coverage', ge=0.0, le=100.0)
    ]
    data_provider: Annotated[str, Field(description='Name of the data provider')]
    deployments: Annotated[
        list[deployment.Deployment], Field(description='Array of deployment targets')
    ]
    description: Annotated[str, Field(description='Detailed signal description')]
    name: Annotated[str, Field(description='Human-readable signal name')]
    pricing: Annotated[Pricing, Field(description='Pricing information')]
    signal_agent_segment_id: Annotated[str, Field(description='Unique identifier for the signal')]
    signal_type: Annotated[
        signal_catalog_type.SignalCatalogType, Field(description='Type of signal')
    ]


class GetSignalsResponse(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    context: context_1.ContextObject | None = None
    errors: Annotated[
        list[error.Error] | None,
        Field(
            description='Task-specific errors and warnings (e.g., signal discovery or pricing issues)'
        ),
    ] = None
    ext: ext_1.ExtensionObject | None = None
    signals: Annotated[list[Signal], Field(description='Array of matching signals')]
