# This file was auto-generated by Fern from our API Definition.

from ...core.unchecked_base_model import UncheckedBaseModel
import typing
import pydantic
from .incident_response_escalation_target_union import (
    IncidentResponseEscalationTargetUnion,
)
from ...common.types.id import Id
from ...engine.types.object import Object
from ...core.pydantic_utilities import IS_PYDANTIC_V2


class IncidentResponseEscalationRule(UncheckedBaseModel):
    escalation_delay: typing.Optional[int] = pydantic.Field(default=None)
    """
    The delay in milliseconds before the next target is notified.
    """

    targets: typing.Optional[typing.List[IncidentResponseEscalationTargetUnion]] = (
        pydantic.Field(default=None)
    )
    """
    The targets to notify.
    """

    uid: Id = pydantic.Field()
    """
    The unique identifier for the escalation rule.
    """

    unmapped: typing.Optional[Object] = pydantic.Field(default=None)
    """
    The attributes that are not mapped to the incident response user schema. The names and values of those attributes are specific to each provider.
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
            extra="allow"
        )  # type: ignore # Pydantic v2
    else:

        class Config:
            smart_union = True
            extra = pydantic.Extra.allow
