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

from __future__ import annotations
from .responseenvelopehostobservationresponse import (
    ResponseEnvelopeHostObservationResponse,
    ResponseEnvelopeHostObservationResponseTypedDict,
)
from censys_platform.types import BaseModel
from censys_platform.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata
from typing import Dict, List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


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


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


class V3ThreathuntingGetHostObservationsWithCertificateRequestTypedDict(TypedDict):
    certificate_id: str
    r"""SHA-256 hash of the certificate"""
    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."""
    start_time: NotRequired[str]
    r"""Only show ranges ending at or after this time (ISO 8601)"""
    end_time: NotRequired[str]
    r"""Only show ranges starting at or before this time (ISO 8601)"""
    port: NotRequired[int]
    r"""The port to filter by"""
    protocol: NotRequired[str]
    r"""The transport protocol to filter by"""
    page_token: NotRequired[str]
    r"""Pagination token from previous response to retrieve next page of results"""
    page_size: NotRequired[int]
    r"""Number of results per page. Maximum 100, defaults to 100 if not specified"""


class V3ThreathuntingGetHostObservationsWithCertificateRequest(BaseModel):
    certificate_id: Annotated[
        str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
    ]
    r"""SHA-256 hash of the certificate"""

    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."""

    start_time: Annotated[
        Optional[str],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=False)),
    ] = None
    r"""Only show ranges ending at or after this time (ISO 8601)"""

    end_time: Annotated[
        Optional[str],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=False)),
    ] = None
    r"""Only show ranges starting at or before this time (ISO 8601)"""

    port: Annotated[
        Optional[int],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=False)),
    ] = None
    r"""The port to filter by"""

    protocol: Annotated[
        Optional[str],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=False)),
    ] = None
    r"""The transport protocol to filter by"""

    page_token: Annotated[
        Optional[str],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=False)),
    ] = None
    r"""Pagination token from previous response to retrieve next page of results"""

    page_size: Annotated[
        Optional[int],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=False)),
    ] = None
    r"""Number of results per page. Maximum 100, defaults to 100 if not specified"""


class V3ThreathuntingGetHostObservationsWithCertificateResponseTypedDict(TypedDict):
    headers: Dict[str, List[str]]
    result: ResponseEnvelopeHostObservationResponseTypedDict


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

    result: ResponseEnvelopeHostObservationResponse
