"""
This file is generated by generator/run.py based on the Chrome DevTools Protocol.


https://chromedevtools.github.io/devtools-protocol/tot/Security/

***************************************************
                    Events
***************************************************
"""
from __future__ import annotations

from cdpkit.protocol._types import (
    Security,
)
from cdpkit.protocol.base import CDPEvent


class CertificateError(CDPEvent):
    """ There is a certificate error. If overriding certificate errors is enabled, then it should be
    handled with the `handleCertificateError` command. Note: this event does not fire if the
    certificate error has been allowed internally. Only one client per target should override
    certificate errors at the same time. """

    eventId: int
    errorType: str
    requestURL: str


class VisibleSecurityStateChanged(CDPEvent):
    """ The security state of the page changed. """

    visibleSecurityState: Security.VisibleSecurityState


class SecurityStateChanged(CDPEvent):
    """ The security state of the page changed. No longer being sent. """

    securityState: Security.SecurityState
    schemeIsCryptographic: bool  # deprecated
    explanations: list[Security.SecurityStateExplanation]  # deprecated
    insecureContentStatus: Security.InsecureContentStatus  # deprecated
    summary: str | None = None  # deprecated
