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

from __future__ import annotations
from .v4_statuspages_newstatuspagecomponentlist import (
    V4StatusPagesNewStatusPageComponentList,
    V4StatusPagesNewStatusPageComponentListTypedDict,
)
from .v4_statuspages_newstatuspagethemecolor import (
    V4StatusPagesNewStatusPageThemeColor,
    V4StatusPagesNewStatusPageThemeColorTypedDict,
)
import pydantic
from squadcast_sdk.types import BaseModel
from typing import List, Literal, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


V4StatusPagesCreateStatusPageRequestOwnerType = Literal[
    "team",
    "user",
    "squad",
]


class V4StatusPagesCreateStatusPageRequestTypedDict(TypedDict):
    name: str
    domain_name: str
    logo_url: str
    timezone: str
    team_id: str
    contact_email: str
    owner_type: V4StatusPagesCreateStatusPageRequestOwnerType
    owner_id: str
    description: NotRequired[str]
    is_public: NotRequired[bool]
    custom_domain_name: NotRequired[str]
    theme_color: NotRequired[V4StatusPagesNewStatusPageThemeColorTypedDict]
    components: NotRequired[List[V4StatusPagesNewStatusPageComponentListTypedDict]]
    allow_webhook_subscription: NotRequired[bool]
    allow_components_subscription: NotRequired[bool]
    allow_maintenance_subscription: NotRequired[bool]


class V4StatusPagesCreateStatusPageRequest(BaseModel):
    name: str

    domain_name: Annotated[str, pydantic.Field(alias="domainName")]

    logo_url: Annotated[str, pydantic.Field(alias="logoUrl")]

    timezone: str

    team_id: Annotated[str, pydantic.Field(alias="teamID")]

    contact_email: Annotated[str, pydantic.Field(alias="contactEmail")]

    owner_type: Annotated[
        V4StatusPagesCreateStatusPageRequestOwnerType, pydantic.Field(alias="ownerType")
    ]

    owner_id: Annotated[str, pydantic.Field(alias="ownerID")]

    description: Optional[str] = None

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

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

    theme_color: Annotated[
        Optional[V4StatusPagesNewStatusPageThemeColor],
        pydantic.Field(alias="themeColor"),
    ] = None

    components: Optional[List[V4StatusPagesNewStatusPageComponentList]] = None

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

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

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