# generated by datamodel-codegen:
#   filename:  signals/get_signals_request.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, RootModel

from ..core import context as context_1
from ..core import destination
from ..core import ext as ext_1
from ..core import signal_filters


class Country(RootModel[str]):
    root: Annotated[str, Field(pattern='^[A-Z]{2}$')]


class DeliverTo(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    countries: Annotated[
        list[Country], Field(description='Countries where signals will be used (ISO codes)')
    ]
    deployments: Annotated[
        list[destination.Destination],
        Field(
            description='List of deployment targets (DSPs, sales agents, etc.). If the authenticated caller matches one of these deployment targets, activation keys will be included in the response.',
            min_length=1,
        ),
    ]


class GetSignalsRequest(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    context: context_1.ContextObject | None = None
    deliver_to: Annotated[
        DeliverTo, Field(description='Deployment targets where signals need to be activated')
    ]
    ext: ext_1.ExtensionObject | None = None
    filters: signal_filters.SignalFilters | None = None
    max_results: Annotated[
        int | None, Field(description='Maximum number of results to return', ge=1)
    ] = None
    signal_spec: Annotated[
        str, Field(description='Natural language description of the desired signals')
    ]
