"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from squadcast_sdk.types import BaseModel
from typing import Literal, Optional
from typing_extensions import NotRequired, TypedDict


V3EscalationPoliciesEscalationEntityType = Literal[
    "user",
    "squad",
    "schedule",
    "schedulev2",
]
r"""The type of the entity."""


class V3EscalationPoliciesEscalationEntityTypedDict(TypedDict):
    r"""Represents an entity to be notified in an escalation rule."""

    type: V3EscalationPoliciesEscalationEntityType
    r"""The type of the entity."""
    id: NotRequired[str]
    r"""The unique identifier of the entity (user, squad, or schedule v1)."""
    pid: NotRequired[int]
    r"""The unique identifier of the entity (schedule v2)."""


class V3EscalationPoliciesEscalationEntity(BaseModel):
    r"""Represents an entity to be notified in an escalation rule."""

    type: V3EscalationPoliciesEscalationEntityType
    r"""The type of the entity."""

    id: Optional[str] = None
    r"""The unique identifier of the entity (user, squad, or schedule v1)."""

    pid: Optional[int] = None
    r"""The unique identifier of the entity (schedule v2)."""
