# generated by datamodel-codegen:
#   filename:  deployment.json
#   timestamp: 2025-11-15T22:03:55+00:00

from __future__ import annotations

from typing import Annotated, Literal

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

from . import activation_key as activation_key_1


class Deployment1(AdCPBaseModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    account: Annotated[str | None, Field(description="Account identifier if applicable")] = None
    activation_key: Annotated[
        activation_key_1.ActivationKey1 | activation_key_1.ActivationKey2 | None,
        Field(
            description="The key to use for targeting. Only present if is_live=true AND requester has access to this destination.",
            title="Activation Key",
        ),
    ] = None
    deployed_at: Annotated[
        AwareDatetime | None,
        Field(description="Timestamp when activation completed (if is_live=true)"),
    ] = None
    estimated_activation_duration_minutes: Annotated[
        float | None,
        Field(
            description="Estimated time to activate if not live, or to complete activation if in progress",
            ge=0.0,
        ),
    ] = None
    is_live: Annotated[
        bool, Field(description="Whether signal is currently active on this destination")
    ]
    platform: Annotated[str, Field(description="Platform identifier for DSPs")]
    type: Annotated[
        Literal["platform"],
        Field(description="Discriminator indicating this is a platform-based deployment"),
    ]


class Deployment2(AdCPBaseModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    account: Annotated[str | None, Field(description="Account identifier if applicable")] = None
    activation_key: Annotated[
        activation_key_1.ActivationKey1 | activation_key_1.ActivationKey2 | None,
        Field(
            description="The key to use for targeting. Only present if is_live=true AND requester has access to this destination.",
            title="Activation Key",
        ),
    ] = None
    agent_url: Annotated[AnyUrl, Field(description="URL identifying the destination agent")]
    deployed_at: Annotated[
        AwareDatetime | None,
        Field(description="Timestamp when activation completed (if is_live=true)"),
    ] = None
    estimated_activation_duration_minutes: Annotated[
        float | None,
        Field(
            description="Estimated time to activate if not live, or to complete activation if in progress",
            ge=0.0,
        ),
    ] = None
    is_live: Annotated[
        bool, Field(description="Whether signal is currently active on this destination")
    ]
    type: Annotated[
        Literal["agent"],
        Field(description="Discriminator indicating this is an agent URL-based deployment"),
    ]
