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

from __future__ import annotations
import pydantic
from squadcast_sdk.types import BaseModel
from typing import List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class V4StatusPagesUpdateStatusPageByIDRequestThemeColorTypedDict(TypedDict):
    primary: str
    secondary: str


class V4StatusPagesUpdateStatusPageByIDRequestThemeColor(BaseModel):
    primary: str

    secondary: str


class V4StatusPagesUpdateStatusPageByIDRequestComponent1TypedDict(TypedDict):
    type: NotRequired[str]
    name: NotRequired[str]
    allow_subscription: NotRequired[bool]
    description: NotRequired[str]
    service_id: NotRequired[str]


class V4StatusPagesUpdateStatusPageByIDRequestComponent1(BaseModel):
    type: Optional[str] = None

    name: Optional[str] = None

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

    description: Optional[str] = None

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


class V4StatusPagesUpdateStatusPageByIDRequestComponent2TypedDict(TypedDict):
    type: NotRequired[str]
    name: NotRequired[str]
    allow_subscription: NotRequired[bool]
    description: NotRequired[str]
    components: NotRequired[
        List[V4StatusPagesUpdateStatusPageByIDRequestComponent1TypedDict]
    ]


class V4StatusPagesUpdateStatusPageByIDRequestComponent2(BaseModel):
    type: Optional[str] = None

    name: Optional[str] = None

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

    description: Optional[str] = None

    components: Optional[List[V4StatusPagesUpdateStatusPageByIDRequestComponent1]] = (
        None
    )


class V4StatusPagesUpdateStatusPageByIDRequestTypedDict(TypedDict):
    name: str
    is_public: bool
    domain_name: str
    team_id: str
    theme_color: V4StatusPagesUpdateStatusPageByIDRequestThemeColorTypedDict
    contact_email: str
    owner_type: str
    owner_id: str
    description: NotRequired[str]
    custom_domain_name: NotRequired[str]
    logo_url: NotRequired[str]
    timezone: NotRequired[str]
    allow_components_subscription: NotRequired[bool]
    allow_maintenance_subscription: NotRequired[bool]
    allow_webhook_subscription: NotRequired[bool]
    components: NotRequired[
        List[V4StatusPagesUpdateStatusPageByIDRequestComponent2TypedDict]
    ]
    is_custom_domain_enabled: NotRequired[bool]
    hide_from_search_engines: NotRequired[bool]


class V4StatusPagesUpdateStatusPageByIDRequest(BaseModel):
    name: str

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

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

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

    theme_color: Annotated[
        V4StatusPagesUpdateStatusPageByIDRequestThemeColor,
        pydantic.Field(alias="themeColor"),
    ]

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

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

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

    description: Optional[str] = None

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

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

    timezone: Optional[str] = None

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

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

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

    components: Optional[List[V4StatusPagesUpdateStatusPageByIDRequestComponent2]] = (
        None
    )

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

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