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

from __future__ import annotations
import pydantic
from squadcast_sdk.types import BaseModel
from typing import Any, List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class URLTypedDict(TypedDict):
    url: NotRequired[str]
    method: NotRequired[str]


class URL(BaseModel):
    url: Optional[str] = None

    method: Optional[str] = None


class V3IncidentsIncidentActionsWebhookActionResponseHeaderTypedDict(TypedDict):
    content_type: str


class V3IncidentsIncidentActionsWebhookActionResponseHeader(BaseModel):
    content_type: Annotated[str, pydantic.Field(alias="Content-Type")]


class V3IncidentsIncidentActionsWebhookActionResponseTypedDict(TypedDict):
    r"""Represents the response structure for triggering a webhook manually."""

    id: str
    created_at: str
    updated_at: str
    version: str
    organization_id: str
    author_id: str
    name: str
    slug: str
    description: str
    triggers: List[str]
    urls: List[URLTypedDict]
    teams: List[str]
    is_all_teams_configured: bool
    custom_payload_template_slug: str
    header: V3IncidentsIncidentActionsWebhookActionResponseHeaderTypedDict
    filters: Any
    trigger_type: str
    language: str
    max_retry: int
    mail_ids: List[str]
    payload_type: str
    custom_payload: str


class V3IncidentsIncidentActionsWebhookActionResponse(BaseModel):
    r"""Represents the response structure for triggering a webhook manually."""

    id: str

    created_at: str

    updated_at: str

    version: str

    organization_id: str

    author_id: str

    name: str

    slug: str

    description: str

    triggers: List[str]

    urls: List[URL]

    teams: List[str]

    is_all_teams_configured: bool

    custom_payload_template_slug: str

    header: V3IncidentsIncidentActionsWebhookActionResponseHeader

    filters: Any

    trigger_type: str

    language: str

    max_retry: int

    mail_ids: List[str]

    payload_type: str

    custom_payload: str
