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

from __future__ import annotations
import pydantic
from pydantic import model_serializer
from squadcast.types import BaseModel, Nullable, UNSET_SENTINEL
from typing import List
from typing_extensions import Annotated, TypedDict


class V4StatusPagesIssuesDeleteIssueByIDResponseTypedDict(TypedDict):
    id: int
    component_i_ds: Nullable[List[int]]
    title: str


class V4StatusPagesIssuesDeleteIssueByIDResponse(BaseModel):
    id: int

    component_i_ds: Annotated[Nullable[List[int]], pydantic.Field(alias="componentIDs")]

    title: str

    @model_serializer(mode="wrap")
    def serialize_model(self, handler):
        serialized = handler(self)
        m = {}

        for n, f in type(self).model_fields.items():
            k = f.alias or n
            val = serialized.get(k, serialized.get(n))

            if val != UNSET_SENTINEL:
                m[k] = val

        return m


try:
    V4StatusPagesIssuesDeleteIssueByIDResponse.model_rebuild()
except NameError:
    pass
