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

from ..core import context as context_1
from ..core import deployment, error
from ..core import ext as ext_1
from ..core import pagination_response
from ..core import signal_id as signal_id_1
from ..core import signal_pricing_option
from ..enums import signal_catalog_type, signal_value_type


class Range(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    max: Annotated[float, Field(description='Maximum value (inclusive)')]
    min: Annotated[float, Field(description='Minimum value (inclusive)')]


class Signal(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    categories: Annotated[
        list[str] | None,
        Field(
            description="Valid values for categorical signals. Present when value_type is 'categorical'. Buyers must use one of these values in SignalTargeting.values."
        ),
    ] = None
    coverage_percentage: Annotated[
        float, Field(description='Percentage of audience coverage', ge=0.0, le=100.0)
    ]
    data_provider: Annotated[str, Field(description='Human-readable 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_options: Annotated[
        list[signal_pricing_option.SignalPricingOption],
        Field(
            description='Pricing options available for this signal. The buyer selects one and passes its pricing_option_id in report_usage for billing verification.',
            min_length=1,
        ),
    ]
    range: Annotated[
        Range | None,
        Field(description="Valid range for numeric signals. Present when value_type is 'numeric'."),
    ] = None
    signal_agent_segment_id: Annotated[
        str,
        Field(
            description="Opaque identifier used for activation. This is the signals agent's internal segment ID."
        ),
    ]
    signal_id: Annotated[
        signal_id_1.SignalId | None,
        Field(
            description="Universal signal identifier referencing the data provider's catalog. Use this to verify authorization and look up signal definitions."
        ),
    ] = None
    signal_type: Annotated[
        signal_catalog_type.SignalCatalogType,
        Field(description='Catalog type of signal (marketplace, custom, owned)'),
    ]
    value_type: Annotated[
        signal_value_type.SignalValueType | None,
        Field(description="The data type of this signal's values (binary, categorical, numeric)"),
    ] = None


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
    pagination: pagination_response.PaginationResponse | None = None
    sandbox: Annotated[
        bool | None,
        Field(description='When true, this response contains simulated data from sandbox mode.'),
    ] = None
    signals: Annotated[list[Signal], Field(description='Array of matching signals')]
