"""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 KeyUsageTypedDict(TypedDict):
    certificate_sign: NotRequired[bool]
    r"""Whether the keyCertSign bit is set."""
    content_commitment: NotRequired[bool]
    r"""Whether the contentCommitment (formerly called nonRepudiation) bit is set."""
    crl_sign: NotRequired[bool]
    r"""Whether the cRLSign bit is set."""
    data_encipherment: NotRequired[bool]
    r"""Whether the dataEncipherment bit is set."""
    decipher_only: NotRequired[bool]
    r"""Whether the decipherOnly bit is set."""
    digital_signature: NotRequired[bool]
    r"""Whether the digitalSignature bit is set."""
    encipher_only: NotRequired[bool]
    r"""Whether the encipherOnly bit is set."""
    key_agreement: NotRequired[bool]
    r"""Whether the keyAgreement bit is set."""
    key_encipherment: NotRequired[bool]
    r"""Whether the keyEncipherment bit is set."""
    value: NotRequired[int]
    r"""The integer value of the bitmask in the extension."""


class KeyUsage(BaseModel):
    certificate_sign: Optional[bool] = None
    r"""Whether the keyCertSign bit is set."""

    content_commitment: Optional[bool] = None
    r"""Whether the contentCommitment (formerly called nonRepudiation) bit is set."""

    crl_sign: Optional[bool] = None
    r"""Whether the cRLSign bit is set."""

    data_encipherment: Optional[bool] = None
    r"""Whether the dataEncipherment bit is set."""

    decipher_only: Optional[bool] = None
    r"""Whether the decipherOnly bit is set."""

    digital_signature: Optional[bool] = None
    r"""Whether the digitalSignature bit is set."""

    encipher_only: Optional[bool] = None
    r"""Whether the encipherOnly bit is set."""

    key_agreement: Optional[bool] = None
    r"""Whether the keyAgreement bit is set."""

    key_encipherment: Optional[bool] = None
    r"""Whether the keyEncipherment bit is set."""

    value: Optional[int] = None
    r"""The integer value of the bitmask in the extension."""
