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

from __future__ import annotations
from censys_platform.types import BaseModel
from typing import Union
from typing_extensions import TypeAliasType, TypedDict


class HostnamePortTypedDict(TypedDict):
    hostname: str
    r"""Hostname to scan"""
    port: int
    r"""Port number to scan"""


class HostnamePort(BaseModel):
    hostname: str
    r"""Hostname to scan"""

    port: int
    r"""Port number to scan"""


class Target2TypedDict(TypedDict):
    r"""Discovery scan against hostname:PORT"""

    hostname_port: HostnamePortTypedDict


class Target2(BaseModel):
    r"""Discovery scan against hostname:PORT"""

    hostname_port: HostnamePort


class HostPortTypedDict(TypedDict):
    ip: str
    r"""IP address to scan"""
    port: int
    r"""Port number to scan"""


class HostPort(BaseModel):
    ip: str
    r"""IP address to scan"""

    port: int
    r"""Port number to scan"""


class Target1TypedDict(TypedDict):
    r"""Discovery scan against IP:PORT"""

    host_port: HostPortTypedDict


class Target1(BaseModel):
    r"""Discovery scan against IP:PORT"""

    host_port: HostPort


ScansDiscoveryInputBodyTargetTypedDict = TypeAliasType(
    "ScansDiscoveryInputBodyTargetTypedDict", Union[Target1TypedDict, Target2TypedDict]
)


ScansDiscoveryInputBodyTarget = TypeAliasType(
    "ScansDiscoveryInputBodyTarget", Union[Target1, Target2]
)


class ScansDiscoveryInputBodyTypedDict(TypedDict):
    target: ScansDiscoveryInputBodyTargetTypedDict


class ScansDiscoveryInputBody(BaseModel):
    target: ScansDiscoveryInputBodyTarget
