# 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 .agent_target_config import AgentTargetConfig


class AgentHook(UncheckedBaseModel):
    """
    Hook model for agent targets (future).
    """

    id: str
    organization_id: str
    name: str
    description: typing.Optional[str] = None
    target_id: str
    status: typing.Optional[str] = None
    response_mode: typing.Optional[str] = None
    allowed_methods: typing.Optional[typing.List[str]] = None
    max_payload_size: typing.Optional[int] = None
    secret: typing.Optional[str] = None
    url: typing.Optional[str] = None
    created_at: dt.datetime
    updated_at: dt.datetime
    created_by: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
    target_type: typing.Optional[typing.Literal["agent"]] = None
    target_config: AgentTargetConfig

    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
