# generated by datamodel-codegen:
#   filename:  protocols/adcp_extension.json
#   timestamp: 2026-01-25T21:17:54+00:00

from __future__ import annotations

from enum import Enum
from typing import Annotated

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


class ExtensionsSupportedItem(RootModel[str]):
    root: Annotated[str, Field(pattern='^[a-z][a-z0-9_]*$')]


class ProtocolsSupportedEnum(Enum):
    media_buy = 'media_buy'
    creative = 'creative'
    signals = 'signals'


class AdcpAgentCardExtensionParamsDeprecated(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    adcp_version: Annotated[
        str,
        Field(
            deprecated=True,
            description='DEPRECATED: Use get_adcp_capabilities response adcp.major_versions instead.',
            pattern='^\\d+\\.\\d+\\.\\d+$',
        ),
    ]
    extensions_supported: Annotated[
        list[ExtensionsSupportedItem] | None,
        Field(
            deprecated=True,
            description='DEPRECATED: Typed extensions can be declared in get_adcp_capabilities ext field.',
        ),
    ] = None
    protocols_supported: Annotated[
        list[ProtocolsSupportedEnum],
        Field(
            deprecated=True,
            description='DEPRECATED: Use get_adcp_capabilities response supported_protocols instead.',
            min_length=1,
        ),
    ]
