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

from __future__ import annotations
from .dsapublickey import DsaPublicKey, DsaPublicKeyTypedDict
from .ecdsapublickey import EcdsaPublicKey, EcdsaPublicKeyTypedDict
from .keyalgorithm import KeyAlgorithm, KeyAlgorithmTypedDict
from .rsapublickey import RsaPublicKey, RsaPublicKeyTypedDict
from .unrecognizedpublickey import UnrecognizedPublicKey, UnrecognizedPublicKeyTypedDict
from censys_platform.types import BaseModel
from typing import Optional
from typing_extensions import NotRequired, TypedDict


class SubjectKeyInfoTypedDict(TypedDict):
    dsa: NotRequired[DsaPublicKeyTypedDict]
    ecdsa: NotRequired[EcdsaPublicKeyTypedDict]
    fingerprint_sha256: NotRequired[str]
    r"""The SHA-256 digest of the certificate's DER-encoded SubjectPublicKeyInfo."""
    key_algorithm: NotRequired[KeyAlgorithmTypedDict]
    rsa: NotRequired[RsaPublicKeyTypedDict]
    unrecognized: NotRequired[UnrecognizedPublicKeyTypedDict]


class SubjectKeyInfo(BaseModel):
    dsa: Optional[DsaPublicKey] = None

    ecdsa: Optional[EcdsaPublicKey] = None

    fingerprint_sha256: Optional[str] = None
    r"""The SHA-256 digest of the certificate's DER-encoded SubjectPublicKeyInfo."""

    key_algorithm: Optional[KeyAlgorithm] = None

    rsa: Optional[RsaPublicKey] = None

    unrecognized: Optional[UnrecognizedPublicKey] = None
