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

from __future__ import annotations
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 V4StatusPagesMaintenancesMaintenanceComponentTypedDict(TypedDict):
    id: NotRequired[int]
    name: NotRequired[str]
    group_name: NotRequired[str]


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

    name: Optional[str] = None

    group_name: Annotated[Optional[str], pydantic.Field(alias="groupName")] = None


class V4StatusPagesMaintenancesMaintenanceTypedDict(TypedDict):
    id: NotRequired[int]
    title: NotRequired[str]
    page_id: NotRequired[int]
    note: NotRequired[str]
    components: NotRequired[
        List[V4StatusPagesMaintenancesMaintenanceComponentTypedDict]
    ]
    start_time: NotRequired[datetime]
    end_time: NotRequired[datetime]
    maintenance_state: NotRequired[str]


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

    title: Optional[str] = None

    page_id: Annotated[Optional[int], pydantic.Field(alias="pageID")] = None

    note: Optional[str] = None

    components: Optional[List[V4StatusPagesMaintenancesMaintenanceComponent]] = None

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

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

    maintenance_state: Annotated[
        Optional[str], pydantic.Field(alias="maintenanceState")
    ] = None
