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

import datetime as dt
import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel
from .actor_identity import ActorIdentity
from .scout_hook_config_http import ScoutHookConfigHttp
from .scout_hook_event_trigger import ScoutHookEventTrigger


class ScoutHook(UncheckedBaseModel):
    id: typing.Optional[str] = None
    doc_type: typing.Optional[typing.Literal["scout_hook"]] = None
    created_by: ActorIdentity
    updated_by: ActorIdentity
    created_at: typing.Optional[dt.datetime] = None
    updated_at: typing.Optional[dt.datetime] = None
    is_seed: typing.Optional[bool] = None
    hook_config: ScoutHookConfigHttp
    name: str
    description: typing.Optional[str] = None
    metadata: typing.Dict[str, typing.Optional[typing.Any]]
    parent: str
    triggering_events: typing.List[ScoutHookEventTrigger]

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

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