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

from __future__ import annotations
from .v3_escalationpolicies_escalationpolicyresponse import (
    V3EscalationPoliciesEscalationPolicyResponse,
    V3EscalationPoliciesEscalationPolicyResponseTypedDict,
)
from squadcast_sdk.types import BaseModel
from squadcast_sdk.utils import FieldMetadata, QueryParamMetadata
from typing import Callable, List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class EscalationPoliciesGetEscalationPolicyByTeamRequestTypedDict(TypedDict):
    owner_id: str
    r"""here owner_id represents team_id, if  team_id is not provided, it will return escalation policies of all teams."""
    page_number: NotRequired[int]
    page_size: NotRequired[int]


class EscalationPoliciesGetEscalationPolicyByTeamRequest(BaseModel):
    owner_id: Annotated[
        str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
    ]
    r"""here owner_id represents team_id, if  team_id is not provided, it will return escalation policies of all teams."""

    page_number: Annotated[
        Optional[int],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = None

    page_size: Annotated[
        Optional[int],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = None


class EscalationPoliciesGetEscalationPolicyByTeamMetaTypedDict(TypedDict):
    total_count: int


class EscalationPoliciesGetEscalationPolicyByTeamMeta(BaseModel):
    total_count: int


class EscalationPoliciesGetEscalationPolicyByTeamResponseBodyTypedDict(TypedDict):
    r"""The request has succeeded."""

    data: List[V3EscalationPoliciesEscalationPolicyResponseTypedDict]
    meta: EscalationPoliciesGetEscalationPolicyByTeamMetaTypedDict


class EscalationPoliciesGetEscalationPolicyByTeamResponseBody(BaseModel):
    r"""The request has succeeded."""

    data: List[V3EscalationPoliciesEscalationPolicyResponse]

    meta: EscalationPoliciesGetEscalationPolicyByTeamMeta


class EscalationPoliciesGetEscalationPolicyByTeamResponseTypedDict(TypedDict):
    result: EscalationPoliciesGetEscalationPolicyByTeamResponseBodyTypedDict


class EscalationPoliciesGetEscalationPolicyByTeamResponse(BaseModel):
    next: Callable[[], Optional[EscalationPoliciesGetEscalationPolicyByTeamResponse]]

    result: EscalationPoliciesGetEscalationPolicyByTeamResponseBody
