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

from __future__ import annotations
from censys_platform.types import BaseModel
from typing import Optional
from typing_extensions import NotRequired, TypedDict


class AutonomousSystemTypedDict(TypedDict):
    asn: NotRequired[int]
    r"""The ASN (autonomous system number) of the host's autonomous system."""
    bgp_prefix: NotRequired[str]
    r"""The autonomous system's CIDR."""
    country_code: NotRequired[str]
    r"""The autonomous system's two-letter ISO 3166-1 alpha-2 country code (US, CN, GB, RU, ...)."""
    description: NotRequired[str]
    r"""Brief description of the autonomous system."""
    name: NotRequired[str]
    r"""The friendly name of the autonomous system."""
    organization: NotRequired[str]
    r"""The name of the organization managning the autonomous system."""


class AutonomousSystem(BaseModel):
    asn: Optional[int] = None
    r"""The ASN (autonomous system number) of the host's autonomous system."""

    bgp_prefix: Optional[str] = None
    r"""The autonomous system's CIDR."""

    country_code: Optional[str] = None
    r"""The autonomous system's two-letter ISO 3166-1 alpha-2 country code (US, CN, GB, RU, ...)."""

    description: Optional[str] = None
    r"""Brief description of the autonomous system."""

    name: Optional[str] = None
    r"""The friendly name of the autonomous system."""

    organization: Optional[str] = None
    r"""The name of the organization managning the autonomous system."""
