"""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 BasicConstraintsTypedDict(TypedDict):
    is_ca: NotRequired[bool]
    r"""Whether the certificate is permitted to sign other certificates."""
    max_path_len: NotRequired[int]
    r"""When present, provides the maximum number of intermediate certificates that may follow this certificate in a trusted certification path."""


class BasicConstraints(BaseModel):
    is_ca: Optional[bool] = None
    r"""Whether the certificate is permitted to sign other certificates."""

    max_path_len: Optional[int] = None
    r"""When present, provides the maximum number of intermediate certificates that may follow this certificate in a trusted certification path."""
