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

from __future__ import annotations
from .v4_statuspages_issues_issuecomponent import (
    V4StatusPagesIssuesIssueComponent,
    V4StatusPagesIssuesIssueComponentTypedDict,
)
from .v4_statuspages_issues_issuestate import (
    V4StatusPagesIssuesIssueState,
    V4StatusPagesIssuesIssueStateTypedDict,
)
from datetime import datetime
import pydantic
from squadcast_sdk.types import BaseModel
from typing import List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class V4StatusPagesIssuesIssueTypedDict(TypedDict):
    id: NotRequired[int]
    title: NotRequired[str]
    components: NotRequired[List[V4StatusPagesIssuesIssueComponentTypedDict]]
    current_state: NotRequired[V4StatusPagesIssuesIssueStateTypedDict]
    created_at: NotRequired[datetime]


class V4StatusPagesIssuesIssue(BaseModel):
    id: Optional[int] = None

    title: Optional[str] = None

    components: Optional[List[V4StatusPagesIssuesIssueComponent]] = None

    current_state: Annotated[
        Optional[V4StatusPagesIssuesIssueState], pydantic.Field(alias="currentState")
    ] = None

    created_at: Annotated[Optional[datetime], pydantic.Field(alias="createdAt")] = None
