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

from __future__ import annotations
from .getassessmentordersopenpositiveresponse import (
    GetAssessmentOrdersOpenPositiveResponse,
    GetAssessmentOrdersOpenPositiveResponseTypedDict,
)
from kombo.types import BaseModel
from kombo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata
import pydantic
from typing import Awaitable, Callable, Optional, Union
from typing_extensions import Annotated, NotRequired, TypedDict


class GetAssessmentOrdersOpenGlobalsTypedDict(TypedDict):
    integration_id: NotRequired[str]
    r"""ID of the integration you want to interact with."""


class GetAssessmentOrdersOpenGlobals(BaseModel):
    integration_id: Annotated[
        Optional[str],
        pydantic.Field(alias="X-Integration-Id"),
        FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
    ] = None
    r"""ID of the integration you want to interact with."""


class GetAssessmentOrdersOpenRequestTypedDict(TypedDict):
    cursor: NotRequired[str]
    r"""An optional cursor string used for pagination. This can be retrieved from the `next` property of the previous page response."""
    page_size: NotRequired[int]
    r"""The number of results to return per page. Maximum is 250."""


class GetAssessmentOrdersOpenRequest(BaseModel):
    cursor: Annotated[
        Optional[str],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = None
    r"""An optional cursor string used for pagination. This can be retrieved from the `next` property of the previous page response."""

    page_size: Annotated[
        Optional[int],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = 100
    r"""The number of results to return per page. Maximum is 250."""


class GetAssessmentOrdersOpenResponseTypedDict(TypedDict):
    result: GetAssessmentOrdersOpenPositiveResponseTypedDict


class GetAssessmentOrdersOpenResponse(BaseModel):
    next: Union[
        Callable[[], Optional[GetAssessmentOrdersOpenResponse]],
        Callable[[], Awaitable[Optional[GetAssessmentOrdersOpenResponse]]],
    ]

    result: GetAssessmentOrdersOpenPositiveResponse
