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

from __future__ import annotations
from .v4_statuspages_statuspagesubscribercomponent import (
    V4StatusPagesStatusPageSubscriberComponent,
    V4StatusPagesStatusPageSubscriberComponentTypedDict,
)
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 V4StatusPagesStatusPageSubscriberTypedDict(TypedDict):
    id: int
    type: str
    email_id: str
    webhook_url: str
    status: str
    subscribed_on: datetime
    component_list: NotRequired[
        List[V4StatusPagesStatusPageSubscriberComponentTypedDict]
    ]


class V4StatusPagesStatusPageSubscriber(BaseModel):
    id: int

    type: str

    email_id: Annotated[str, pydantic.Field(alias="emailID")]

    webhook_url: Annotated[str, pydantic.Field(alias="webhookURL")]

    status: str

    subscribed_on: Annotated[datetime, pydantic.Field(alias="subscribedOn")]

    component_list: Annotated[
        Optional[List[V4StatusPagesStatusPageSubscriberComponent]],
        pydantic.Field(alias="componentList"),
    ] = None
