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

from __future__ import annotations
from .v4_statuspages_newstatuspagecomponent import (
    V4StatusPagesNewStatusPageComponent,
    V4StatusPagesNewStatusPageComponentTypedDict,
)
import pydantic
from squadcast_sdk.types import BaseModel
from typing import List, Literal, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


V4StatusPagesNewStatusPageComponentListType = Literal[
    "component",
    "group",
]


class V4StatusPagesNewStatusPageComponentListTypedDict(TypedDict):
    type: V4StatusPagesNewStatusPageComponentListType
    name: str
    allow_subscription: NotRequired[bool]
    description: NotRequired[str]
    components: NotRequired[List[V4StatusPagesNewStatusPageComponentTypedDict]]


class V4StatusPagesNewStatusPageComponentList(BaseModel):
    type: V4StatusPagesNewStatusPageComponentListType

    name: str

    allow_subscription: Annotated[
        Optional[bool], pydantic.Field(alias="allowSubscription")
    ] = None

    description: Optional[str] = None

    components: Optional[List[V4StatusPagesNewStatusPageComponent]] = None
