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

from __future__ import annotations
from .responseenvelopesearchaggregateresponse import (
    ResponseEnvelopeSearchAggregateResponse,
    ResponseEnvelopeSearchAggregateResponseTypedDict,
)
from .searchaggregateinputbody import (
    SearchAggregateInputBody,
    SearchAggregateInputBodyTypedDict,
)
from censys_platform.types import BaseModel
from censys_platform.utils import FieldMetadata, QueryParamMetadata, RequestMetadata
from typing import Dict, List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class V3GlobaldataSearchAggregateGlobalsTypedDict(TypedDict):
    organization_id: NotRequired[str]


class V3GlobaldataSearchAggregateGlobals(BaseModel):
    organization_id: Annotated[
        Optional[str],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = None


class V3GlobaldataSearchAggregateRequestTypedDict(TypedDict):
    search_aggregate_input_body: SearchAggregateInputBodyTypedDict
    organization_id: NotRequired[str]
    r"""The ID of a Censys organization to associate the request with. See the [Getting Started docs](https://docs.censys.com/reference/get-started#step-3-find-and-use-your-organization-id-optional) for more information."""


class V3GlobaldataSearchAggregateRequest(BaseModel):
    search_aggregate_input_body: Annotated[
        SearchAggregateInputBody,
        FieldMetadata(request=RequestMetadata(media_type="application/json")),
    ]

    organization_id: Annotated[
        Optional[str],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=False)),
    ] = None
    r"""The ID of a Censys organization to associate the request with. See the [Getting Started docs](https://docs.censys.com/reference/get-started#step-3-find-and-use-your-organization-id-optional) for more information."""


class V3GlobaldataSearchAggregateResponseTypedDict(TypedDict):
    headers: Dict[str, List[str]]
    result: ResponseEnvelopeSearchAggregateResponseTypedDict


class V3GlobaldataSearchAggregateResponse(BaseModel):
    headers: Dict[str, List[str]]

    result: ResponseEnvelopeSearchAggregateResponse
