# generated by datamodel-codegen:
#   filename:  media_buy/list_authorized_properties_request.json
#   timestamp: 2025-11-22T15:23: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 ext as ext_1


class PublisherDomain(RootModel[str]):
    root: Annotated[
        str,
        Field(
            description="Publisher domain to filter by (e.g., 'cnn.com', 'espn.com')",
            pattern='^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$',
        ),
    ]


class ListAuthorizedPropertiesRequest(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None
    publisher_domains: Annotated[
        list[PublisherDomain] | None,
        Field(
            description='Filter to specific publisher domains (optional). If omitted, returns all publishers this agent represents.',
            min_length=1,
        ),
    ] = None
