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

All domain types in this module:
    To solve mutual import issues, all types are stored here uniformly
"""

from __future__ import annotations

import enum
from typing import Any, Literal

from cdpkit.protocol.base import JSON_DICT, CDPObject

""" Unique accessibility node identifier. """

AccessibilityAXNodeId = str


class AccessibilityAXValueType(enum.StrEnum):
    """ Enum of possible property types. """

    BOOLEAN = "boolean"
    TRISTATE = "tristate"
    BOOLEANORUNDEFINED = "booleanOrUndefined"
    IDREF = "idref"
    IDREFLIST = "idrefList"
    INTEGER = "integer"
    NODE = "node"
    NODELIST = "nodeList"
    NUMBER = "number"
    STRING = "string"
    COMPUTEDSTRING = "computedString"
    TOKEN = "token"
    TOKENLIST = "tokenList"
    DOMRELATION = "domRelation"
    ROLE = "role"
    INTERNALROLE = "internalRole"
    VALUEUNDEFINED = "valueUndefined"


class AccessibilityAXValueSourceType(enum.StrEnum):
    """ Enum of possible property sources. """

    ATTRIBUTE = "attribute"
    IMPLICIT = "implicit"
    STYLE = "style"
    CONTENTS = "contents"
    PLACEHOLDER = "placeholder"
    RELATEDELEMENT = "relatedElement"


class AccessibilityAXValueNativeSourceType(enum.StrEnum):
    """ Enum of possible native property sources (as a subtype of a particular AXValueSourceType). """

    DESCRIPTION = "description"
    FIGCAPTION = "figcaption"
    LABEL = "label"
    LABELFOR = "labelfor"
    LABELWRAPPED = "labelwrapped"
    LEGEND = "legend"
    RUBYANNOTATION = "rubyannotation"
    TABLECAPTION = "tablecaption"
    TITLE = "title"
    OTHER = "other"


class AccessibilityAXValueSource(CDPObject):
    """ A single source for a computed AX property. """

    # What type of source this is.
    type: Accessibility.AXValueSourceType

    # The value of this property source.
    value: Accessibility.AXValue | None = None

    # The name of the relevant attribute, if any.
    attribute: str | None = None

    # The value of the relevant attribute, if any.
    attributeValue: Accessibility.AXValue | None = None

    # Whether this source is superseded by a higher priority source.
    superseded: bool | None = None

    # The native markup source for this value, e.g. a `<label>` element.
    nativeSource: Accessibility.AXValueNativeSourceType | None = None

    # The value, such as a node or node list, of the native source.
    nativeSourceValue: Accessibility.AXValue | None = None

    # Whether the value for this property is invalid.
    invalid: bool | None = None

    # Reason for the value being invalid, if it is.
    invalidReason: str | None = None


class AccessibilityAXRelatedNode(CDPObject):

    # The BackendNodeId of the related DOM node.
    backendDOMNodeId: DOM.BackendNodeId

    # The IDRef value provided, if any.
    idref: str | None = None

    # The text alternative of this node in the current context.
    text: str | None = None


class AccessibilityAXProperty(CDPObject):

    # The name of this property.
    name: Accessibility.AXPropertyName

    # The value of this property.
    value: Accessibility.AXValue


class AccessibilityAXValue(CDPObject):
    """ A single computed AX property. """

    # The type of this value.
    type: Accessibility.AXValueType

    # The computed value of this property.
    value: Any = None

    # One or more related nodes, if applicable.
    relatedNodes: list[Accessibility.AXRelatedNode] | None = None

    # The sources which contributed to the computation of this property.
    sources: list[Accessibility.AXValueSource] | None = None


class AccessibilityAXPropertyName(enum.StrEnum):
    """ Values of AXProperty name:
    - from 'busy' to 'roledescription': states which apply to every AX node
    - from 'live' to 'root': attributes which apply to nodes in live regions
    - from 'autocomplete' to 'valuetext': attributes which apply to widgets
    - from 'checked' to 'selected': states which apply to widgets
    - from 'activedescendant' to 'owns': relationships between elements other than parent/child/sibling
    - from 'activeFullscreenElement' to 'uninteresting': reasons why this noode is hidden """

    ACTIONS = "actions"
    BUSY = "busy"
    DISABLED = "disabled"
    EDITABLE = "editable"
    FOCUSABLE = "focusable"
    FOCUSED = "focused"
    HIDDEN = "hidden"
    HIDDENROOT = "hiddenRoot"
    INVALID = "invalid"
    KEYSHORTCUTS = "keyshortcuts"
    SETTABLE = "settable"
    ROLEDESCRIPTION = "roledescription"
    LIVE = "live"
    ATOMIC = "atomic"
    RELEVANT = "relevant"
    ROOT = "root"
    AUTOCOMPLETE = "autocomplete"
    HASPOPUP = "hasPopup"
    LEVEL = "level"
    MULTISELECTABLE = "multiselectable"
    ORIENTATION = "orientation"
    MULTILINE = "multiline"
    READONLY = "readonly"
    REQUIRED = "required"
    VALUEMIN = "valuemin"
    VALUEMAX = "valuemax"
    VALUETEXT = "valuetext"
    CHECKED = "checked"
    EXPANDED = "expanded"
    MODAL = "modal"
    PRESSED = "pressed"
    SELECTED = "selected"
    ACTIVEDESCENDANT = "activedescendant"
    CONTROLS = "controls"
    DESCRIBEDBY = "describedby"
    DETAILS = "details"
    ERRORMESSAGE = "errormessage"
    FLOWTO = "flowto"
    LABELLEDBY = "labelledby"
    OWNS = "owns"
    URL = "url"
    ACTIVEFULLSCREENELEMENT = "activeFullscreenElement"
    ACTIVEMODALDIALOG = "activeModalDialog"
    ACTIVEARIAMODALDIALOG = "activeAriaModalDialog"
    ARIAHIDDENELEMENT = "ariaHiddenElement"
    ARIAHIDDENSUBTREE = "ariaHiddenSubtree"
    EMPTYALT = "emptyAlt"
    EMPTYTEXT = "emptyText"
    INERTELEMENT = "inertElement"
    INERTSUBTREE = "inertSubtree"
    LABELCONTAINER = "labelContainer"
    LABELFOR = "labelFor"
    NOTRENDERED = "notRendered"
    NOTVISIBLE = "notVisible"
    PRESENTATIONALROLE = "presentationalRole"
    PROBABLYPRESENTATIONAL = "probablyPresentational"
    INACTIVECAROUSELTABCONTENT = "inactiveCarouselTabContent"
    UNINTERESTING = "uninteresting"


class AccessibilityAXNode(CDPObject):
    """ A node in the accessibility tree. """

    # Unique identifier for this node.
    nodeId: Accessibility.AXNodeId

    # Whether this node is ignored for accessibility
    ignored: bool

    # Collection of reasons why this node is hidden.
    ignoredReasons: list[Accessibility.AXProperty] | None = None

    # This `Node`'s role, whether explicit or implicit.
    role: Accessibility.AXValue | None = None

    # This `Node`'s Chrome raw role.
    chromeRole: Accessibility.AXValue | None = None

    # The accessible name for this `Node`.
    name: Accessibility.AXValue | None = None

    # The accessible description for this `Node`.
    description: Accessibility.AXValue | None = None

    # The value for this `Node`.
    value: Accessibility.AXValue | None = None

    # All other properties
    properties: list[Accessibility.AXProperty] | None = None

    # ID for this node's parent.
    parentId: Accessibility.AXNodeId | None = None

    # IDs for each of this node's child nodes.
    childIds: list[Accessibility.AXNodeId] | None = None

    # The backend ID for the associated DOM node, if any.
    backendDOMNodeId: DOM.BackendNodeId | None = None

    # The frame ID for the frame associated with this nodes document.
    frameId: Page.FrameId | None = None


class AnimationAnimation(CDPObject):
    """ Animation instance. """

    # `Animation`'s id.
    id: str

    # `Animation`'s name.
    name: str

    # `Animation`'s internal paused state.
    pausedState: bool

    # `Animation`'s play state.
    playState: str

    # `Animation`'s playback rate.
    playbackRate: float

    # `Animation`'s start time. Milliseconds for time based animations andpercentage [0 - 100] for scroll driven animations (i.e. whenviewOrScrollTimeline exists).
    startTime: float

    # `Animation`'s current time.
    currentTime: float

    # Animation type of `Animation`.
    type: Literal['CSSTransition', 'CSSAnimation', 'WebAnimation']

    # `Animation`'s source animation node.
    source: Animation.AnimationEffect | None = None

    # A unique ID for `Animation` representing the sources that triggered thisCSS animation/transition.
    cssId: str | None = None

    # View or scroll timeline
    viewOrScrollTimeline: Animation.ViewOrScrollTimeline | None = None


class AnimationViewOrScrollTimeline(CDPObject):
    """ Timeline instance """

    # Scroll container node
    sourceNodeId: DOM.BackendNodeId | None = None

    # Represents the starting scroll position of the timeline as a length offsetin pixels from scroll origin.
    startOffset: float | None = None

    # Represents the ending scroll position of the timeline as a length offsetin pixels from scroll origin.
    endOffset: float | None = None

    # The element whose principal box's visibility in the scrollport defined theprogress of the timeline. Does not exist for animations with ScrollTimeline
    subjectNodeId: DOM.BackendNodeId | None = None

    # Orientation of the scroll
    axis: DOM.ScrollOrientation


class AnimationAnimationEffect(CDPObject):
    """ AnimationEffect instance """

    # `AnimationEffect`'s delay.
    delay: float

    # `AnimationEffect`'s end delay.
    endDelay: float

    # `AnimationEffect`'s iteration start.
    iterationStart: float

    # `AnimationEffect`'s iterations. Omitted if the value is infinite.
    iterations: float | None = None

    # `AnimationEffect`'s iteration duration. Milliseconds for time basedanimations and percentage [0 - 100] for scroll driven animations (i.e. whenviewOrScrollTimeline exists).
    duration: float

    # `AnimationEffect`'s playback direction.
    direction: str

    # `AnimationEffect`'s fill mode.
    fill: str

    # `AnimationEffect`'s target node.
    backendNodeId: DOM.BackendNodeId | None = None

    # `AnimationEffect`'s keyframes.
    keyframesRule: Animation.KeyframesRule | None = None

    # `AnimationEffect`'s timing function.
    easing: str


class AnimationKeyframesRule(CDPObject):
    """ Keyframes Rule """

    # CSS keyframed animation's name.
    name: str | None = None

    # List of animation keyframes.
    keyframes: list[Animation.KeyframeStyle]


class AnimationKeyframeStyle(CDPObject):
    """ Keyframe Style """

    # Keyframe's time offset.
    offset: str

    # `AnimationEffect`'s timing function.
    easing: str


class AuditsAffectedCookie(CDPObject):
    """ Information about a cookie that is affected by an inspector issue. """

    # The following three properties uniquely identify a cookie
    name: str

    path: str

    domain: str


class AuditsAffectedRequest(CDPObject):
    """ Information about a request that is affected by an inspector issue. """

    # The unique request id.
    requestId: Network.RequestId | None = None

    url: str


class AuditsAffectedFrame(CDPObject):
    """ Information about the frame affected by an inspector issue. """

    frameId: Page.FrameId


class AuditsCookieExclusionReason(enum.StrEnum):

    EXCLUDESAMESITEUNSPECIFIEDTREATEDASLAX = "ExcludeSameSiteUnspecifiedTreatedAsLax"
    EXCLUDESAMESITENONEINSECURE = "ExcludeSameSiteNoneInsecure"
    EXCLUDESAMESITELAX = "ExcludeSameSiteLax"
    EXCLUDESAMESITESTRICT = "ExcludeSameSiteStrict"
    EXCLUDEINVALIDSAMEPARTY = "ExcludeInvalidSameParty"
    EXCLUDESAMEPARTYCROSSPARTYCONTEXT = "ExcludeSamePartyCrossPartyContext"
    EXCLUDEDOMAINNONASCII = "ExcludeDomainNonASCII"
    EXCLUDETHIRDPARTYCOOKIEBLOCKEDINFIRSTPARTYSET = "ExcludeThirdPartyCookieBlockedInFirstPartySet"
    EXCLUDETHIRDPARTYPHASEOUT = "ExcludeThirdPartyPhaseout"
    EXCLUDEPORTMISMATCH = "ExcludePortMismatch"
    EXCLUDESCHEMEMISMATCH = "ExcludeSchemeMismatch"


class AuditsCookieWarningReason(enum.StrEnum):

    WARNSAMESITEUNSPECIFIEDCROSSSITECONTEXT = "WarnSameSiteUnspecifiedCrossSiteContext"
    WARNSAMESITENONEINSECURE = "WarnSameSiteNoneInsecure"
    WARNSAMESITEUNSPECIFIEDLAXALLOWUNSAFE = "WarnSameSiteUnspecifiedLaxAllowUnsafe"
    WARNSAMESITESTRICTLAXDOWNGRADESTRICT = "WarnSameSiteStrictLaxDowngradeStrict"
    WARNSAMESITESTRICTCROSSDOWNGRADESTRICT = "WarnSameSiteStrictCrossDowngradeStrict"
    WARNSAMESITESTRICTCROSSDOWNGRADELAX = "WarnSameSiteStrictCrossDowngradeLax"
    WARNSAMESITELAXCROSSDOWNGRADESTRICT = "WarnSameSiteLaxCrossDowngradeStrict"
    WARNSAMESITELAXCROSSDOWNGRADELAX = "WarnSameSiteLaxCrossDowngradeLax"
    WARNATTRIBUTEVALUEEXCEEDSMAXSIZE = "WarnAttributeValueExceedsMaxSize"
    WARNDOMAINNONASCII = "WarnDomainNonASCII"
    WARNTHIRDPARTYPHASEOUT = "WarnThirdPartyPhaseout"
    WARNCROSSSITEREDIRECTDOWNGRADECHANGESINCLUSION = "WarnCrossSiteRedirectDowngradeChangesInclusion"
    WARNDEPRECATIONTRIALMETADATA = "WarnDeprecationTrialMetadata"
    WARNTHIRDPARTYCOOKIEHEURISTIC = "WarnThirdPartyCookieHeuristic"


class AuditsCookieOperation(enum.StrEnum):

    SETCOOKIE = "SetCookie"
    READCOOKIE = "ReadCookie"


class AuditsInsightType(enum.StrEnum):
    """ Represents the category of insight that a cookie issue falls under. """

    GITHUBRESOURCE = "GitHubResource"
    GRACEPERIOD = "GracePeriod"
    HEURISTICS = "Heuristics"


class AuditsCookieIssueInsight(CDPObject):
    """ Information about the suggested solution to a cookie issue. """

    type: Audits.InsightType

    # Link to table entry in third-party cookie migration readiness list.
    tableEntryUrl: str | None = None


class AuditsCookieIssueDetails(CDPObject):
    """ This information is currently necessary, as the front-end has a difficult
    time finding a specific cookie. With this, we can convey specific error
    information without the cookie. """

    # If AffectedCookie is not set then rawCookieLine contains the raw Set-Cookie header string. This hints at a problem where the cookie line issyntactically or semantically malformed in a way that no valid cookie could becreated.
    cookie: Audits.AffectedCookie | None = None

    rawCookieLine: str | None = None

    cookieWarningReasons: list[Audits.CookieWarningReason]

    cookieExclusionReasons: list[Audits.CookieExclusionReason]

    # Optionally identifies the site-for-cookies and the cookie url, which maybe used by the front-end as additional context.
    operation: Audits.CookieOperation

    siteForCookies: str | None = None

    cookieUrl: str | None = None

    request: Audits.AffectedRequest | None = None

    # The recommended solution to the issue.
    insight: Audits.CookieIssueInsight | None = None


class AuditsMixedContentResolutionStatus(enum.StrEnum):

    MIXEDCONTENTBLOCKED = "MixedContentBlocked"
    MIXEDCONTENTAUTOMATICALLYUPGRADED = "MixedContentAutomaticallyUpgraded"
    MIXEDCONTENTWARNING = "MixedContentWarning"


class AuditsMixedContentResourceType(enum.StrEnum):

    ATTRIBUTIONSRC = "AttributionSrc"
    AUDIO = "Audio"
    BEACON = "Beacon"
    CSPREPORT = "CSPReport"
    DOWNLOAD = "Download"
    EVENTSOURCE = "EventSource"
    FAVICON = "Favicon"
    FONT = "Font"
    FORM = "Form"
    FRAME = "Frame"
    IMAGE = "Image"
    IMPORT = "Import"
    JSON = "JSON"
    MANIFEST = "Manifest"
    PING = "Ping"
    PLUGINDATA = "PluginData"
    PLUGINRESOURCE = "PluginResource"
    PREFETCH = "Prefetch"
    RESOURCE = "Resource"
    SCRIPT = "Script"
    SERVICEWORKER = "ServiceWorker"
    SHAREDWORKER = "SharedWorker"
    SPECULATIONRULES = "SpeculationRules"
    STYLESHEET = "Stylesheet"
    TRACK = "Track"
    VIDEO = "Video"
    WORKER = "Worker"
    XMLHTTPREQUEST = "XMLHttpRequest"
    XSLT = "XSLT"


class AuditsMixedContentIssueDetails(CDPObject):

    # The type of resource causing the mixed content issue (css, js, iframe,form,...). Marked as optional because it is mapped to fromblink::mojom::RequestContextType, which will be replaced bynetwork::mojom::RequestDestination
    resourceType: Audits.MixedContentResourceType | None = None

    # The way the mixed content issue is being resolved.
    resolutionStatus: Audits.MixedContentResolutionStatus

    # The unsafe http url causing the mixed content issue.
    insecureURL: str

    # The url responsible for the call to an unsafe url.
    mainResourceURL: str

    # The mixed content request. Does not always exist (e.g. for unsafe formsubmission urls).
    request: Audits.AffectedRequest | None = None

    # Optional because not every mixed content issue is necessarily linked to aframe.
    frame: Audits.AffectedFrame | None = None


class AuditsBlockedByResponseReason(enum.StrEnum):
    """ Enum indicating the reason a response has been blocked. These reasons are
    refinements of the net error BLOCKED_BY_RESPONSE. """

    COEPFRAMERESOURCENEEDSCOEPHEADER = "CoepFrameResourceNeedsCoepHeader"
    COOPSANDBOXEDIFRAMECANNOTNAVIGATETOCOOPPAGE = "CoopSandboxedIFrameCannotNavigateToCoopPage"
    CORPNOTSAMEORIGIN = "CorpNotSameOrigin"
    CORPNOTSAMEORIGINAFTERDEFAULTEDTOSAMEORIGINBYCOEP = "CorpNotSameOriginAfterDefaultedToSameOriginByCoep"
    CORPNOTSAMEORIGINAFTERDEFAULTEDTOSAMEORIGINBYDIP = "CorpNotSameOriginAfterDefaultedToSameOriginByDip"
    CORPNOTSAMEORIGINAFTERDEFAULTEDTOSAMEORIGINBYCOEPANDDIP = "CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip"
    CORPNOTSAMESITE = "CorpNotSameSite"
    SRIMESSAGESIGNATUREMISMATCH = "SRIMessageSignatureMismatch"


class AuditsBlockedByResponseIssueDetails(CDPObject):
    """ Details for a request that has been blocked with the BLOCKED_BY_RESPONSE
    code. Currently only used for COEP/COOP, but may be extended to include
    some CSP errors in the future. """

    request: Audits.AffectedRequest

    parentFrame: Audits.AffectedFrame | None = None

    blockedFrame: Audits.AffectedFrame | None = None

    reason: Audits.BlockedByResponseReason


class AuditsHeavyAdResolutionStatus(enum.StrEnum):

    HEAVYADBLOCKED = "HeavyAdBlocked"
    HEAVYADWARNING = "HeavyAdWarning"


class AuditsHeavyAdReason(enum.StrEnum):

    NETWORKTOTALLIMIT = "NetworkTotalLimit"
    CPUTOTALLIMIT = "CpuTotalLimit"
    CPUPEAKLIMIT = "CpuPeakLimit"


class AuditsHeavyAdIssueDetails(CDPObject):

    # The resolution status, either blocking the content or warning.
    resolution: Audits.HeavyAdResolutionStatus

    # The reason the ad was blocked, total network or cpu or peak cpu.
    reason: Audits.HeavyAdReason

    # The frame that was blocked.
    frame: Audits.AffectedFrame


class AuditsContentSecurityPolicyViolationType(enum.StrEnum):

    KINLINEVIOLATION = "kInlineViolation"
    KEVALVIOLATION = "kEvalViolation"
    KURLVIOLATION = "kURLViolation"
    KSRIVIOLATION = "kSRIViolation"
    KTRUSTEDTYPESSINKVIOLATION = "kTrustedTypesSinkViolation"
    KTRUSTEDTYPESPOLICYVIOLATION = "kTrustedTypesPolicyViolation"
    KWASMEVALVIOLATION = "kWasmEvalViolation"


class AuditsSourceCodeLocation(CDPObject):

    scriptId: Runtime.ScriptId | None = None

    url: str

    lineNumber: int

    columnNumber: int


class AuditsContentSecurityPolicyIssueDetails(CDPObject):

    # The url not included in allowed sources.
    blockedURL: str | None = None

    # Specific directive that is violated, causing the CSP issue.
    violatedDirective: str

    isReportOnly: bool

    contentSecurityPolicyViolationType: Audits.ContentSecurityPolicyViolationType

    frameAncestor: Audits.AffectedFrame | None = None

    sourceCodeLocation: Audits.SourceCodeLocation | None = None

    violatingNodeId: DOM.BackendNodeId | None = None


class AuditsSharedArrayBufferIssueType(enum.StrEnum):

    TRANSFERISSUE = "TransferIssue"
    CREATIONISSUE = "CreationIssue"


class AuditsSharedArrayBufferIssueDetails(CDPObject):
    """ Details for a issue arising from an SAB being instantiated in, or
    transferred to a context that is not cross-origin isolated. """

    sourceCodeLocation: Audits.SourceCodeLocation

    isWarning: bool

    type: Audits.SharedArrayBufferIssueType


class AuditsLowTextContrastIssueDetails(CDPObject):

    violatingNodeId: DOM.BackendNodeId

    violatingNodeSelector: str

    contrastRatio: float

    thresholdAA: float

    thresholdAAA: float

    fontSize: str

    fontWeight: str


class AuditsCorsIssueDetails(CDPObject):
    """ Details for a CORS related issue, e.g. a warning or error related to
    CORS RFC1918 enforcement. """

    corsErrorStatus: Network.CorsErrorStatus

    isWarning: bool

    request: Audits.AffectedRequest

    location: Audits.SourceCodeLocation | None = None

    initiatorOrigin: str | None = None

    resourceIPAddressSpace: Network.IPAddressSpace | None = None

    clientSecurityState: Network.ClientSecurityState | None = None


class AuditsAttributionReportingIssueType(enum.StrEnum):

    PERMISSIONPOLICYDISABLED = "PermissionPolicyDisabled"
    UNTRUSTWORTHYREPORTINGORIGIN = "UntrustworthyReportingOrigin"
    INSECURECONTEXT = "InsecureContext"
    INVALIDHEADER = "InvalidHeader"
    INVALIDREGISTERTRIGGERHEADER = "InvalidRegisterTriggerHeader"
    SOURCEANDTRIGGERHEADERS = "SourceAndTriggerHeaders"
    SOURCEIGNORED = "SourceIgnored"
    TRIGGERIGNORED = "TriggerIgnored"
    OSSOURCEIGNORED = "OsSourceIgnored"
    OSTRIGGERIGNORED = "OsTriggerIgnored"
    INVALIDREGISTEROSSOURCEHEADER = "InvalidRegisterOsSourceHeader"
    INVALIDREGISTEROSTRIGGERHEADER = "InvalidRegisterOsTriggerHeader"
    WEBANDOSHEADERS = "WebAndOsHeaders"
    NOWEBOROSSUPPORT = "NoWebOrOsSupport"
    NAVIGATIONREGISTRATIONWITHOUTTRANSIENTUSERACTIVATION = "NavigationRegistrationWithoutTransientUserActivation"
    INVALIDINFOHEADER = "InvalidInfoHeader"
    NOREGISTERSOURCEHEADER = "NoRegisterSourceHeader"
    NOREGISTERTRIGGERHEADER = "NoRegisterTriggerHeader"
    NOREGISTEROSSOURCEHEADER = "NoRegisterOsSourceHeader"
    NOREGISTEROSTRIGGERHEADER = "NoRegisterOsTriggerHeader"
    NAVIGATIONREGISTRATIONUNIQUESCOPEALREADYSET = "NavigationRegistrationUniqueScopeAlreadySet"


class AuditsSharedDictionaryError(enum.StrEnum):

    USEERRORCROSSORIGINNOCORSREQUEST = "UseErrorCrossOriginNoCorsRequest"
    USEERRORDICTIONARYLOADFAILURE = "UseErrorDictionaryLoadFailure"
    USEERRORMATCHINGDICTIONARYNOTUSED = "UseErrorMatchingDictionaryNotUsed"
    USEERRORUNEXPECTEDCONTENTDICTIONARYHEADER = "UseErrorUnexpectedContentDictionaryHeader"
    WRITEERRORCOSSORIGINNOCORSREQUEST = "WriteErrorCossOriginNoCorsRequest"
    WRITEERRORDISALLOWEDBYSETTINGS = "WriteErrorDisallowedBySettings"
    WRITEERROREXPIREDRESPONSE = "WriteErrorExpiredResponse"
    WRITEERRORFEATUREDISABLED = "WriteErrorFeatureDisabled"
    WRITEERRORINSUFFICIENTRESOURCES = "WriteErrorInsufficientResources"
    WRITEERRORINVALIDMATCHFIELD = "WriteErrorInvalidMatchField"
    WRITEERRORINVALIDSTRUCTUREDHEADER = "WriteErrorInvalidStructuredHeader"
    WRITEERRORINVALIDTTLFIELD = "WriteErrorInvalidTTLField"
    WRITEERRORNAVIGATIONREQUEST = "WriteErrorNavigationRequest"
    WRITEERRORNOMATCHFIELD = "WriteErrorNoMatchField"
    WRITEERRORNONINTEGERTTLFIELD = "WriteErrorNonIntegerTTLField"
    WRITEERRORNONLISTMATCHDESTFIELD = "WriteErrorNonListMatchDestField"
    WRITEERRORNONSECURECONTEXT = "WriteErrorNonSecureContext"
    WRITEERRORNONSTRINGIDFIELD = "WriteErrorNonStringIdField"
    WRITEERRORNONSTRINGINMATCHDESTLIST = "WriteErrorNonStringInMatchDestList"
    WRITEERRORNONSTRINGMATCHFIELD = "WriteErrorNonStringMatchField"
    WRITEERRORNONTOKENTYPEFIELD = "WriteErrorNonTokenTypeField"
    WRITEERRORREQUESTABORTED = "WriteErrorRequestAborted"
    WRITEERRORSHUTTINGDOWN = "WriteErrorShuttingDown"
    WRITEERRORTOOLONGIDFIELD = "WriteErrorTooLongIdField"
    WRITEERRORUNSUPPORTEDTYPE = "WriteErrorUnsupportedType"


class AuditsSRIMessageSignatureError(enum.StrEnum):

    MISSINGSIGNATUREHEADER = "MissingSignatureHeader"
    MISSINGSIGNATUREINPUTHEADER = "MissingSignatureInputHeader"
    INVALIDSIGNATUREHEADER = "InvalidSignatureHeader"
    INVALIDSIGNATUREINPUTHEADER = "InvalidSignatureInputHeader"
    SIGNATUREHEADERVALUEISNOTBYTESEQUENCE = "SignatureHeaderValueIsNotByteSequence"
    SIGNATUREHEADERVALUEISPARAMETERIZED = "SignatureHeaderValueIsParameterized"
    SIGNATUREHEADERVALUEISINCORRECTLENGTH = "SignatureHeaderValueIsIncorrectLength"
    SIGNATUREINPUTHEADERMISSINGLABEL = "SignatureInputHeaderMissingLabel"
    SIGNATUREINPUTHEADERVALUENOTINNERLIST = "SignatureInputHeaderValueNotInnerList"
    SIGNATUREINPUTHEADERVALUEMISSINGCOMPONENTS = "SignatureInputHeaderValueMissingComponents"
    SIGNATUREINPUTHEADERINVALIDCOMPONENTTYPE = "SignatureInputHeaderInvalidComponentType"
    SIGNATUREINPUTHEADERINVALIDCOMPONENTNAME = "SignatureInputHeaderInvalidComponentName"
    SIGNATUREINPUTHEADERINVALIDHEADERCOMPONENTPARAMETER = "SignatureInputHeaderInvalidHeaderComponentParameter"
    SIGNATUREINPUTHEADERINVALIDDERIVEDCOMPONENTPARAMETER = "SignatureInputHeaderInvalidDerivedComponentParameter"
    SIGNATUREINPUTHEADERKEYIDLENGTH = "SignatureInputHeaderKeyIdLength"
    SIGNATUREINPUTHEADERINVALIDPARAMETER = "SignatureInputHeaderInvalidParameter"
    SIGNATUREINPUTHEADERMISSINGREQUIREDPARAMETERS = "SignatureInputHeaderMissingRequiredParameters"
    VALIDATIONFAILEDSIGNATUREEXPIRED = "ValidationFailedSignatureExpired"
    VALIDATIONFAILEDINVALIDLENGTH = "ValidationFailedInvalidLength"
    VALIDATIONFAILEDSIGNATUREMISMATCH = "ValidationFailedSignatureMismatch"
    VALIDATIONFAILEDINTEGRITYMISMATCH = "ValidationFailedIntegrityMismatch"


class AuditsUnencodedDigestError(enum.StrEnum):

    MALFORMEDDICTIONARY = "MalformedDictionary"
    UNKNOWNALGORITHM = "UnknownAlgorithm"
    INCORRECTDIGESTTYPE = "IncorrectDigestType"
    INCORRECTDIGESTLENGTH = "IncorrectDigestLength"


class AuditsAttributionReportingIssueDetails(CDPObject):
    """ Details for issues around "Attribution Reporting API" usage.
    Explainer: https://github.com/WICG/attribution-reporting-api """

    violationType: Audits.AttributionReportingIssueType

    request: Audits.AffectedRequest | None = None

    violatingNodeId: DOM.BackendNodeId | None = None

    invalidParameter: str | None = None


class AuditsQuirksModeIssueDetails(CDPObject):
    """ Details for issues about documents in Quirks Mode
    or Limited Quirks Mode that affects page layouting. """

    # If false, it means the document's mode is "quirks" instead of "limited-quirks".
    isLimitedQuirksMode: bool

    documentNodeId: DOM.BackendNodeId

    url: str

    frameId: Page.FrameId

    loaderId: Network.LoaderId


class AuditsNavigatorUserAgentIssueDetails(CDPObject):

    url: str

    location: Audits.SourceCodeLocation | None = None


class AuditsSharedDictionaryIssueDetails(CDPObject):

    sharedDictionaryError: Audits.SharedDictionaryError

    request: Audits.AffectedRequest


class AuditsSRIMessageSignatureIssueDetails(CDPObject):

    error: Audits.SRIMessageSignatureError

    signatureBase: str

    integrityAssertions: list[str]

    request: Audits.AffectedRequest


class AuditsUnencodedDigestIssueDetails(CDPObject):

    error: Audits.UnencodedDigestError

    request: Audits.AffectedRequest


class AuditsGenericIssueErrorType(enum.StrEnum):

    FORMLABELFORNAMEERROR = "FormLabelForNameError"
    FORMDUPLICATEIDFORINPUTERROR = "FormDuplicateIdForInputError"
    FORMINPUTWITHNOLABELERROR = "FormInputWithNoLabelError"
    FORMAUTOCOMPLETEATTRIBUTEEMPTYERROR = "FormAutocompleteAttributeEmptyError"
    FORMEMPTYIDANDNAMEATTRIBUTESFORINPUTERROR = "FormEmptyIdAndNameAttributesForInputError"
    FORMARIALABELLEDBYTONONEXISTINGIDERROR = "FormAriaLabelledByToNonExistingIdError"
    FORMINPUTASSIGNEDAUTOCOMPLETEVALUETOIDORNAMEATTRIBUTEERROR = "FormInputAssignedAutocompleteValueToIdOrNameAttributeError"
    FORMLABELHASNEITHERFORNORNESTEDINPUTERROR = "FormLabelHasNeitherForNorNestedInputError"
    FORMLABELFORMATCHESNONEXISTINGIDERROR = "FormLabelForMatchesNonExistingIdError"
    FORMINPUTHASWRONGBUTWELLINTENDEDAUTOCOMPLETEVALUEERROR = "FormInputHasWrongButWellIntendedAutocompleteValueError"
    RESPONSEWASBLOCKEDBYORB = "ResponseWasBlockedByORB"
    NAVIGATIONENTRYMARKEDSKIPPABLE = "NavigationEntryMarkedSkippable"
    AUTOFILLANDMANUALTEXTPOLICYCONTROLLEDFEATURESINFO = "AutofillAndManualTextPolicyControlledFeaturesInfo"
    AUTOFILLPOLICYCONTROLLEDFEATUREINFO = "AutofillPolicyControlledFeatureInfo"
    MANUALTEXTPOLICYCONTROLLEDFEATUREINFO = "ManualTextPolicyControlledFeatureInfo"


class AuditsGenericIssueDetails(CDPObject):
    """ Depending on the concrete errorType, different properties are set. """

    # Issues with the same errorType are aggregated in the frontend.
    errorType: Audits.GenericIssueErrorType

    frameId: Page.FrameId | None = None

    violatingNodeId: DOM.BackendNodeId | None = None

    violatingNodeAttribute: str | None = None

    request: Audits.AffectedRequest | None = None


class AuditsDeprecationIssueDetails(CDPObject):
    """ This issue tracks information needed to print a deprecation message.
    https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/frame/third_party/blink/renderer/core/frame/deprecation/README.md """

    affectedFrame: Audits.AffectedFrame | None = None

    sourceCodeLocation: Audits.SourceCodeLocation

    # One of the deprecation names fromthird_party/blink/renderer/core/frame/deprecation/deprecation.json5
    type: str


class AuditsBounceTrackingIssueDetails(CDPObject):
    """ This issue warns about sites in the redirect chain of a finished navigation
    that may be flagged as trackers and have their state cleared if they don't
    receive a user interaction. Note that in this context 'site' means eTLD+1.
    For example, if the URL `https://example.test:80/bounce` was in the
    redirect chain, the site reported would be `example.test`. """

    trackingSites: list[str]


class AuditsCookieDeprecationMetadataIssueDetails(CDPObject):
    """ This issue warns about third-party sites that are accessing cookies on the
    current page, and have been permitted due to having a global metadata grant.
    Note that in this context 'site' means eTLD+1. For example, if the URL
    `https://example.test:80/web_page` was accessing cookies, the site reported
    would be `example.test`. """

    allowedSites: list[str]

    optOutPercentage: float

    isOptOutTopLevel: bool

    operation: Audits.CookieOperation


class AuditsClientHintIssueReason(enum.StrEnum):

    METATAGALLOWLISTINVALIDORIGIN = "MetaTagAllowListInvalidOrigin"
    METATAGMODIFIEDHTML = "MetaTagModifiedHTML"


class AuditsFederatedAuthRequestIssueDetails(CDPObject):

    federatedAuthRequestIssueReason: Audits.FederatedAuthRequestIssueReason


class AuditsFederatedAuthRequestIssueReason(enum.StrEnum):
    """ Represents the failure reason when a federated authentication reason fails.
    Should be updated alongside RequestIdTokenStatus in
    third_party/blink/public/mojom/devtools/inspector_issue.mojom to include
    all cases except for success. """

    SHOULDEMBARGO = "ShouldEmbargo"
    TOOMANYREQUESTS = "TooManyRequests"
    WELLKNOWNHTTPNOTFOUND = "WellKnownHttpNotFound"
    WELLKNOWNNORESPONSE = "WellKnownNoResponse"
    WELLKNOWNINVALIDRESPONSE = "WellKnownInvalidResponse"
    WELLKNOWNLISTEMPTY = "WellKnownListEmpty"
    WELLKNOWNINVALIDCONTENTTYPE = "WellKnownInvalidContentType"
    CONFIGNOTINWELLKNOWN = "ConfigNotInWellKnown"
    WELLKNOWNTOOBIG = "WellKnownTooBig"
    CONFIGHTTPNOTFOUND = "ConfigHttpNotFound"
    CONFIGNORESPONSE = "ConfigNoResponse"
    CONFIGINVALIDRESPONSE = "ConfigInvalidResponse"
    CONFIGINVALIDCONTENTTYPE = "ConfigInvalidContentType"
    CLIENTMETADATAHTTPNOTFOUND = "ClientMetadataHttpNotFound"
    CLIENTMETADATANORESPONSE = "ClientMetadataNoResponse"
    CLIENTMETADATAINVALIDRESPONSE = "ClientMetadataInvalidResponse"
    CLIENTMETADATAINVALIDCONTENTTYPE = "ClientMetadataInvalidContentType"
    IDPNOTPOTENTIALLYTRUSTWORTHY = "IdpNotPotentiallyTrustworthy"
    DISABLEDINSETTINGS = "DisabledInSettings"
    DISABLEDINFLAGS = "DisabledInFlags"
    ERRORFETCHINGSIGNIN = "ErrorFetchingSignin"
    INVALIDSIGNINRESPONSE = "InvalidSigninResponse"
    ACCOUNTSHTTPNOTFOUND = "AccountsHttpNotFound"
    ACCOUNTSNORESPONSE = "AccountsNoResponse"
    ACCOUNTSINVALIDRESPONSE = "AccountsInvalidResponse"
    ACCOUNTSLISTEMPTY = "AccountsListEmpty"
    ACCOUNTSINVALIDCONTENTTYPE = "AccountsInvalidContentType"
    IDTOKENHTTPNOTFOUND = "IdTokenHttpNotFound"
    IDTOKENNORESPONSE = "IdTokenNoResponse"
    IDTOKENINVALIDRESPONSE = "IdTokenInvalidResponse"
    IDTOKENIDPERRORRESPONSE = "IdTokenIdpErrorResponse"
    IDTOKENCROSSSITEIDPERRORRESPONSE = "IdTokenCrossSiteIdpErrorResponse"
    IDTOKENINVALIDREQUEST = "IdTokenInvalidRequest"
    IDTOKENINVALIDCONTENTTYPE = "IdTokenInvalidContentType"
    ERRORIDTOKEN = "ErrorIdToken"
    CANCELED = "Canceled"
    RPPAGENOTVISIBLE = "RpPageNotVisible"
    SILENTMEDIATIONFAILURE = "SilentMediationFailure"
    THIRDPARTYCOOKIESBLOCKED = "ThirdPartyCookiesBlocked"
    NOTSIGNEDINWITHIDP = "NotSignedInWithIdp"
    MISSINGTRANSIENTUSERACTIVATION = "MissingTransientUserActivation"
    REPLACEDBYACTIVEMODE = "ReplacedByActiveMode"
    INVALIDFIELDSSPECIFIED = "InvalidFieldsSpecified"
    RELYINGPARTYORIGINISOPAQUE = "RelyingPartyOriginIsOpaque"
    TYPENOTMATCHING = "TypeNotMatching"
    UIDISMISSEDNOEMBARGO = "UiDismissedNoEmbargo"
    CORSERROR = "CorsError"
    SUPPRESSEDBYSEGMENTATIONPLATFORM = "SuppressedBySegmentationPlatform"


class AuditsFederatedAuthUserInfoRequestIssueDetails(CDPObject):

    federatedAuthUserInfoRequestIssueReason: Audits.FederatedAuthUserInfoRequestIssueReason


class AuditsFederatedAuthUserInfoRequestIssueReason(enum.StrEnum):
    """ Represents the failure reason when a getUserInfo() call fails.
    Should be updated alongside FederatedAuthUserInfoRequestResult in
    third_party/blink/public/mojom/devtools/inspector_issue.mojom. """

    NOTSAMEORIGIN = "NotSameOrigin"
    NOTIFRAME = "NotIframe"
    NOTPOTENTIALLYTRUSTWORTHY = "NotPotentiallyTrustworthy"
    NOAPIPERMISSION = "NoApiPermission"
    NOTSIGNEDINWITHIDP = "NotSignedInWithIdp"
    NOACCOUNTSHARINGPERMISSION = "NoAccountSharingPermission"
    INVALIDCONFIGORWELLKNOWN = "InvalidConfigOrWellKnown"
    INVALIDACCOUNTSRESPONSE = "InvalidAccountsResponse"
    NORETURNINGUSERFROMFETCHEDACCOUNTS = "NoReturningUserFromFetchedAccounts"


class AuditsClientHintIssueDetails(CDPObject):
    """ This issue tracks client hints related issues. It's used to deprecate old
    features, encourage the use of new ones, and provide general guidance. """

    sourceCodeLocation: Audits.SourceCodeLocation

    clientHintIssueReason: Audits.ClientHintIssueReason


class AuditsFailedRequestInfo(CDPObject):

    # The URL that failed to load.
    url: str

    # The failure message for the failed request.
    failureMessage: str

    requestId: Network.RequestId | None = None


class AuditsPartitioningBlobURLInfo(enum.StrEnum):

    BLOCKEDCROSSPARTITIONFETCHING = "BlockedCrossPartitionFetching"
    ENFORCENOOPENERFORNAVIGATION = "EnforceNoopenerForNavigation"


class AuditsPartitioningBlobURLIssueDetails(CDPObject):

    # The BlobURL that failed to load.
    url: str

    # Additional information about the Partitioning Blob URL issue.
    partitioningBlobURLInfo: Audits.PartitioningBlobURLInfo


class AuditsElementAccessibilityIssueReason(enum.StrEnum):

    DISALLOWEDSELECTCHILD = "DisallowedSelectChild"
    DISALLOWEDOPTGROUPCHILD = "DisallowedOptGroupChild"
    NONPHRASINGCONTENTOPTIONCHILD = "NonPhrasingContentOptionChild"
    INTERACTIVECONTENTOPTIONCHILD = "InteractiveContentOptionChild"
    INTERACTIVECONTENTLEGENDCHILD = "InteractiveContentLegendChild"
    INTERACTIVECONTENTSUMMARYDESCENDANT = "InteractiveContentSummaryDescendant"


class AuditsElementAccessibilityIssueDetails(CDPObject):
    """ This issue warns about errors in the select or summary element content model. """

    nodeId: DOM.BackendNodeId

    elementAccessibilityIssueReason: Audits.ElementAccessibilityIssueReason

    hasDisallowedAttributes: bool


class AuditsStyleSheetLoadingIssueReason(enum.StrEnum):

    LATEIMPORTRULE = "LateImportRule"
    REQUESTFAILED = "RequestFailed"


class AuditsStylesheetLoadingIssueDetails(CDPObject):
    """ This issue warns when a referenced stylesheet couldn't be loaded. """

    # Source code position that referenced the failing stylesheet.
    sourceCodeLocation: Audits.SourceCodeLocation

    # Reason why the stylesheet couldn't be loaded.
    styleSheetLoadingIssueReason: Audits.StyleSheetLoadingIssueReason

    # Contains additional info when the failure was due to a request.
    failedRequestInfo: Audits.FailedRequestInfo | None = None


class AuditsPropertyRuleIssueReason(enum.StrEnum):

    INVALIDSYNTAX = "InvalidSyntax"
    INVALIDINITIALVALUE = "InvalidInitialValue"
    INVALIDINHERITS = "InvalidInherits"
    INVALIDNAME = "InvalidName"


class AuditsPropertyRuleIssueDetails(CDPObject):
    """ This issue warns about errors in property rules that lead to property
    registrations being ignored. """

    # Source code position of the property rule.
    sourceCodeLocation: Audits.SourceCodeLocation

    # Reason why the property rule was discarded.
    propertyRuleIssueReason: Audits.PropertyRuleIssueReason

    # The value of the property rule property that failed to parse
    propertyValue: str | None = None


class AuditsUserReidentificationIssueType(enum.StrEnum):

    BLOCKEDFRAMENAVIGATION = "BlockedFrameNavigation"
    BLOCKEDSUBRESOURCE = "BlockedSubresource"
    NOISEDCANVASREADBACK = "NoisedCanvasReadback"


class AuditsUserReidentificationIssueDetails(CDPObject):
    """ This issue warns about uses of APIs that may be considered misuse to
    re-identify users. """

    type: Audits.UserReidentificationIssueType

    # Applies to BlockedFrameNavigation and BlockedSubresource issue types.
    request: Audits.AffectedRequest | None = None

    # Applies to NoisedCanvasReadback issue type.
    sourceCodeLocation: Audits.SourceCodeLocation | None = None


class AuditsPermissionElementIssueType(enum.StrEnum):

    INVALIDTYPE = "InvalidType"
    FENCEDFRAMEDISALLOWED = "FencedFrameDisallowed"
    CSPFRAMEANCESTORSMISSING = "CspFrameAncestorsMissing"
    PERMISSIONSPOLICYBLOCKED = "PermissionsPolicyBlocked"
    PADDINGRIGHTUNSUPPORTED = "PaddingRightUnsupported"
    PADDINGBOTTOMUNSUPPORTED = "PaddingBottomUnsupported"
    INSETBOXSHADOWUNSUPPORTED = "InsetBoxShadowUnsupported"
    REQUESTINPROGRESS = "RequestInProgress"
    UNTRUSTEDEVENT = "UntrustedEvent"
    REGISTRATIONFAILED = "RegistrationFailed"
    TYPENOTSUPPORTED = "TypeNotSupported"
    INVALIDTYPEACTIVATION = "InvalidTypeActivation"
    SECURITYCHECKSFAILED = "SecurityChecksFailed"
    ACTIVATIONDISABLED = "ActivationDisabled"
    GEOLOCATIONDEPRECATED = "GeolocationDeprecated"
    INVALIDDISPLAYSTYLE = "InvalidDisplayStyle"
    NONOPAQUECOLOR = "NonOpaqueColor"
    LOWCONTRAST = "LowContrast"
    FONTSIZETOOSMALL = "FontSizeTooSmall"
    FONTSIZETOOLARGE = "FontSizeTooLarge"
    INVALIDSIZEVALUE = "InvalidSizeValue"


class AuditsPermissionElementIssueDetails(CDPObject):
    """ This issue warns about improper usage of the <permission> element. """

    issueType: Audits.PermissionElementIssueType

    # The value of the type attribute.
    type: str | None = None

    # The node ID of the <permission> element.
    nodeId: DOM.BackendNodeId | None = None

    # True if the issue is a warning, false if it is an error.
    isWarning: bool | None = None

    # Fields for message construction: Used for messages that reference aspecific permission name
    permissionName: str | None = None

    # Used for messages about occlusion
    occluderNodeInfo: str | None = None

    # Used for messages about occluder's parent
    occluderParentNodeInfo: str | None = None

    # Used for messages about activation disabled reason
    disableReason: str | None = None


class AuditsInspectorIssueCode(enum.StrEnum):
    """ A unique identifier for the type of issue. Each type may use one of the
    optional fields in InspectorIssueDetails to convey more specific
    information about the kind of issue. """

    COOKIEISSUE = "CookieIssue"
    MIXEDCONTENTISSUE = "MixedContentIssue"
    BLOCKEDBYRESPONSEISSUE = "BlockedByResponseIssue"
    HEAVYADISSUE = "HeavyAdIssue"
    CONTENTSECURITYPOLICYISSUE = "ContentSecurityPolicyIssue"
    SHAREDARRAYBUFFERISSUE = "SharedArrayBufferIssue"
    LOWTEXTCONTRASTISSUE = "LowTextContrastIssue"
    CORSISSUE = "CorsIssue"
    ATTRIBUTIONREPORTINGISSUE = "AttributionReportingIssue"
    QUIRKSMODEISSUE = "QuirksModeIssue"
    PARTITIONINGBLOBURLISSUE = "PartitioningBlobURLIssue"
    NAVIGATORUSERAGENTISSUE = "NavigatorUserAgentIssue"
    GENERICISSUE = "GenericIssue"
    DEPRECATIONISSUE = "DeprecationIssue"
    CLIENTHINTISSUE = "ClientHintIssue"
    FEDERATEDAUTHREQUESTISSUE = "FederatedAuthRequestIssue"
    BOUNCETRACKINGISSUE = "BounceTrackingIssue"
    COOKIEDEPRECATIONMETADATAISSUE = "CookieDeprecationMetadataIssue"
    STYLESHEETLOADINGISSUE = "StylesheetLoadingIssue"
    FEDERATEDAUTHUSERINFOREQUESTISSUE = "FederatedAuthUserInfoRequestIssue"
    PROPERTYRULEISSUE = "PropertyRuleIssue"
    SHAREDDICTIONARYISSUE = "SharedDictionaryIssue"
    ELEMENTACCESSIBILITYISSUE = "ElementAccessibilityIssue"
    SRIMESSAGESIGNATUREISSUE = "SRIMessageSignatureIssue"
    UNENCODEDDIGESTISSUE = "UnencodedDigestIssue"
    USERREIDENTIFICATIONISSUE = "UserReidentificationIssue"
    PERMISSIONELEMENTISSUE = "PermissionElementIssue"


class AuditsInspectorIssueDetails(CDPObject):
    """ This struct holds a list of optional fields with additional information
    specific to the kind of issue. When adding a new issue code, please also
    add a new optional field to this type. """

    cookieIssueDetails: Audits.CookieIssueDetails | None = None

    mixedContentIssueDetails: Audits.MixedContentIssueDetails | None = None

    blockedByResponseIssueDetails: Audits.BlockedByResponseIssueDetails | None = None

    heavyAdIssueDetails: Audits.HeavyAdIssueDetails | None = None

    contentSecurityPolicyIssueDetails: Audits.ContentSecurityPolicyIssueDetails | None = None

    sharedArrayBufferIssueDetails: Audits.SharedArrayBufferIssueDetails | None = None

    lowTextContrastIssueDetails: Audits.LowTextContrastIssueDetails | None = None

    corsIssueDetails: Audits.CorsIssueDetails | None = None

    attributionReportingIssueDetails: Audits.AttributionReportingIssueDetails | None = None

    quirksModeIssueDetails: Audits.QuirksModeIssueDetails | None = None

    partitioningBlobURLIssueDetails: Audits.PartitioningBlobURLIssueDetails | None = None

    navigatorUserAgentIssueDetails: Audits.NavigatorUserAgentIssueDetails | None = None  # deprecated

    genericIssueDetails: Audits.GenericIssueDetails | None = None

    deprecationIssueDetails: Audits.DeprecationIssueDetails | None = None

    clientHintIssueDetails: Audits.ClientHintIssueDetails | None = None

    federatedAuthRequestIssueDetails: Audits.FederatedAuthRequestIssueDetails | None = None

    bounceTrackingIssueDetails: Audits.BounceTrackingIssueDetails | None = None

    cookieDeprecationMetadataIssueDetails: Audits.CookieDeprecationMetadataIssueDetails | None = None

    stylesheetLoadingIssueDetails: Audits.StylesheetLoadingIssueDetails | None = None

    propertyRuleIssueDetails: Audits.PropertyRuleIssueDetails | None = None

    federatedAuthUserInfoRequestIssueDetails: Audits.FederatedAuthUserInfoRequestIssueDetails | None = None

    sharedDictionaryIssueDetails: Audits.SharedDictionaryIssueDetails | None = None

    elementAccessibilityIssueDetails: Audits.ElementAccessibilityIssueDetails | None = None

    sriMessageSignatureIssueDetails: Audits.SRIMessageSignatureIssueDetails | None = None

    unencodedDigestIssueDetails: Audits.UnencodedDigestIssueDetails | None = None

    userReidentificationIssueDetails: Audits.UserReidentificationIssueDetails | None = None

    permissionElementIssueDetails: Audits.PermissionElementIssueDetails | None = None


""" A unique id for a DevTools inspector issue. Allows other entities (e.g.
exceptions, CDP message, console messages, etc.) to reference an issue. """

AuditsIssueId = str


class AuditsInspectorIssue(CDPObject):
    """ An inspector issue reported from the back-end. """

    code: Audits.InspectorIssueCode

    details: Audits.InspectorIssueDetails

    # A unique id for this issue. May be omitted if no other entity (e.g.exception, CDP message, etc.) is referencing this issue.
    issueId: Audits.IssueId | None = None


class AutofillCreditCard(CDPObject):

    # 16-digit credit card number.
    number: str

    # Name of the credit card owner.
    name: str

    # 2-digit expiry month.
    expiryMonth: str

    # 4-digit expiry year.
    expiryYear: str

    # 3-digit card verification code.
    cvc: str


class AutofillAddressField(CDPObject):

    # address field name, for example GIVEN_NAME. The full list of supportedfield names: https://source.chromium.org/chromium/chromium/src/+/main:components/autofill/core/browser/field_types.cc;l=38
    name: str

    # address field value, for example Jon Doe.
    value: str


class AutofillAddressFields(CDPObject):
    """ A list of address fields. """

    fields: list[Autofill.AddressField]


class AutofillAddress(CDPObject):

    # fields and values defining an address.
    fields: list[Autofill.AddressField]


class AutofillAddressUI(CDPObject):
    """ Defines how an address can be displayed like in chrome://settings/addresses.
    Address UI is a two dimensional array, each inner array is an "address information line", and when rendered in a UI surface should be displayed as such.
    The following address UI for instance:
    [[{name: "GIVE_NAME", value: "Jon"}, {name: "FAMILY_NAME", value: "Doe"}], [{name: "CITY", value: "Munich"}, {name: "ZIP", value: "81456"}]]
    should allow the receiver to render:
    Jon Doe
    Munich 81456 """

    # A two dimension array containing the representation of values from anaddress profile.
    addressFields: list[Autofill.AddressFields]


class AutofillFillingStrategy(enum.StrEnum):
    """ Specified whether a filled field was done so by using the html autocomplete attribute or autofill heuristics. """

    AUTOCOMPLETEATTRIBUTE = "autocompleteAttribute"
    AUTOFILLINFERRED = "autofillInferred"


class AutofillFilledField(CDPObject):

    # The type of the field, e.g text, password etc.
    htmlType: str

    # the html id
    id: str

    # the html name
    name: str

    # the field value
    value: str

    # The actual field type, e.g FAMILY_NAME
    autofillType: str

    # The filling strategy
    fillingStrategy: Autofill.FillingStrategy

    # The frame the field belongs to
    frameId: Page.FrameId

    # The form field's DOM node
    fieldId: DOM.BackendNodeId


class BackgroundServiceServiceName(enum.StrEnum):
    """ The Background Service that will be associated with the commands/events.
    Every Background Service operates independently, but they share the same
    API. """

    BACKGROUNDFETCH = "backgroundFetch"
    BACKGROUNDSYNC = "backgroundSync"
    PUSHMESSAGING = "pushMessaging"
    NOTIFICATIONS = "notifications"
    PAYMENTHANDLER = "paymentHandler"
    PERIODICBACKGROUNDSYNC = "periodicBackgroundSync"


class BackgroundServiceEventMetadata(CDPObject):
    """ A key-value pair for additional event information to pass along. """

    key: str

    value: str


class BackgroundServiceBackgroundServiceEvent(CDPObject):

    # Timestamp of the event (in seconds).
    timestamp: Network.TimeSinceEpoch

    # The origin this event belongs to.
    origin: str

    # The Service Worker ID that initiated the event.
    serviceWorkerRegistrationId: ServiceWorker.RegistrationID

    # The Background Service this event belongs to.
    service: BackgroundService.ServiceName

    # A description of the event.
    eventName: str

    # An identifier that groups related events together.
    instanceId: str

    # A list of event-specific information.
    eventMetadata: list[BackgroundService.EventMetadata]

    # Storage key this event belongs to.
    storageKey: str


class BluetoothEmulationCentralState(enum.StrEnum):
    """ Indicates the various states of Central. """

    ABSENT = "absent"
    POWERED_OFF = "powered-off"
    POWERED_ON = "powered-on"


class BluetoothEmulationGATTOperationType(enum.StrEnum):
    """ Indicates the various types of GATT event. """

    CONNECTION = "connection"
    DISCOVERY = "discovery"


class BluetoothEmulationCharacteristicWriteType(enum.StrEnum):
    """ Indicates the various types of characteristic write. """

    WRITE_DEFAULT_DEPRECATED = "write-default-deprecated"
    WRITE_WITH_RESPONSE = "write-with-response"
    WRITE_WITHOUT_RESPONSE = "write-without-response"


class BluetoothEmulationCharacteristicOperationType(enum.StrEnum):
    """ Indicates the various types of characteristic operation. """

    READ = "read"
    WRITE = "write"
    SUBSCRIBE_TO_NOTIFICATIONS = "subscribe-to-notifications"
    UNSUBSCRIBE_FROM_NOTIFICATIONS = "unsubscribe-from-notifications"


class BluetoothEmulationDescriptorOperationType(enum.StrEnum):
    """ Indicates the various types of descriptor operation. """

    READ = "read"
    WRITE = "write"


class BluetoothEmulationManufacturerData(CDPObject):
    """ Stores the manufacturer data """

    # Company identifier https://bitbucket.org/bluetooth-SIG/public/src/main/assigned_numbers/company_identifiers/company_identifiers.yamlhttps://usb.org/developers
    key: int

    # Manufacturer-specific data (Encoded as a base64 string when passed overJSON)
    data: str


class BluetoothEmulationScanRecord(CDPObject):
    """ Stores the byte data of the advertisement packet sent by a Bluetooth device. """

    name: str | None = None

    uuids: list[str] | None = None

    # Stores the external appearance description of the device.
    appearance: int | None = None

    # Stores the transmission power of a broadcasting device.
    txPower: int | None = None

    # Key is the company identifier and the value is an array of bytes ofmanufacturer specific data.
    manufacturerData: list[BluetoothEmulation.ManufacturerData] | None = None


class BluetoothEmulationScanEntry(CDPObject):
    """ Stores the advertisement packet information that is sent by a Bluetooth device. """

    deviceAddress: str

    rssi: int

    scanRecord: BluetoothEmulation.ScanRecord


class BluetoothEmulationCharacteristicProperties(CDPObject):
    """ Describes the properties of a characteristic. This follows Bluetooth Core
    Specification BT 4.2 Vol 3 Part G 3.3.1. Characteristic Properties. """

    broadcast: bool | None = None

    read: bool | None = None

    writeWithoutResponse: bool | None = None

    write: bool | None = None

    notify: bool | None = None

    indicate: bool | None = None

    authenticatedSignedWrites: bool | None = None

    extendedProperties: bool | None = None


BrowserBrowserContextID = str

BrowserWindowID = int


class BrowserWindowState(enum.StrEnum):
    """ The state of the browser window. """

    NORMAL = "normal"
    MINIMIZED = "minimized"
    MAXIMIZED = "maximized"
    FULLSCREEN = "fullscreen"


class BrowserBounds(CDPObject):
    """ Browser window bounds information """

    # The offset from the left edge of the screen to the window in pixels.
    left: int | None = None

    # The offset from the top edge of the screen to the window in pixels.
    top: int | None = None

    # The window width in pixels.
    width: int | None = None

    # The window height in pixels.
    height: int | None = None

    # The window state. Default to normal.
    windowState: Browser.WindowState | None = None


class BrowserPermissionType(enum.StrEnum):

    AR = "ar"
    AUDIOCAPTURE = "audioCapture"
    AUTOMATICFULLSCREEN = "automaticFullscreen"
    BACKGROUNDFETCH = "backgroundFetch"
    BACKGROUNDSYNC = "backgroundSync"
    CAMERAPANTILTZOOM = "cameraPanTiltZoom"
    CAPTUREDSURFACECONTROL = "capturedSurfaceControl"
    CLIPBOARDREADWRITE = "clipboardReadWrite"
    CLIPBOARDSANITIZEDWRITE = "clipboardSanitizedWrite"
    DISPLAYCAPTURE = "displayCapture"
    DURABLESTORAGE = "durableStorage"
    GEOLOCATION = "geolocation"
    HANDTRACKING = "handTracking"
    IDLEDETECTION = "idleDetection"
    KEYBOARDLOCK = "keyboardLock"
    LOCALFONTS = "localFonts"
    LOCALNETWORK = "localNetwork"
    LOCALNETWORKACCESS = "localNetworkAccess"
    LOOPBACKNETWORK = "loopbackNetwork"
    MIDI = "midi"
    MIDISYSEX = "midiSysex"
    NFC = "nfc"
    NOTIFICATIONS = "notifications"
    PAYMENTHANDLER = "paymentHandler"
    PERIODICBACKGROUNDSYNC = "periodicBackgroundSync"
    POINTERLOCK = "pointerLock"
    PROTECTEDMEDIAIDENTIFIER = "protectedMediaIdentifier"
    SENSORS = "sensors"
    SMARTCARD = "smartCard"
    SPEAKERSELECTION = "speakerSelection"
    STORAGEACCESS = "storageAccess"
    TOPLEVELSTORAGEACCESS = "topLevelStorageAccess"
    VIDEOCAPTURE = "videoCapture"
    VR = "vr"
    WAKELOCKSCREEN = "wakeLockScreen"
    WAKELOCKSYSTEM = "wakeLockSystem"
    WEBAPPINSTALLATION = "webAppInstallation"
    WEBPRINTING = "webPrinting"
    WINDOWMANAGEMENT = "windowManagement"


class BrowserPermissionSetting(enum.StrEnum):

    GRANTED = "granted"
    DENIED = "denied"
    PROMPT = "prompt"


class BrowserPermissionDescriptor(CDPObject):
    """ Definition of PermissionDescriptor defined in the Permissions API:
    https://w3c.github.io/permissions/#dom-permissiondescriptor. """

    # Name of permission. See https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/permissions/permission_descriptor.idl for valid permissionnames.
    name: str

    # For "midi" permission, may also specify sysex control.
    sysex: bool | None = None

    # For "push" permission, may specify userVisibleOnly. Note thatuserVisibleOnly = true is the only currently supported type.
    userVisibleOnly: bool | None = None

    # For "clipboard" permission, may specify allowWithoutSanitization.
    allowWithoutSanitization: bool | None = None

    # For "fullscreen" permission, must specify allowWithoutGesture:true.
    allowWithoutGesture: bool | None = None

    # For "camera" permission, may specify panTiltZoom.
    panTiltZoom: bool | None = None


class BrowserBrowserCommandId(enum.StrEnum):
    """ Browser command ids used by executeBrowserCommand. """

    OPENTABSEARCH = "openTabSearch"
    CLOSETABSEARCH = "closeTabSearch"
    OPENGLIC = "openGlic"


class BrowserBucket(CDPObject):
    """ Chrome histogram bucket. """

    # Minimum value (inclusive).
    low: int

    # Maximum value (exclusive).
    high: int

    # Number of samples.
    count: int


class BrowserHistogram(CDPObject):
    """ Chrome histogram. """

    # Name.
    name: str

    # Sum of sample values.
    sum: int

    # Total number of samples.
    count: int

    # Buckets.
    buckets: list[Browser.Bucket]


class BrowserPrivacySandboxAPI(enum.StrEnum):

    BIDDINGANDAUCTIONSERVICES = "BiddingAndAuctionServices"
    TRUSTEDKEYVALUE = "TrustedKeyValue"


class CSSStyleSheetOrigin(enum.StrEnum):
    """ Stylesheet type: "injected" for stylesheets injected via extension, "user-agent" for user-agent
    stylesheets, "inspector" for stylesheets created by the inspector (i.e. those holding the "via
    inspector" rules), "regular" for regular stylesheets. """

    INJECTED = "injected"
    USER_AGENT = "user-agent"
    INSPECTOR = "inspector"
    REGULAR = "regular"


class CSSPseudoElementMatches(CDPObject):
    """ CSS rule collection for a single pseudo style. """

    # Pseudo element type.
    pseudoType: DOM.PseudoType

    # Pseudo element custom ident.
    pseudoIdentifier: str | None = None

    # Matches of CSS rules applicable to the pseudo style.
    matches: list[CSS.RuleMatch]


class CSSCSSAnimationStyle(CDPObject):
    """ CSS style coming from animations with the name of the animation. """

    # The name of the animation.
    name: str | None = None

    # The style coming from the animation.
    style: CSS.CSSStyle


class CSSInheritedStyleEntry(CDPObject):
    """ Inherited CSS rule collection from ancestor node. """

    # The ancestor node's inline style, if any, in the style inheritance chain.
    inlineStyle: CSS.CSSStyle | None = None

    # Matches of CSS rules matching the ancestor node in the style inheritancechain.
    matchedCSSRules: list[CSS.RuleMatch]


class CSSInheritedAnimatedStyleEntry(CDPObject):
    """ Inherited CSS style collection for animated styles from ancestor node. """

    # Styles coming from the animations of the ancestor, if any, in the styleinheritance chain.
    animationStyles: list[CSS.CSSAnimationStyle] | None = None

    # The style coming from the transitions of the ancestor, if any, in thestyle inheritance chain.
    transitionsStyle: CSS.CSSStyle | None = None


class CSSInheritedPseudoElementMatches(CDPObject):
    """ Inherited pseudo element matches from pseudos of an ancestor node. """

    # Matches of pseudo styles from the pseudos of an ancestor node.
    pseudoElements: list[CSS.PseudoElementMatches]


class CSSRuleMatch(CDPObject):
    """ Match data for a CSS rule. """

    # CSS rule in the match.
    rule: CSS.CSSRule

    # Matching selector indices in the rule's selectorList selectors (0-based).
    matchingSelectors: list[int]


class CSSValue(CDPObject):
    """ Data for a simple selector (these are delimited by commas in a selector list). """

    # Value text.
    text: str

    # Value range in the underlying resource (if available).
    range: CSS.SourceRange | None = None

    # Specificity of the selector.
    specificity: CSS.Specificity | None = None  # experimental


class CSSSpecificity(CDPObject):
    """ Specificity:
    https://drafts.csswg.org/selectors/#specificity-rules """

    # The a component, which represents the number of ID selectors.
    a: int

    # The b component, which represents the number of class selectors,attributes selectors, and pseudo-classes.
    b: int

    # The c component, which represents the number of type selectors and pseudo-elements.
    c: int


class CSSSelectorList(CDPObject):
    """ Selector list data. """

    # Selectors in the list.
    selectors: list[CSS.Value]

    # Rule selector text.
    text: str


class CSSCSSStyleSheetHeader(CDPObject):
    """ CSS stylesheet metainformation. """

    # The stylesheet identifier.
    styleSheetId: DOM.StyleSheetId

    # Owner frame identifier.
    frameId: Page.FrameId

    # Stylesheet resource URL. Empty if this is a constructed stylesheet createdusing new CSSStyleSheet() (but non-empty if this is a constructed stylesheetimported as a CSS module script).
    sourceURL: str

    # URL of source map associated with the stylesheet (if any).
    sourceMapURL: str | None = None

    # Stylesheet origin.
    origin: CSS.StyleSheetOrigin

    # Stylesheet title.
    title: str

    # The backend id for the owner node of the stylesheet.
    ownerNode: DOM.BackendNodeId | None = None

    # Denotes whether the stylesheet is disabled.
    disabled: bool

    # Whether the sourceURL field value comes from the sourceURL comment.
    hasSourceURL: bool | None = None

    # Whether this stylesheet is created for STYLE tag by parser. This flag isnot set for document.written STYLE tags.
    isInline: bool

    # Whether this stylesheet is mutable. Inline stylesheets become mutableafter they have been modified via CSSOM API. `<link>` element's stylesheetsbecome mutable only if DevTools modifies them. Constructed stylesheets (newCSSStyleSheet()) are mutable immediately after creation.
    isMutable: bool

    # True if this stylesheet is created through new CSSStyleSheet() or importedas a CSS module script.
    isConstructed: bool

    # Line offset of the stylesheet within the resource (zero based).
    startLine: float

    # Column offset of the stylesheet within the resource (zero based).
    startColumn: float

    # Size of the content (in characters).
    length: float

    # Line offset of the end of the stylesheet within the resource (zero based).
    endLine: float

    # Column offset of the end of the stylesheet within the resource (zerobased).
    endColumn: float

    # If the style sheet was loaded from a network resource, this indicates whenthe resource failed to load
    loadingFailed: bool | None = None  # experimental


class CSSCSSRule(CDPObject):
    """ CSS rule representation. """

    # The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
    styleSheetId: DOM.StyleSheetId | None = None

    # Rule selector data.
    selectorList: CSS.SelectorList

    # Array of selectors from ancestor style rules, sorted by distance from thecurrent rule.
    nestingSelectors: list[str] | None = None  # experimental

    # Parent stylesheet's origin.
    origin: CSS.StyleSheetOrigin

    # Associated style declaration.
    style: CSS.CSSStyle

    # The BackendNodeId of the DOM node that constitutes the origin tree scopeof this rule.
    originTreeScopeNodeId: DOM.BackendNodeId | None = None  # experimental

    # Media list array (for rules involving media queries). The array enumeratesmedia queries starting with the innermost one, going outwards.
    media: list[CSS.CSSMedia] | None = None

    # Container query list array (for rules involving container queries). Thearray enumerates container queries starting with the innermost one, goingoutwards.
    containerQueries: list[CSS.CSSContainerQuery] | None = None  # experimental

    # @supports CSS at-rule array. The array enumerates @supports at-rulesstarting with the innermost one, going outwards.
    supports: list[CSS.CSSSupports] | None = None  # experimental

    # Cascade layer array. Contains the layer hierarchy that this rule belongsto starting with the innermost layer and going outwards.
    layers: list[CSS.CSSLayer] | None = None  # experimental

    # @scope CSS at-rule array. The array enumerates @scope at-rules startingwith the innermost one, going outwards.
    scopes: list[CSS.CSSScope] | None = None  # experimental

    # The array keeps the types of ancestor CSSRules from the innermost goingoutwards.
    ruleTypes: list[CSS.CSSRuleType] | None = None  # experimental

    # @starting-style CSS at-rule array. The array enumerates @starting-styleat-rules starting with the innermost one, going outwards.
    startingStyles: list[CSS.CSSStartingStyle] | None = None  # experimental


class CSSCSSRuleType(enum.StrEnum):
    """ Enum indicating the type of a CSS rule, used to represent the order of a style rule's ancestors.
    This list only contains rule types that are collected during the ancestor rule collection. """

    MEDIARULE = "MediaRule"
    SUPPORTSRULE = "SupportsRule"
    CONTAINERRULE = "ContainerRule"
    LAYERRULE = "LayerRule"
    SCOPERULE = "ScopeRule"
    STYLERULE = "StyleRule"
    STARTINGSTYLERULE = "StartingStyleRule"


class CSSRuleUsage(CDPObject):
    """ CSS coverage information. """

    # The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
    styleSheetId: DOM.StyleSheetId

    # Offset of the start of the rule (including selector) from the beginning ofthe stylesheet.
    startOffset: float

    # Offset of the end of the rule body from the beginning of the stylesheet.
    endOffset: float

    # Indicates whether the rule was actually used by some element in the page.
    used: bool


class CSSSourceRange(CDPObject):
    """ Text range within a resource. All numbers are zero-based. """

    # Start line of range.
    startLine: int

    # Start column of range (inclusive).
    startColumn: int

    # End line of range
    endLine: int

    # End column of range (exclusive).
    endColumn: int


class CSSShorthandEntry(CDPObject):

    # Shorthand name.
    name: str

    # Shorthand value.
    value: str

    # Whether the property has "!important" annotation (implies `false` ifabsent).
    important: bool | None = None


class CSSCSSComputedStyleProperty(CDPObject):

    # Computed style property name.
    name: str

    # Computed style property value.
    value: str


class CSSComputedStyleExtraFields(CDPObject):

    # Returns whether or not this node is being rendered with base appearance,which happens when it has its appearance property set to base/base-select or itis in the subtree of an element being rendered with base appearance.
    isAppearanceBase: bool


class CSSCSSStyle(CDPObject):
    """ CSS style representation. """

    # The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
    styleSheetId: DOM.StyleSheetId | None = None

    # CSS properties in the style.
    cssProperties: list[CSS.CSSProperty]

    # Computed values for all shorthands found in the style.
    shorthandEntries: list[CSS.ShorthandEntry]

    # Style declaration text (if available).
    cssText: str | None = None

    # Style declaration range in the enclosing stylesheet (if available).
    range: CSS.SourceRange | None = None


class CSSCSSProperty(CDPObject):
    """ CSS property declaration data. """

    # The property name.
    name: str

    # The property value.
    value: str

    # Whether the property has "!important" annotation (implies `false` ifabsent).
    important: bool | None = None

    # Whether the property is implicit (implies `false` if absent).
    implicit: bool | None = None

    # The full property text as specified in the style.
    text: str | None = None

    # Whether the property is understood by the browser (implies `true` ifabsent).
    parsedOk: bool | None = None

    # Whether the property is disabled by the user (present for source-basedproperties only).
    disabled: bool | None = None

    # The entire property range in the enclosing style declaration (ifavailable).
    range: CSS.SourceRange | None = None

    # Parsed longhand components of this property if it is a shorthand. Thisfield will be empty if the given property is not a shorthand.
    longhandProperties: list[CSS.CSSProperty] | None = None  # experimental


class CSSCSSMedia(CDPObject):
    """ CSS media rule descriptor. """

    # Media query text.
    text: str

    # Source of the media query: "mediaRule" if specified by a @media rule,"importRule" if specified by an @import rule, "linkedSheet" if specified by a"media" attribute in a linked stylesheet's LINK tag, "inlineSheet" if specifiedby a "media" attribute in an inline stylesheet's STYLE tag.
    source: Literal['mediaRule', 'importRule', 'linkedSheet', 'inlineSheet']

    # URL of the document containing the media query description.
    sourceURL: str | None = None

    # The associated rule (@media or @import) header range in the enclosingstylesheet (if available).
    range: CSS.SourceRange | None = None

    # Identifier of the stylesheet containing this object (if exists).
    styleSheetId: DOM.StyleSheetId | None = None

    # Array of media queries.
    mediaList: list[CSS.MediaQuery] | None = None


class CSSMediaQuery(CDPObject):
    """ Media query descriptor. """

    # Array of media query expressions.
    expressions: list[CSS.MediaQueryExpression]

    # Whether the media query condition is satisfied.
    active: bool


class CSSMediaQueryExpression(CDPObject):
    """ Media query expression descriptor. """

    # Media query expression value.
    value: float

    # Media query expression units.
    unit: str

    # Media query expression feature.
    feature: str

    # The associated range of the value text in the enclosing stylesheet (ifavailable).
    valueRange: CSS.SourceRange | None = None

    # Computed length of media query expression (if applicable).
    computedLength: float | None = None


class CSSCSSContainerQuery(CDPObject):
    """ CSS container query rule descriptor. """

    # Container query text.
    text: str

    # The associated rule header range in the enclosing stylesheet (ifavailable).
    range: CSS.SourceRange | None = None

    # Identifier of the stylesheet containing this object (if exists).
    styleSheetId: DOM.StyleSheetId | None = None

    # Optional name for the container.
    name: str | None = None

    # Optional physical axes queried for the container.
    physicalAxes: DOM.PhysicalAxes | None = None

    # Optional logical axes queried for the container.
    logicalAxes: DOM.LogicalAxes | None = None

    # true if the query contains scroll-state() queries.
    queriesScrollState: bool | None = None

    # true if the query contains anchored() queries.
    queriesAnchored: bool | None = None


class CSSCSSSupports(CDPObject):
    """ CSS Supports at-rule descriptor. """

    # Supports rule text.
    text: str

    # Whether the supports condition is satisfied.
    active: bool

    # The associated rule header range in the enclosing stylesheet (ifavailable).
    range: CSS.SourceRange | None = None

    # Identifier of the stylesheet containing this object (if exists).
    styleSheetId: DOM.StyleSheetId | None = None


class CSSCSSScope(CDPObject):
    """ CSS Scope at-rule descriptor. """

    # Scope rule text.
    text: str

    # The associated rule header range in the enclosing stylesheet (ifavailable).
    range: CSS.SourceRange | None = None

    # Identifier of the stylesheet containing this object (if exists).
    styleSheetId: DOM.StyleSheetId | None = None


class CSSCSSLayer(CDPObject):
    """ CSS Layer at-rule descriptor. """

    # Layer name.
    text: str

    # The associated rule header range in the enclosing stylesheet (ifavailable).
    range: CSS.SourceRange | None = None

    # Identifier of the stylesheet containing this object (if exists).
    styleSheetId: DOM.StyleSheetId | None = None


class CSSCSSStartingStyle(CDPObject):
    """ CSS Starting Style at-rule descriptor. """

    # The associated rule header range in the enclosing stylesheet (ifavailable).
    range: CSS.SourceRange | None = None

    # Identifier of the stylesheet containing this object (if exists).
    styleSheetId: DOM.StyleSheetId | None = None


class CSSCSSLayerData(CDPObject):
    """ CSS Layer data. """

    # Layer name.
    name: str

    # Direct sub-layers
    subLayers: list[CSS.CSSLayerData] | None = None

    # Layer order. The order determines the order of the layer in the cascadeorder. A higher number has higher priority in the cascade order.
    order: float


class CSSPlatformFontUsage(CDPObject):
    """ Information about amount of glyphs that were rendered with given font. """

    # Font's family name reported by platform.
    familyName: str

    # Font's PostScript name reported by platform.
    postScriptName: str

    # Indicates if the font was downloaded or resolved locally.
    isCustomFont: bool

    # Amount of glyphs that were rendered with this font.
    glyphCount: float


class CSSFontVariationAxis(CDPObject):
    """ Information about font variation axes for variable fonts """

    # The font-variation-setting tag (a.k.a. "axis tag").
    tag: str

    # Human-readable variation name in the default language (normally, "en").
    name: str

    # The minimum value (inclusive) the font supports for this tag.
    minValue: float

    # The maximum value (inclusive) the font supports for this tag.
    maxValue: float

    # The default value.
    defaultValue: float


class CSSFontFace(CDPObject):
    """ Properties of a web font: https://www.w3.org/TR/2008/REC-CSS2-20080411/fonts.html#font-descriptions
    and additional information such as platformFontFamily and fontVariationAxes. """

    # The font-family.
    fontFamily: str

    # The font-style.
    fontStyle: str

    # The font-variant.
    fontVariant: str

    # The font-weight.
    fontWeight: str

    # The font-stretch.
    fontStretch: str

    # The font-display.
    fontDisplay: str

    # The unicode-range.
    unicodeRange: str

    # The src.
    src: str

    # The resolved platform font family
    platformFontFamily: str

    # Available variation settings (a.k.a. "axes").
    fontVariationAxes: list[CSS.FontVariationAxis] | None = None


class CSSCSSTryRule(CDPObject):
    """ CSS try rule representation. """

    # The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
    styleSheetId: DOM.StyleSheetId | None = None

    # Parent stylesheet's origin.
    origin: CSS.StyleSheetOrigin

    # Associated style declaration.
    style: CSS.CSSStyle


class CSSCSSPositionTryRule(CDPObject):
    """ CSS @position-try rule representation. """

    # The prelude dashed-ident name
    name: CSS.Value

    # The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
    styleSheetId: DOM.StyleSheetId | None = None

    # Parent stylesheet's origin.
    origin: CSS.StyleSheetOrigin

    # Associated style declaration.
    style: CSS.CSSStyle

    active: bool


class CSSCSSKeyframesRule(CDPObject):
    """ CSS keyframes rule representation. """

    # Animation name.
    animationName: CSS.Value

    # List of keyframes.
    keyframes: list[CSS.CSSKeyframeRule]


class CSSCSSPropertyRegistration(CDPObject):
    """ Representation of a custom property registration through CSS.registerProperty """

    propertyName: str

    initialValue: CSS.Value | None = None

    inherits: bool

    syntax: str


class CSSCSSAtRule(CDPObject):
    """ CSS generic @rule representation. """

    # Type of at-rule.
    type: Literal['font-face', 'font-feature-values', 'font-palette-values']

    # Subsection of font-feature-values, if this is a subsection.
    subsection: Literal['swash', 'annotation', 'ornaments', 'stylistic', 'styleset', 'character-variant'] | None = None

    # LINT.ThenChange(//third_party/blink/renderer/core/inspector/inspector_style_sheet.cc:FontVariantAlternatesFeatureType,//third_party/blink/renderer/core/inspector/inspector_css_agent.cc:FontVariantAlternatesFeatureType) Associatedname, if applicable.
    name: CSS.Value | None = None

    # The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
    styleSheetId: DOM.StyleSheetId | None = None

    # Parent stylesheet's origin.
    origin: CSS.StyleSheetOrigin

    # Associated style declaration.
    style: CSS.CSSStyle


class CSSCSSPropertyRule(CDPObject):
    """ CSS property at-rule representation. """

    # The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
    styleSheetId: DOM.StyleSheetId | None = None

    # Parent stylesheet's origin.
    origin: CSS.StyleSheetOrigin

    # Associated property name.
    propertyName: CSS.Value

    # Associated style declaration.
    style: CSS.CSSStyle


class CSSCSSFunctionParameter(CDPObject):
    """ CSS function argument representation. """

    # The parameter name.
    name: str

    # The parameter type.
    type: str


class CSSCSSFunctionConditionNode(CDPObject):
    """ CSS function conditional block representation. """

    # Media query for this conditional block. Only one type of condition shouldbe set.
    media: CSS.CSSMedia | None = None

    # Container query for this conditional block. Only one type of conditionshould be set.
    containerQueries: CSS.CSSContainerQuery | None = None

    # @supports CSS at-rule condition. Only one type of condition should be set.
    supports: CSS.CSSSupports | None = None

    # Block body.
    children: list[CSS.CSSFunctionNode]

    # The condition text.
    conditionText: str


class CSSCSSFunctionNode(CDPObject):
    """ Section of the body of a CSS function rule. """

    # A conditional block. If set, style should not be set.
    condition: CSS.CSSFunctionConditionNode | None = None

    # Values set by this node. If set, condition should not be set.
    style: CSS.CSSStyle | None = None


class CSSCSSFunctionRule(CDPObject):
    """ CSS function at-rule representation. """

    # Name of the function.
    name: CSS.Value

    # The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
    styleSheetId: DOM.StyleSheetId | None = None

    # Parent stylesheet's origin.
    origin: CSS.StyleSheetOrigin

    # List of parameters.
    parameters: list[CSS.CSSFunctionParameter]

    # Function body.
    children: list[CSS.CSSFunctionNode]


class CSSCSSKeyframeRule(CDPObject):
    """ CSS keyframe rule representation. """

    # The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
    styleSheetId: DOM.StyleSheetId | None = None

    # Parent stylesheet's origin.
    origin: CSS.StyleSheetOrigin

    # Associated key text.
    keyText: CSS.Value

    # Associated style declaration.
    style: CSS.CSSStyle


class CSSStyleDeclarationEdit(CDPObject):
    """ A descriptor of operation to mutate style declaration text. """

    # The css style sheet identifier.
    styleSheetId: DOM.StyleSheetId

    # The range of the style text in the enclosing stylesheet.
    range: CSS.SourceRange

    # New style text.
    text: str


""" Unique identifier of the Cache object. """

CacheStorageCacheId = str


class CacheStorageCachedResponseType(enum.StrEnum):
    """ type of HTTP response cached """

    BASIC = "basic"
    CORS = "cors"
    DEFAULT = "default"
    ERROR = "error"
    OPAQUERESPONSE = "opaqueResponse"
    OPAQUEREDIRECT = "opaqueRedirect"


class CacheStorageDataEntry(CDPObject):
    """ Data entry. """

    # Request URL.
    requestURL: str

    # Request method.
    requestMethod: str

    # Request headers
    requestHeaders: list[CacheStorage.Header]

    # Number of seconds since epoch.
    responseTime: float

    # HTTP response status code.
    responseStatus: int

    # HTTP response status text.
    responseStatusText: str

    # HTTP response type
    responseType: CacheStorage.CachedResponseType

    # Response headers
    responseHeaders: list[CacheStorage.Header]


class CacheStorageCache(CDPObject):
    """ Cache identifier. """

    # An opaque unique id of the cache.
    cacheId: CacheStorage.CacheId

    # Security origin of the cache.
    securityOrigin: str

    # Storage key of the cache.
    storageKey: str

    # Storage bucket of the cache.
    storageBucket: Storage.StorageBucket | None = None

    # The name of the cache.
    cacheName: str


class CacheStorageHeader(CDPObject):

    name: str

    value: str


class CacheStorageCachedResponse(CDPObject):
    """ Cached response """

    # Entry content, base64-encoded. (Encoded as a base64 string when passedover JSON)
    body: str


class CastSink(CDPObject):

    name: str

    id: str

    # Text describing the current session. Present only if there is an activesession on the sink.
    session: str | None = None


""" Unique DOM node identifier. """

DOMNodeId = int
""" Unique DOM node identifier used to reference a node that may not have been pushed to the
front-end. """

DOMBackendNodeId = int
""" Unique identifier for a CSS stylesheet. """

DOMStyleSheetId = str


class DOMBackendNode(CDPObject):
    """ Backend node with a friendly name. """

    # `Node`'s nodeType.
    nodeType: int

    # `Node`'s nodeName.
    nodeName: str

    backendNodeId: DOM.BackendNodeId


class DOMPseudoType(enum.StrEnum):
    """ Pseudo element type. """

    FIRST_LINE = "first-line"
    FIRST_LETTER = "first-letter"
    CHECKMARK = "checkmark"
    BEFORE = "before"
    AFTER = "after"
    PICKER_ICON = "picker-icon"
    INTEREST_HINT = "interest-hint"
    MARKER = "marker"
    BACKDROP = "backdrop"
    COLUMN = "column"
    SELECTION = "selection"
    SEARCH_TEXT = "search-text"
    TARGET_TEXT = "target-text"
    SPELLING_ERROR = "spelling-error"
    GRAMMAR_ERROR = "grammar-error"
    HIGHLIGHT = "highlight"
    FIRST_LINE_INHERITED = "first-line-inherited"
    SCROLL_MARKER = "scroll-marker"
    SCROLL_MARKER_GROUP = "scroll-marker-group"
    SCROLL_BUTTON = "scroll-button"
    SCROLLBAR = "scrollbar"
    SCROLLBAR_THUMB = "scrollbar-thumb"
    SCROLLBAR_BUTTON = "scrollbar-button"
    SCROLLBAR_TRACK = "scrollbar-track"
    SCROLLBAR_TRACK_PIECE = "scrollbar-track-piece"
    SCROLLBAR_CORNER = "scrollbar-corner"
    RESIZER = "resizer"
    INPUT_LIST_BUTTON = "input-list-button"
    VIEW_TRANSITION = "view-transition"
    VIEW_TRANSITION_GROUP = "view-transition-group"
    VIEW_TRANSITION_IMAGE_PAIR = "view-transition-image-pair"
    VIEW_TRANSITION_GROUP_CHILDREN = "view-transition-group-children"
    VIEW_TRANSITION_OLD = "view-transition-old"
    VIEW_TRANSITION_NEW = "view-transition-new"
    PLACEHOLDER = "placeholder"
    FILE_SELECTOR_BUTTON = "file-selector-button"
    DETAILS_CONTENT = "details-content"
    PICKER = "picker"
    PERMISSION_ICON = "permission-icon"
    OVERSCROLL_AREA_PARENT = "overscroll-area-parent"


class DOMShadowRootType(enum.StrEnum):
    """ Shadow root type. """

    USER_AGENT = "user-agent"
    OPEN_ = "open"
    CLOSED = "closed"


class DOMCompatibilityMode(enum.StrEnum):
    """ Document compatibility mode. """

    QUIRKSMODE = "QuirksMode"
    LIMITEDQUIRKSMODE = "LimitedQuirksMode"
    NOQUIRKSMODE = "NoQuirksMode"


class DOMPhysicalAxes(enum.StrEnum):
    """ ContainerSelector physical axes """

    HORIZONTAL = "Horizontal"
    VERTICAL = "Vertical"
    BOTH = "Both"


class DOMLogicalAxes(enum.StrEnum):
    """ ContainerSelector logical axes """

    INLINE = "Inline"
    BLOCK = "Block"
    BOTH = "Both"


class DOMScrollOrientation(enum.StrEnum):
    """ Physical scroll orientation """

    HORIZONTAL = "horizontal"
    VERTICAL = "vertical"


class DOMNode(CDPObject):
    """ DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes.
    DOMNode is a base node mirror type. """

    # Node identifier that is passed into the rest of the DOM messages as the`nodeId`. Backend will only push node with given `id` once. It is aware of allrequested nodes and will only fire DOM events for nodes known to the client.
    nodeId: DOM.NodeId

    # The id of the parent node if any.
    parentId: DOM.NodeId | None = None

    # The BackendNodeId for this node.
    backendNodeId: DOM.BackendNodeId

    # `Node`'s nodeType.
    nodeType: int

    # `Node`'s nodeName.
    nodeName: str

    # `Node`'s localName.
    localName: str

    # `Node`'s nodeValue.
    nodeValue: str

    # Child count for `Container` nodes.
    childNodeCount: int | None = None

    # Child nodes of this node when requested with children.
    children: list[DOM.Node] | None = None

    # Attributes of the `Element` node in the form of flat array `[name1,value1, name2, value2]`.
    attributes: list[str] | None = None

    # Document URL that `Document` or `FrameOwner` node points to.
    documentURL: str | None = None

    # Base URL that `Document` or `FrameOwner` node uses for URL completion.
    baseURL: str | None = None

    # `DocumentType`'s publicId.
    publicId: str | None = None

    # `DocumentType`'s systemId.
    systemId: str | None = None

    # `DocumentType`'s internalSubset.
    internalSubset: str | None = None

    # `Document`'s XML version in case of XML documents.
    xmlVersion: str | None = None

    # `Attr`'s name.
    name: str | None = None

    # `Attr`'s value.
    value: str | None = None

    # Pseudo element type for this node.
    pseudoType: DOM.PseudoType | None = None

    # Pseudo element identifier for this node. Only present if there is a validpseudoType.
    pseudoIdentifier: str | None = None

    # Shadow root type.
    shadowRootType: DOM.ShadowRootType | None = None

    # Frame ID for frame owner elements.
    frameId: Page.FrameId | None = None

    # Content document for frame owner elements.
    contentDocument: DOM.Node | None = None

    # Shadow root list for given element host.
    shadowRoots: list[DOM.Node] | None = None

    # Content document fragment for template elements.
    templateContent: DOM.Node | None = None

    # Pseudo elements associated with this node.
    pseudoElements: list[DOM.Node] | None = None

    # Deprecated, as the HTML Imports API has been removed (crbug.com/937746).This property used to return the imported document for the HTMLImport links. Theproperty is always undefined now.
    importedDocument: DOM.Node | None = None  # deprecated

    # Distributed nodes for given insertion point.
    distributedNodes: list[DOM.BackendNode] | None = None

    # Whether the node is SVG.
    isSVG: bool | None = None

    compatibilityMode: DOM.CompatibilityMode | None = None

    assignedSlot: DOM.BackendNode | None = None

    isScrollable: bool | None = None  # experimental

    affectedByStartingStyles: bool | None = None  # experimental

    adoptedStyleSheets: list[DOM.StyleSheetId] | None = None  # experimental


class DOMDetachedElementInfo(CDPObject):
    """ A structure to hold the top-level node of a detached tree and an array of its retained descendants. """

    treeNode: DOM.Node

    retainedNodeIds: list[DOM.NodeId]


class DOMRGBA(CDPObject):
    """ A structure holding an RGBA color. """

    # The red component, in the [0-255] range.
    r: int

    # The green component, in the [0-255] range.
    g: int

    # The blue component, in the [0-255] range.
    b: int

    # The alpha component, in the [0-1] range (default: 1).
    a: float | None = None


""" An array of quad vertices, x immediately followed by y for each point, points clock-wise. """

DOMQuad = list[float]


class DOMBoxModel(CDPObject):
    """ Box model. """

    # Content box
    content: DOM.Quad

    # Padding box
    padding: DOM.Quad

    # Border box
    border: DOM.Quad

    # Margin box
    margin: DOM.Quad

    # Node width
    width: int

    # Node height
    height: int

    # Shape outside coordinates
    shapeOutside: DOM.ShapeOutsideInfo | None = None


class DOMShapeOutsideInfo(CDPObject):
    """ CSS Shape Outside details. """

    # Shape bounds
    bounds: DOM.Quad

    # Shape coordinate details
    shape: list[Any]

    # Margin shape bounds
    marginShape: list[Any]


class DOMRect(CDPObject):
    """ Rectangle. """

    # X coordinate
    x: float

    # Y coordinate
    y: float

    # Rectangle width
    width: float

    # Rectangle height
    height: float


class DOMCSSComputedStyleProperty(CDPObject):

    # Computed style property name.
    name: str

    # Computed style property value.
    value: str


class DOMDebuggerDOMBreakpointType(enum.StrEnum):
    """ DOM breakpoint type. """

    SUBTREE_MODIFIED = "subtree-modified"
    ATTRIBUTE_MODIFIED = "attribute-modified"
    NODE_REMOVED = "node-removed"


class DOMDebuggerCSPViolationType(enum.StrEnum):
    """ CSP Violation type. """

    TRUSTEDTYPE_SINK_VIOLATION = "trustedtype-sink-violation"
    TRUSTEDTYPE_POLICY_VIOLATION = "trustedtype-policy-violation"


class DOMDebuggerEventListener(CDPObject):
    """ Object event listener. """

    # `EventListener`'s type.
    type: str

    # `EventListener`'s useCapture.
    useCapture: bool

    # `EventListener`'s passive flag.
    passive: bool

    # `EventListener`'s once flag.
    once: bool

    # Script id of the handler code.
    scriptId: Runtime.ScriptId

    # Line number in the script (0-based).
    lineNumber: int

    # Column number in the script (0-based).
    columnNumber: int

    # Event handler function value.
    handler: Runtime.RemoteObject | None = None

    # Event original handler function value.
    originalHandler: Runtime.RemoteObject | None = None

    # Node the listener is added to (if any).
    backendNodeId: DOM.BackendNodeId | None = None


class DOMSnapshotDOMNode(CDPObject):
    """ A Node in the DOM tree. """

    # `Node`'s nodeType.
    nodeType: int

    # `Node`'s nodeName.
    nodeName: str

    # `Node`'s nodeValue.
    nodeValue: str

    # Only set for textarea elements, contains the text value.
    textValue: str | None = None

    # Only set for input elements, contains the input's associated text value.
    inputValue: str | None = None

    # Only set for radio and checkbox input elements, indicates if the elementhas been checked
    inputChecked: bool | None = None

    # Only set for option elements, indicates if the element has been selected
    optionSelected: bool | None = None

    # `Node`'s id, corresponds to DOM.Node.backendNodeId.
    backendNodeId: DOM.BackendNodeId

    # The indexes of the node's child nodes in the `domNodes` array returned by`getSnapshot`, if any.
    childNodeIndexes: list[int] | None = None

    # Attributes of an `Element` node.
    attributes: list[DOMSnapshot.NameValue] | None = None

    # Indexes of pseudo elements associated with this node in the `domNodes`array returned by `getSnapshot`, if any.
    pseudoElementIndexes: list[int] | None = None

    # The index of the node's related layout tree node in the `layoutTreeNodes`array returned by `getSnapshot`, if any.
    layoutNodeIndex: int | None = None

    # Document URL that `Document` or `FrameOwner` node points to.
    documentURL: str | None = None

    # Base URL that `Document` or `FrameOwner` node uses for URL completion.
    baseURL: str | None = None

    # Only set for documents, contains the document's content language.
    contentLanguage: str | None = None

    # Only set for documents, contains the document's character set encoding.
    documentEncoding: str | None = None

    # `DocumentType` node's publicId.
    publicId: str | None = None

    # `DocumentType` node's systemId.
    systemId: str | None = None

    # Frame ID for frame owner elements and also for the document node.
    frameId: Page.FrameId | None = None

    # The index of a frame owner element's content document in the `domNodes`array returned by `getSnapshot`, if any.
    contentDocumentIndex: int | None = None

    # Type of a pseudo element node.
    pseudoType: DOM.PseudoType | None = None

    # Shadow root type.
    shadowRootType: DOM.ShadowRootType | None = None

    # Whether this DOM node responds to mouse clicks. This includes nodes thathave had click event listeners attached via JavaScript as well as anchor tagsthat naturally navigate when clicked.
    isClickable: bool | None = None

    # Details of the node's event listeners, if any.
    eventListeners: list[DOMDebugger.EventListener] | None = None

    # The selected url for nodes with a srcset attribute.
    currentSourceURL: str | None = None

    # The url of the script (if any) that generates this node.
    originURL: str | None = None

    # Scroll offsets, set when this node is a Document.
    scrollOffsetX: float | None = None

    scrollOffsetY: float | None = None


class DOMSnapshotInlineTextBox(CDPObject):
    """ Details of post layout rendered text positions. The exact layout should not be regarded as
    stable and may change between versions. """

    # The bounding box in document coordinates. Note that scroll offset of thedocument is ignored.
    boundingBox: DOM.Rect

    # The starting index in characters, for this post layout textbox substring.Characters that would be represented as a surrogate pair in UTF-16 have length2.
    startCharacterIndex: int

    # The number of characters in this post layout textbox substring. Charactersthat would be represented as a surrogate pair in UTF-16 have length 2.
    numCharacters: int


class DOMSnapshotLayoutTreeNode(CDPObject):
    """ Details of an element in the DOM tree with a LayoutObject. """

    # The index of the related DOM node in the `domNodes` array returned by`getSnapshot`.
    domNodeIndex: int

    # The bounding box in document coordinates. Note that scroll offset of thedocument is ignored.
    boundingBox: DOM.Rect

    # Contents of the LayoutText, if any.
    layoutText: str | None = None

    # The post-layout inline text nodes, if any.
    inlineTextNodes: list[DOMSnapshot.InlineTextBox] | None = None

    # Index into the `computedStyles` array returned by `getSnapshot`.
    styleIndex: int | None = None

    # Global paint order index, which is determined by the stacking order of thenodes. Nodes that are painted together will have the same index. Only providedif includePaintOrder in getSnapshot was true.
    paintOrder: int | None = None

    # Set to true to indicate the element begins a new stacking context.
    isStackingContext: bool | None = None


class DOMSnapshotComputedStyle(CDPObject):
    """ A subset of the full ComputedStyle as defined by the request whitelist. """

    # Name/value pairs of computed style properties.
    properties: list[DOMSnapshot.NameValue]


class DOMSnapshotNameValue(CDPObject):
    """ A name/value pair. """

    # Attribute/property name.
    name: str

    # Attribute/property value.
    value: str


""" Index of the string in the strings table. """

DOMSnapshotStringIndex = int
""" Index of the string in the strings table. """

DOMSnapshotArrayOfStrings = list[DOMSnapshotStringIndex]


class DOMSnapshotRareStringData(CDPObject):
    """ Data that is only present on rare nodes. """

    index: list[int]

    value: list[DOMSnapshot.StringIndex]


class DOMSnapshotRareBooleanData(CDPObject):

    index: list[int]


class DOMSnapshotRareIntegerData(CDPObject):

    index: list[int]

    value: list[int]


DOMSnapshotRectangle = list[float]


class DOMSnapshotDocumentSnapshot(CDPObject):
    """ Document snapshot. """

    # Document URL that `Document` or `FrameOwner` node points to.
    documentURL: DOMSnapshot.StringIndex

    # Document title.
    title: DOMSnapshot.StringIndex

    # Base URL that `Document` or `FrameOwner` node uses for URL completion.
    baseURL: DOMSnapshot.StringIndex

    # Contains the document's content language.
    contentLanguage: DOMSnapshot.StringIndex

    # Contains the document's character set encoding.
    encodingName: DOMSnapshot.StringIndex

    # `DocumentType` node's publicId.
    publicId: DOMSnapshot.StringIndex

    # `DocumentType` node's systemId.
    systemId: DOMSnapshot.StringIndex

    # Frame ID for frame owner elements and also for the document node.
    frameId: DOMSnapshot.StringIndex

    # A table with dom nodes.
    nodes: DOMSnapshot.NodeTreeSnapshot

    # The nodes in the layout tree.
    layout: DOMSnapshot.LayoutTreeSnapshot

    # The post-layout inline text nodes.
    textBoxes: DOMSnapshot.TextBoxSnapshot

    # Horizontal scroll offset.
    scrollOffsetX: float | None = None

    # Vertical scroll offset.
    scrollOffsetY: float | None = None

    # Document content width.
    contentWidth: float | None = None

    # Document content height.
    contentHeight: float | None = None


class DOMSnapshotNodeTreeSnapshot(CDPObject):
    """ Table containing nodes. """

    # Parent node index.
    parentIndex: list[int] | None = None

    # `Node`'s nodeType.
    nodeType: list[int] | None = None

    # Type of the shadow root the `Node` is in. String values are equal to the`ShadowRootType` enum.
    shadowRootType: DOMSnapshot.RareStringData | None = None

    # `Node`'s nodeName.
    nodeName: list[DOMSnapshot.StringIndex] | None = None

    # `Node`'s nodeValue.
    nodeValue: list[DOMSnapshot.StringIndex] | None = None

    # `Node`'s id, corresponds to DOM.Node.backendNodeId.
    backendNodeId: list[DOM.BackendNodeId] | None = None

    # Attributes of an `Element` node. Flatten name, value pairs.
    attributes: list[DOMSnapshot.ArrayOfStrings] | None = None

    # Only set for textarea elements, contains the text value.
    textValue: DOMSnapshot.RareStringData | None = None

    # Only set for input elements, contains the input's associated text value.
    inputValue: DOMSnapshot.RareStringData | None = None

    # Only set for radio and checkbox input elements, indicates if the elementhas been checked
    inputChecked: DOMSnapshot.RareBooleanData | None = None

    # Only set for option elements, indicates if the element has been selected
    optionSelected: DOMSnapshot.RareBooleanData | None = None

    # The index of the document in the list of the snapshot documents.
    contentDocumentIndex: DOMSnapshot.RareIntegerData | None = None

    # Type of a pseudo element node.
    pseudoType: DOMSnapshot.RareStringData | None = None

    # Pseudo element identifier for this node. Only present if there is a validpseudoType.
    pseudoIdentifier: DOMSnapshot.RareStringData | None = None

    # Whether this DOM node responds to mouse clicks. This includes nodes thathave had click event listeners attached via JavaScript as well as anchor tagsthat naturally navigate when clicked.
    isClickable: DOMSnapshot.RareBooleanData | None = None

    # The selected url for nodes with a srcset attribute.
    currentSourceURL: DOMSnapshot.RareStringData | None = None

    # The url of the script (if any) that generates this node.
    originURL: DOMSnapshot.RareStringData | None = None


class DOMSnapshotLayoutTreeSnapshot(CDPObject):
    """ Table of details of an element in the DOM tree with a LayoutObject. """

    # Index of the corresponding node in the `NodeTreeSnapshot` array returnedby `captureSnapshot`.
    nodeIndex: list[int]

    # Array of indexes specifying computed style strings, filtered according tothe `computedStyles` parameter passed to `captureSnapshot`.
    styles: list[DOMSnapshot.ArrayOfStrings]

    # The absolute position bounding box.
    bounds: list[DOMSnapshot.Rectangle]

    # Contents of the LayoutText, if any.
    text: list[DOMSnapshot.StringIndex]

    # Stacking context information.
    stackingContexts: DOMSnapshot.RareBooleanData

    # Global paint order index, which is determined by the stacking order of thenodes. Nodes that are painted together will have the same index. Only providedif includePaintOrder in captureSnapshot was true.
    paintOrders: list[int] | None = None

    # The offset rect of nodes. Only available when includeDOMRects is set totrue
    offsetRects: list[DOMSnapshot.Rectangle] | None = None

    # The scroll rect of nodes. Only available when includeDOMRects is set totrue
    scrollRects: list[DOMSnapshot.Rectangle] | None = None

    # The client rect of nodes. Only available when includeDOMRects is set totrue
    clientRects: list[DOMSnapshot.Rectangle] | None = None

    # The list of background colors that are blended with colors of overlappingelements.
    blendedBackgroundColors: list[DOMSnapshot.StringIndex] | None = None  # experimental

    # The list of computed text opacities.
    textColorOpacities: list[float] | None = None  # experimental


class DOMSnapshotTextBoxSnapshot(CDPObject):
    """ Table of details of the post layout rendered text positions. The exact layout should not be regarded as
    stable and may change between versions. """

    # Index of the layout tree node that owns this box collection.
    layoutIndex: list[int]

    # The absolute position bounding box.
    bounds: list[DOMSnapshot.Rectangle]

    # The starting index in characters, for this post layout textbox substring.Characters that would be represented as a surrogate pair in UTF-16 have length2.
    start: list[int]

    # The number of characters in this post layout textbox substring. Charactersthat would be represented as a surrogate pair in UTF-16 have length 2.
    length: list[int]


DOMStorageSerializedStorageKey = str


class DOMStorageStorageId(CDPObject):
    """ DOM Storage identifier. """

    # Security origin for the storage.
    securityOrigin: str | None = None

    # Represents a key by which DOM Storage keys its CachedStorageAreas
    storageKey: DOMStorage.SerializedStorageKey | None = None

    # Whether the storage is local storage (not session storage).
    isLocalStorage: bool


""" DOM Storage item. """

DOMStorageItem = list[str]
""" Device request id. """

DeviceAccessRequestId = str
""" A device id. """

DeviceAccessDeviceId = str


class DeviceAccessPromptDevice(CDPObject):
    """ Device information displayed in a user prompt to select a device. """

    id: DeviceAccess.DeviceId

    # Display name as it appears in a device request user prompt.
    name: str


class EmulationSafeAreaInsets(CDPObject):

    # Overrides safe-area-inset-top.
    top: int | None = None

    # Overrides safe-area-max-inset-top.
    topMax: int | None = None

    # Overrides safe-area-inset-left.
    left: int | None = None

    # Overrides safe-area-max-inset-left.
    leftMax: int | None = None

    # Overrides safe-area-inset-bottom.
    bottom: int | None = None

    # Overrides safe-area-max-inset-bottom.
    bottomMax: int | None = None

    # Overrides safe-area-inset-right.
    right: int | None = None

    # Overrides safe-area-max-inset-right.
    rightMax: int | None = None


class EmulationScreenOrientation(CDPObject):
    """ Screen orientation. """

    # Orientation type.
    type: Literal['portraitPrimary', 'portraitSecondary', 'landscapePrimary', 'landscapeSecondary']

    # Orientation angle.
    angle: int


class EmulationDisplayFeature(CDPObject):

    # Orientation of a display feature in relation to screen
    orientation: Literal['vertical', 'horizontal']

    # The offset from the screen origin in either the x (for verticalorientation) or y (for horizontal orientation) direction.
    offset: int

    # A display feature may mask content such that it is not physicallydisplayed - this length along with the offset describes this area. A displayfeature that only splits content will have a 0 mask_length.
    maskLength: int


class EmulationDevicePosture(CDPObject):

    # Current posture of the device
    type: Literal['continuous', 'folded']


class EmulationMediaFeature(CDPObject):

    name: str

    value: str


class EmulationVirtualTimePolicy(enum.StrEnum):
    """ advance: If the scheduler runs out of immediate work, the virtual time base may fast forward to
    allow the next delayed task (if any) to run; pause: The virtual time base may not advance;
    pauseIfNetworkFetchesPending: The virtual time base may not advance if there are any pending
    resource fetches. """

    ADVANCE = "advance"
    PAUSE = "pause"
    PAUSEIFNETWORKFETCHESPENDING = "pauseIfNetworkFetchesPending"


class EmulationUserAgentBrandVersion(CDPObject):
    """ Used to specify User Agent Client Hints to emulate. See https://wicg.github.io/ua-client-hints """

    brand: str

    version: str


class EmulationUserAgentMetadata(CDPObject):
    """ Used to specify User Agent Client Hints to emulate. See https://wicg.github.io/ua-client-hints
    Missing optional values will be filled in by the target with what it would normally use. """

    # Brands appearing in Sec-CH-UA.
    brands: list[Emulation.UserAgentBrandVersion] | None = None

    # Brands appearing in Sec-CH-UA-Full-Version-List.
    fullVersionList: list[Emulation.UserAgentBrandVersion] | None = None

    fullVersion: str | None = None  # deprecated

    platform: str

    platformVersion: str

    architecture: str

    model: str

    mobile: bool

    bitness: str | None = None

    wow64: bool | None = None

    # Used to specify User Agent form-factor values. Seehttps://wicg.github.io/ua-client-hints/#sec-ch-ua-form-factors
    formFactors: list[str] | None = None


class EmulationSensorType(enum.StrEnum):
    """ Used to specify sensor types to emulate.
    See https://w3c.github.io/sensors/#automation for more information. """

    ABSOLUTE_ORIENTATION = "absolute-orientation"
    ACCELEROMETER = "accelerometer"
    AMBIENT_LIGHT = "ambient-light"
    GRAVITY = "gravity"
    GYROSCOPE = "gyroscope"
    LINEAR_ACCELERATION = "linear-acceleration"
    MAGNETOMETER = "magnetometer"
    RELATIVE_ORIENTATION = "relative-orientation"


class EmulationSensorMetadata(CDPObject):

    available: bool | None = None

    minimumFrequency: float | None = None

    maximumFrequency: float | None = None


class EmulationSensorReadingSingle(CDPObject):

    value: float


class EmulationSensorReadingXYZ(CDPObject):

    x: float

    y: float

    z: float


class EmulationSensorReadingQuaternion(CDPObject):

    x: float

    y: float

    z: float

    w: float


class EmulationSensorReading(CDPObject):

    single: Emulation.SensorReadingSingle | None = None

    xyz: Emulation.SensorReadingXYZ | None = None

    quaternion: Emulation.SensorReadingQuaternion | None = None


class EmulationPressureSource(enum.StrEnum):

    CPU = "cpu"


class EmulationPressureState(enum.StrEnum):

    NOMINAL = "nominal"
    FAIR = "fair"
    SERIOUS = "serious"
    CRITICAL = "critical"


class EmulationPressureMetadata(CDPObject):

    available: bool | None = None


class EmulationWorkAreaInsets(CDPObject):

    # Work area top inset in pixels. Default is 0;
    top: int | None = None

    # Work area left inset in pixels. Default is 0;
    left: int | None = None

    # Work area bottom inset in pixels. Default is 0;
    bottom: int | None = None

    # Work area right inset in pixels. Default is 0;
    right: int | None = None


EmulationScreenId = str


class EmulationScreenInfo(CDPObject):
    """ Screen information similar to the one returned by window.getScreenDetails() method,
    see https://w3c.github.io/window-management/#screendetailed. """

    # Offset of the left edge of the screen.
    left: int

    # Offset of the top edge of the screen.
    top: int

    # Width of the screen.
    width: int

    # Height of the screen.
    height: int

    # Offset of the left edge of the available screen area.
    availLeft: int

    # Offset of the top edge of the available screen area.
    availTop: int

    # Width of the available screen area.
    availWidth: int

    # Height of the available screen area.
    availHeight: int

    # Specifies the screen's device pixel ratio.
    devicePixelRatio: float

    # Specifies the screen's orientation.
    orientation: Emulation.ScreenOrientation

    # Specifies the screen's color depth in bits.
    colorDepth: int

    # Indicates whether the device has multiple screens.
    isExtended: bool

    # Indicates whether the screen is internal to the device or external,attached to the device.
    isInternal: bool

    # Indicates whether the screen is set as the the operating system primaryscreen.
    isPrimary: bool

    # Specifies the descriptive label for the screen.
    label: str

    # Specifies the unique identifier of the screen.
    id: Emulation.ScreenId


class EmulationDisabledImageType(enum.StrEnum):
    """ Enum of image types that can be disabled. """

    AVIF = "avif"
    WEBP = "webp"


class ExtensionsStorageArea(enum.StrEnum):
    """ Storage areas. """

    SESSION = "session"
    LOCAL = "local"
    SYNC = "sync"
    MANAGED = "managed"


class FedCmLoginState(enum.StrEnum):
    """ Whether this is a sign-up or sign-in action for this account, i.e.
    whether this account has ever been used to sign in to this RP before. """

    SIGNIN = "SignIn"
    SIGNUP = "SignUp"


class FedCmDialogType(enum.StrEnum):
    """ The types of FedCM dialogs. """

    ACCOUNTCHOOSER = "AccountChooser"
    AUTOREAUTHN = "AutoReauthn"
    CONFIRMIDPLOGIN = "ConfirmIdpLogin"
    ERROR = "Error"


class FedCmDialogButton(enum.StrEnum):
    """ The buttons on the FedCM dialog. """

    CONFIRMIDPLOGINCONTINUE = "ConfirmIdpLoginContinue"
    ERRORGOTIT = "ErrorGotIt"
    ERRORMOREDETAILS = "ErrorMoreDetails"


class FedCmAccountUrlType(enum.StrEnum):
    """ The URLs that each account has """

    TERMSOFSERVICE = "TermsOfService"
    PRIVACYPOLICY = "PrivacyPolicy"


class FedCmAccount(CDPObject):
    """ Corresponds to IdentityRequestAccount """

    accountId: str

    email: str

    name: str

    givenName: str

    pictureUrl: str

    idpConfigUrl: str

    idpLoginUrl: str

    loginState: FedCm.LoginState

    # These two are only set if the loginState is signUp
    termsOfServiceUrl: str | None = None

    privacyPolicyUrl: str | None = None


""" Unique request identifier.
Note that this does not identify individual HTTP requests that are part of
a network request. """

FetchRequestId = str


class FetchRequestStage(enum.StrEnum):
    """ Stages of the request to handle. Request will intercept before the request is
    sent. Response will intercept after the response is received (but before response
    body is received). """

    REQUEST = "Request"
    RESPONSE = "Response"


class FetchRequestPattern(CDPObject):

    # Wildcards (`'*'` -> zero or more, `'?'` -> exactly one) are allowed.Escape character is backslash. Omitting is equivalent to `"*"`.
    urlPattern: str | None = None

    # If set, only requests for matching resource types will be intercepted.
    resourceType: Network.ResourceType | None = None

    # Stage at which to begin intercepting requests. Default is Request.
    requestStage: Fetch.RequestStage | None = None


class FetchHeaderEntry(CDPObject):
    """ Response HTTP header entry """

    name: str

    value: str


class FetchAuthChallenge(CDPObject):
    """ Authorization challenge for HTTP status code 401 or 407. """

    # Source of the authentication challenge.
    source: Literal['Server', 'Proxy'] | None = None

    # Origin of the challenger.
    origin: str

    # The authentication scheme used, such as basic or digest
    scheme: str

    # The realm of the challenge. May be empty.
    realm: str


class FetchAuthChallengeResponse(CDPObject):
    """ Response to an AuthChallenge. """

    # The decision on what to do in response to the authorization challenge.Default means deferring to the default behavior of the net stack, which willlikely either the Cancel authentication or display a popup dialog box.
    response: Literal['Default', 'CancelAuth', 'ProvideCredentials']

    # The username to provide, possibly empty. Should only be set if response isProvideCredentials.
    username: str | None = None

    # The password to provide, possibly empty. Should only be set if response isProvideCredentials.
    password: str | None = None


class FileSystemFile(CDPObject):

    name: str

    # Timestamp
    lastModified: Network.TimeSinceEpoch

    # Size in bytes
    size: float

    type: str


class FileSystemDirectory(CDPObject):

    name: str

    nestedDirectories: list[str]

    # Files that are directly nested under this directory.
    nestedFiles: list[FileSystem.File]


class FileSystemBucketFileSystemLocator(CDPObject):

    # Storage key
    storageKey: Storage.SerializedStorageKey

    # Bucket name. Not passing a `bucketName` will retrieve the default Bucket.(https://developer.mozilla.org/en-US/docs/Web/API/Storage_API#storage_buckets)
    bucketName: str | None = None

    # Path to the directory using each path component as an array item.
    pathComponents: list[str]


class HeadlessExperimentalScreenshotParams(CDPObject):
    """ Encoding options for a screenshot. """

    # Image compression format (defaults to png).
    format: Literal['jpeg', 'png', 'webp'] | None = None

    # Compression quality from range [0..100] (jpeg and webp only).
    quality: int | None = None

    # Optimize image encoding for speed, not for resulting size (defaults tofalse)
    optimizeForSpeed: bool | None = None


""" This is either obtained from another method or specified as `blob:<uuid>` where
`<uuid>` is an UUID of a Blob. """

IOStreamHandle = str


class IndexedDBDatabaseWithObjectStores(CDPObject):
    """ Database with an array of object stores. """

    # Database name.
    name: str

    # Database version (type is not 'integer', as the standard requires theversion number to be 'unsigned long long')
    version: float

    # Object stores in this database.
    objectStores: list[IndexedDB.ObjectStore]


class IndexedDBObjectStore(CDPObject):
    """ Object store. """

    # Object store name.
    name: str

    # Object store key path.
    keyPath: IndexedDB.KeyPath

    # If true, object store has auto increment flag set.
    autoIncrement: bool

    # Indexes in this object store.
    indexes: list[IndexedDB.ObjectStoreIndex]


class IndexedDBObjectStoreIndex(CDPObject):
    """ Object store index. """

    # Index name.
    name: str

    # Index key path.
    keyPath: IndexedDB.KeyPath

    # If true, index is unique.
    unique: bool

    # If true, index allows multiple entries for a key.
    multiEntry: bool


class IndexedDBKey(CDPObject):
    """ Key. """

    # Key type.
    type: Literal['number', 'string', 'date', 'array']

    # Number value.
    number: float | None = None

    # String value.
    string: str | None = None

    # Date value.
    date: float | None = None

    # Array value.
    array: list[IndexedDB.Key] | None = None


class IndexedDBKeyRange(CDPObject):
    """ Key range. """

    # Lower bound.
    lower: IndexedDB.Key | None = None

    # Upper bound.
    upper: IndexedDB.Key | None = None

    # If true lower bound is open.
    lowerOpen: bool

    # If true upper bound is open.
    upperOpen: bool


class IndexedDBDataEntry(CDPObject):
    """ Data entry. """

    # Key object.
    key: Runtime.RemoteObject

    # Primary key object.
    primaryKey: Runtime.RemoteObject

    # Value object.
    value: Runtime.RemoteObject


class IndexedDBKeyPath(CDPObject):
    """ Key path. """

    # Key path type.
    type: Literal['null', 'string', 'array']

    # String value.
    string: str | None = None

    # Array value.
    array: list[str] | None = None


class InputTouchPoint(CDPObject):

    # X coordinate of the event relative to the main frame's viewport in CSSpixels.
    x: float

    # Y coordinate of the event relative to the main frame's viewport in CSSpixels. 0 refers to the top of the viewport and Y increases as it proceedstowards the bottom of the viewport.
    y: float

    # X radius of the touch area (default: 1.0).
    radiusX: float | None = None

    # Y radius of the touch area (default: 1.0).
    radiusY: float | None = None

    # Rotation angle (default: 0.0).
    rotationAngle: float | None = None

    # Force (default: 1.0).
    force: float | None = None

    # The normalized tangential pressure, which has a range of [-1,1] (default:0).
    tangentialPressure: float | None = None  # experimental

    # The plane angle between the Y-Z plane and the plane containing both thestylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltXis to the right (default: 0)
    tiltX: float | None = None

    # The plane angle between the X-Z plane and the plane containing both thestylus axis and the X axis, in degrees of the range [-90,90], a positive tiltYis towards the user (default: 0).
    tiltY: float | None = None

    # The clockwise rotation of a pen stylus around its own major axis, indegrees in the range [0,359] (default: 0).
    twist: int | None = None  # experimental

    # Identifier used to track touch sources between events, must be uniquewithin an event.
    id: float | None = None


class InputGestureSourceType(enum.StrEnum):

    DEFAULT = "default"
    TOUCH = "touch"
    MOUSE = "mouse"


class InputMouseButton(enum.StrEnum):

    NONE = "none"
    LEFT = "left"
    MIDDLE = "middle"
    RIGHT = "right"
    BACK = "back"
    FORWARD = "forward"


""" UTC time in seconds, counted from January 1, 1970. """

InputTimeSinceEpoch = float


class InputDragDataItem(CDPObject):

    # Mime type of the dragged data.
    mimeType: str

    # Depending of the value of `mimeType`, it contains the dragged link, text,HTML markup or any other data.
    data: str

    # Title associated with a link. Only valid when `mimeType` == "text/uri-list".
    title: str | None = None

    # Stores the base URL for the contained markup. Only valid when `mimeType`== "text/html".
    baseURL: str | None = None


class InputDragData(CDPObject):

    items: list[Input.DragDataItem]

    # List of filenames that should be included when dropping
    files: list[str] | None = None

    # Bit field representing allowed drag operations. Copy = 1, Link = 2, Move =16
    dragOperationsMask: int


""" Unique Layer identifier. """

LayerTreeLayerId = str
""" Unique snapshot identifier. """

LayerTreeSnapshotId = str


class LayerTreeScrollRect(CDPObject):
    """ Rectangle where scrolling happens on the main thread. """

    # Rectangle itself.
    rect: DOM.Rect

    # Reason for rectangle to force scrolling on the main thread
    type: Literal['RepaintsOnScroll', 'TouchEventHandler', 'WheelEventHandler']


class LayerTreeStickyPositionConstraint(CDPObject):
    """ Sticky position constraints. """

    # Layout rectangle of the sticky element before being shifted
    stickyBoxRect: DOM.Rect

    # Layout rectangle of the containing block of the sticky element
    containingBlockRect: DOM.Rect

    # The nearest sticky layer that shifts the sticky box
    nearestLayerShiftingStickyBox: LayerTree.LayerId | None = None

    # The nearest sticky layer that shifts the containing block
    nearestLayerShiftingContainingBlock: LayerTree.LayerId | None = None


class LayerTreePictureTile(CDPObject):
    """ Serialized fragment of layer picture along with its offset within the layer. """

    # Offset from owning layer left boundary
    x: float

    # Offset from owning layer top boundary
    y: float

    # Base64-encoded snapshot data. (Encoded as a base64 string when passed overJSON)
    picture: str


class LayerTreeLayer(CDPObject):
    """ Information about a compositing layer. """

    # The unique id for this layer.
    layerId: LayerTree.LayerId

    # The id of parent (not present for root).
    parentLayerId: LayerTree.LayerId | None = None

    # The backend id for the node associated with this layer.
    backendNodeId: DOM.BackendNodeId | None = None

    # Offset from parent layer, X coordinate.
    offsetX: float

    # Offset from parent layer, Y coordinate.
    offsetY: float

    # Layer width.
    width: float

    # Layer height.
    height: float

    # Transformation matrix for layer, default is identity matrix
    transform: list[float] | None = None

    # Transform anchor point X, absent if no transform specified
    anchorX: float | None = None

    # Transform anchor point Y, absent if no transform specified
    anchorY: float | None = None

    # Transform anchor point Z, absent if no transform specified
    anchorZ: float | None = None

    # Indicates how many time this layer has painted.
    paintCount: int

    # Indicates whether this layer hosts any content, rather than being used fortransform/scrolling purposes only.
    drawsContent: bool

    # Set if layer is not visible.
    invisible: bool | None = None

    # Rectangles scrolling on main thread only.
    scrollRects: list[LayerTree.ScrollRect] | None = None

    # Sticky position constraint information
    stickyPositionConstraint: LayerTree.StickyPositionConstraint | None = None


""" Array of timings, one per paint step. """

LayerTreePaintProfile = list[float]


class LogLogEntry(CDPObject):
    """ Log entry. """

    # Log entry source.
    source: Literal['xml', 'javascript', 'network', 'storage', 'appcache', 'rendering', 'security', 'deprecation', 'worker', 'violation', 'intervention', 'recommendation', 'other']

    # Log entry severity.
    level: Literal['verbose', 'info', 'warning', 'error']

    # Logged text.
    text: str

    category: Literal['cors'] | None = None

    # Timestamp when this entry was added.
    timestamp: Runtime.Timestamp

    # URL of the resource if known.
    url: str | None = None

    # Line number in the resource.
    lineNumber: int | None = None

    # JavaScript stack trace.
    stackTrace: Runtime.StackTrace | None = None

    # Identifier of the network request associated with this entry.
    networkRequestId: Network.RequestId | None = None

    # Identifier of the worker associated with this entry.
    workerId: str | None = None

    # Call arguments.
    args: list[Runtime.RemoteObject] | None = None


class LogViolationSetting(CDPObject):
    """ Violation configuration setting. """

    # Violation type.
    name: Literal['longTask', 'longLayout', 'blockedEvent', 'blockedParser', 'discouragedAPIUse', 'handler', 'recurringHandler']

    # Time threshold to trigger upon.
    threshold: float


""" Players will get an ID that is unique within the agent context. """

MediaPlayerId = str

MediaTimestamp = float


class MediaPlayerMessage(CDPObject):
    """ Have one type per entry in MediaLogRecord::Type
    Corresponds to kMessage """

    # Keep in sync with MediaLogMessageLevel We are currently keeping themessage level 'error' separate from the PlayerError type because right now theyrepresent different things, this one being a DVLOG(ERROR) style log message thatgets printed based on what log level is selected in the UI, and the other is arepresentation of a media::PipelineStatus object. Soon however we're going to bemoving away from using PipelineStatus for errors and introducing a new errortype which should hopefully let us integrate the error log level into thePlayerError type.
    level: Literal['error', 'warning', 'info', 'debug']

    message: str


class MediaPlayerProperty(CDPObject):
    """ Corresponds to kMediaPropertyChange """

    name: str

    value: str


class MediaPlayerEvent(CDPObject):
    """ Corresponds to kMediaEventTriggered """

    timestamp: Media.Timestamp

    value: str


class MediaPlayerErrorSourceLocation(CDPObject):
    """ Represents logged source line numbers reported in an error.
    NOTE: file and line are from chromium c++ implementation code, not js. """

    file: str

    line: int


class MediaPlayerError(CDPObject):
    """ Corresponds to kMediaError """

    errorType: str

    # Code is the numeric enum entry for a specific set of error codes, such asPipelineStatusCodes in media/base/pipeline_status.h
    code: int

    # A trace of where this error was caused / where it passed through.
    stack: list[Media.PlayerErrorSourceLocation]

    # Errors potentially have a root cause error, ie, a DecoderError might becaused by an WindowsError
    cause: list[Media.PlayerError]

    # Extra data attached to an error, such as an HRESULT, Video Codec, etc.
    data: JSON_DICT


class MediaPlayer(CDPObject):

    playerId: Media.PlayerId

    domNodeId: DOM.BackendNodeId | None = None


class MemoryPressureLevel(enum.StrEnum):
    """ Memory pressure level. """

    MODERATE = "moderate"
    CRITICAL = "critical"


class MemorySamplingProfileNode(CDPObject):
    """ Heap profile sample. """

    # Size of the sampled allocation.
    size: float

    # Total bytes attributed to this sample.
    total: float

    # Execution stack at the point of allocation.
    stack: list[str]


class MemorySamplingProfile(CDPObject):
    """ Array of heap profile samples. """

    samples: list[Memory.SamplingProfileNode]

    modules: list[Memory.Module]


class MemoryModule(CDPObject):
    """ Executable module information """

    # Name of the module.
    name: str

    # UUID of the module.
    uuid: str

    # Base address where the module is loaded into memory. Encoded as a decimalor hexadecimal (0x prefixed) string.
    baseAddress: str

    # Size of the module in bytes.
    size: float


class MemoryDOMCounter(CDPObject):
    """ DOM object counter data. """

    # Object name. Note: object names should be presumed volatile and clientsshould not expect the returned names to be consistent across runs.
    name: str

    # Object count.
    count: int


class NetworkResourceType(enum.StrEnum):
    """ Resource type as it was perceived by the rendering engine. """

    DOCUMENT = "Document"
    STYLESHEET = "Stylesheet"
    IMAGE = "Image"
    MEDIA = "Media"
    FONT = "Font"
    SCRIPT = "Script"
    TEXTTRACK = "TextTrack"
    XHR = "XHR"
    FETCH = "Fetch"
    PREFETCH = "Prefetch"
    EVENTSOURCE = "EventSource"
    WEBSOCKET = "WebSocket"
    MANIFEST = "Manifest"
    SIGNEDEXCHANGE = "SignedExchange"
    PING = "Ping"
    CSPVIOLATIONREPORT = "CSPViolationReport"
    PREFLIGHT = "Preflight"
    FEDCM = "FedCM"
    OTHER = "Other"


""" Unique loader identifier. """

NetworkLoaderId = str
""" Unique network request identifier.
Note that this does not identify individual HTTP requests that are part of
a network request. """

NetworkRequestId = str
""" Unique intercepted request identifier. """

NetworkInterceptionId = str


class NetworkErrorReason(enum.StrEnum):
    """ Network level fetch failure reason. """

    FAILED = "Failed"
    ABORTED = "Aborted"
    TIMEDOUT = "TimedOut"
    ACCESSDENIED = "AccessDenied"
    CONNECTIONCLOSED = "ConnectionClosed"
    CONNECTIONRESET = "ConnectionReset"
    CONNECTIONREFUSED = "ConnectionRefused"
    CONNECTIONABORTED = "ConnectionAborted"
    CONNECTIONFAILED = "ConnectionFailed"
    NAMENOTRESOLVED = "NameNotResolved"
    INTERNETDISCONNECTED = "InternetDisconnected"
    ADDRESSUNREACHABLE = "AddressUnreachable"
    BLOCKEDBYCLIENT = "BlockedByClient"
    BLOCKEDBYRESPONSE = "BlockedByResponse"


""" UTC time in seconds, counted from January 1, 1970. """

NetworkTimeSinceEpoch = float
""" Monotonically increasing time in seconds since an arbitrary point in the past. """

NetworkMonotonicTime = float
""" Request / response headers as keys / values of JSON object. """

NetworkHeaders = JSON_DICT


class NetworkConnectionType(enum.StrEnum):
    """ The underlying connection technology that the browser is supposedly using. """

    NONE = "none"
    CELLULAR2G = "cellular2g"
    CELLULAR3G = "cellular3g"
    CELLULAR4G = "cellular4g"
    BLUETOOTH = "bluetooth"
    ETHERNET = "ethernet"
    WIFI = "wifi"
    WIMAX = "wimax"
    OTHER = "other"


class NetworkCookieSameSite(enum.StrEnum):
    """ Represents the cookie's 'SameSite' status:
    https://tools.ietf.org/html/draft-west-first-party-cookies """

    STRICT = "Strict"
    LAX = "Lax"
    NONE_ = "None"


class NetworkCookiePriority(enum.StrEnum):
    """ Represents the cookie's 'Priority' status:
    https://tools.ietf.org/html/draft-west-cookie-priority-00 """

    LOW = "Low"
    MEDIUM = "Medium"
    HIGH = "High"


class NetworkCookieSourceScheme(enum.StrEnum):
    """ Represents the source scheme of the origin that originally set the cookie.
    A value of "Unset" allows protocol clients to emulate legacy cookie scope for the scheme.
    This is a temporary ability and it will be removed in the future. """

    UNSET = "Unset"
    NONSECURE = "NonSecure"
    SECURE = "Secure"


class NetworkResourceTiming(CDPObject):
    """ Timing information for the request. """

    # Timing's requestTime is a baseline in seconds, while the other numbers areticks in milliseconds relatively to this requestTime.
    requestTime: float

    # Started resolving proxy.
    proxyStart: float

    # Finished resolving proxy.
    proxyEnd: float

    # Started DNS address resolve.
    dnsStart: float

    # Finished DNS address resolve.
    dnsEnd: float

    # Started connecting to the remote host.
    connectStart: float

    # Connected to the remote host.
    connectEnd: float

    # Started SSL handshake.
    sslStart: float

    # Finished SSL handshake.
    sslEnd: float

    # Started running ServiceWorker.
    workerStart: float | None = None  # experimental

    # Finished Starting ServiceWorker.
    workerReady: float | None = None  # experimental

    # Started fetch event.
    workerFetchStart: float | None = None  # experimental

    # Settled fetch event respondWith promise.
    workerRespondWithSettled: float | None = None  # experimental

    # Started ServiceWorker static routing source evaluation.
    workerRouterEvaluationStart: float | None = None  # experimental

    # Started cache lookup when the source was evaluated to `cache`.
    workerCacheLookupStart: float | None = None  # experimental

    # Started sending request.
    sendStart: float

    # Finished sending request.
    sendEnd: float

    # Time the server started pushing request.
    pushStart: float | None = None  # experimental

    # Time the server finished pushing request.
    pushEnd: float | None = None  # experimental

    # Started receiving response headers.
    receiveHeadersStart: float | None = None  # experimental

    # Finished receiving response headers.
    receiveHeadersEnd: float


class NetworkResourcePriority(enum.StrEnum):
    """ Loading priority of a resource request. """

    VERYLOW = "VeryLow"
    LOW = "Low"
    MEDIUM = "Medium"
    HIGH = "High"
    VERYHIGH = "VeryHigh"


class NetworkRenderBlockingBehavior(enum.StrEnum):
    """ The render blocking behavior of a resource request. """

    BLOCKING = "Blocking"
    INBODYPARSERBLOCKING = "InBodyParserBlocking"
    NONBLOCKING = "NonBlocking"
    NONBLOCKINGDYNAMIC = "NonBlockingDynamic"
    POTENTIALLYBLOCKING = "PotentiallyBlocking"


class NetworkPostDataEntry(CDPObject):
    """ Post data entry for HTTP request """

    bytes: str | None = None


class NetworkRequest(CDPObject):
    """ HTTP request data. """

    # Request URL (without fragment).
    url: str

    # Fragment of the requested URL starting with hash, if present.
    urlFragment: str | None = None

    # HTTP request method.
    method: str

    # HTTP request headers.
    headers: Network.Headers

    # HTTP POST request data. Use postDataEntries instead.
    postData: str | None = None  # deprecated

    # True when the request has POST data. Note that postData might still beomitted when this flag is true when the data is too long.
    hasPostData: bool | None = None

    # Request body elements (post data broken into individual entries).
    postDataEntries: list[Network.PostDataEntry] | None = None  # experimental

    # The mixed content type of the request.
    mixedContentType: Security.MixedContentType | None = None

    # Priority of the resource request at the time request is sent.
    initialPriority: Network.ResourcePriority

    # The referrer policy of the request, as defined inhttps://www.w3.org/TR/referrer-policy/
    referrerPolicy: Literal['unsafe-url', 'no-referrer-when-downgrade', 'no-referrer', 'origin', 'origin-when-cross-origin', 'same-origin', 'strict-origin', 'strict-origin-when-cross-origin']

    # Whether is loaded via link preload.
    isLinkPreload: bool | None = None

    # Set for requests when the TrustToken API is used. Contains the parameterspassed by the developer (e.g. via "fetch") as understood by the backend.
    trustTokenParams: Network.TrustTokenParams | None = None  # experimental

    # True if this resource request is considered to be the 'same site' as therequest corresponding to the main frame.
    isSameSite: bool | None = None  # experimental

    # True when the resource request is ad-related.
    isAdRelated: bool | None = None  # experimental


class NetworkSignedCertificateTimestamp(CDPObject):
    """ Details of a signed certificate timestamp (SCT). """

    # Validation status.
    status: str

    # Origin.
    origin: str

    # Log name / description.
    logDescription: str

    # Log ID.
    logId: str

    # Issuance date. Unlike TimeSinceEpoch, this contains the number ofmilliseconds since January 1, 1970, UTC, not the number of seconds.
    timestamp: float

    # Hash algorithm.
    hashAlgorithm: str

    # Signature algorithm.
    signatureAlgorithm: str

    # Signature data.
    signatureData: str


class NetworkSecurityDetails(CDPObject):
    """ Security details about a request. """

    # Protocol name (e.g. "TLS 1.2" or "QUIC").
    protocol: str

    # Key Exchange used by the connection, or the empty string if notapplicable.
    keyExchange: str

    # (EC)DH group used by the connection, if applicable.
    keyExchangeGroup: str | None = None

    # Cipher name.
    cipher: str

    # TLS MAC. Note that AEAD ciphers do not have separate MACs.
    mac: str | None = None

    # Certificate ID value.
    certificateId: Security.CertificateId

    # Certificate subject name.
    subjectName: str

    # Subject Alternative Name (SAN) DNS names and IP addresses.
    sanList: list[str]

    # Name of the issuing CA.
    issuer: str

    # Certificate valid from date.
    validFrom: Network.TimeSinceEpoch

    # Certificate valid to (expiration) date
    validTo: Network.TimeSinceEpoch

    # List of signed certificate timestamps (SCTs).
    signedCertificateTimestampList: list[Network.SignedCertificateTimestamp]

    # Whether the request complied with Certificate Transparency policy
    certificateTransparencyCompliance: Network.CertificateTransparencyCompliance

    # The signature algorithm used by the server in the TLS server signature,represented as a TLS SignatureScheme code point. Omitted if not applicable ornot known.
    serverSignatureAlgorithm: int | None = None

    # Whether the connection used Encrypted ClientHello
    encryptedClientHello: bool


class NetworkCertificateTransparencyCompliance(enum.StrEnum):
    """ Whether the request complied with Certificate Transparency policy. """

    UNKNOWN = "unknown"
    NOT_COMPLIANT = "not-compliant"
    COMPLIANT = "compliant"


class NetworkBlockedReason(enum.StrEnum):
    """ The reason why request was blocked. """

    OTHER = "other"
    CSP = "csp"
    MIXED_CONTENT = "mixed-content"
    ORIGIN = "origin"
    INSPECTOR = "inspector"
    INTEGRITY = "integrity"
    SUBRESOURCE_FILTER = "subresource-filter"
    CONTENT_TYPE = "content-type"
    COEP_FRAME_RESOURCE_NEEDS_COEP_HEADER = "coep-frame-resource-needs-coep-header"
    COOP_SANDBOXED_IFRAME_CANNOT_NAVIGATE_TO_COOP_PAGE = "coop-sandboxed-iframe-cannot-navigate-to-coop-page"
    CORP_NOT_SAME_ORIGIN = "corp-not-same-origin"
    CORP_NOT_SAME_ORIGIN_AFTER_DEFAULTED_TO_SAME_ORIGIN_BY_COEP = "corp-not-same-origin-after-defaulted-to-same-origin-by-coep"
    CORP_NOT_SAME_ORIGIN_AFTER_DEFAULTED_TO_SAME_ORIGIN_BY_DIP = "corp-not-same-origin-after-defaulted-to-same-origin-by-dip"
    CORP_NOT_SAME_ORIGIN_AFTER_DEFAULTED_TO_SAME_ORIGIN_BY_COEP_AND_DIP = "corp-not-same-origin-after-defaulted-to-same-origin-by-coep-and-dip"
    CORP_NOT_SAME_SITE = "corp-not-same-site"
    SRI_MESSAGE_SIGNATURE_MISMATCH = "sri-message-signature-mismatch"


class NetworkCorsError(enum.StrEnum):
    """ The reason why request was blocked. """

    DISALLOWEDBYMODE = "DisallowedByMode"
    INVALIDRESPONSE = "InvalidResponse"
    WILDCARDORIGINNOTALLOWED = "WildcardOriginNotAllowed"
    MISSINGALLOWORIGINHEADER = "MissingAllowOriginHeader"
    MULTIPLEALLOWORIGINVALUES = "MultipleAllowOriginValues"
    INVALIDALLOWORIGINVALUE = "InvalidAllowOriginValue"
    ALLOWORIGINMISMATCH = "AllowOriginMismatch"
    INVALIDALLOWCREDENTIALS = "InvalidAllowCredentials"
    CORSDISABLEDSCHEME = "CorsDisabledScheme"
    PREFLIGHTINVALIDSTATUS = "PreflightInvalidStatus"
    PREFLIGHTDISALLOWEDREDIRECT = "PreflightDisallowedRedirect"
    PREFLIGHTWILDCARDORIGINNOTALLOWED = "PreflightWildcardOriginNotAllowed"
    PREFLIGHTMISSINGALLOWORIGINHEADER = "PreflightMissingAllowOriginHeader"
    PREFLIGHTMULTIPLEALLOWORIGINVALUES = "PreflightMultipleAllowOriginValues"
    PREFLIGHTINVALIDALLOWORIGINVALUE = "PreflightInvalidAllowOriginValue"
    PREFLIGHTALLOWORIGINMISMATCH = "PreflightAllowOriginMismatch"
    PREFLIGHTINVALIDALLOWCREDENTIALS = "PreflightInvalidAllowCredentials"
    PREFLIGHTMISSINGALLOWEXTERNAL = "PreflightMissingAllowExternal"
    PREFLIGHTINVALIDALLOWEXTERNAL = "PreflightInvalidAllowExternal"
    PREFLIGHTMISSINGALLOWPRIVATENETWORK = "PreflightMissingAllowPrivateNetwork"
    PREFLIGHTINVALIDALLOWPRIVATENETWORK = "PreflightInvalidAllowPrivateNetwork"
    INVALIDALLOWMETHODSPREFLIGHTRESPONSE = "InvalidAllowMethodsPreflightResponse"
    INVALIDALLOWHEADERSPREFLIGHTRESPONSE = "InvalidAllowHeadersPreflightResponse"
    METHODDISALLOWEDBYPREFLIGHTRESPONSE = "MethodDisallowedByPreflightResponse"
    HEADERDISALLOWEDBYPREFLIGHTRESPONSE = "HeaderDisallowedByPreflightResponse"
    REDIRECTCONTAINSCREDENTIALS = "RedirectContainsCredentials"
    INSECUREPRIVATENETWORK = "InsecurePrivateNetwork"
    INVALIDPRIVATENETWORKACCESS = "InvalidPrivateNetworkAccess"
    UNEXPECTEDPRIVATENETWORKACCESS = "UnexpectedPrivateNetworkAccess"
    NOCORSREDIRECTMODENOTFOLLOW = "NoCorsRedirectModeNotFollow"
    PREFLIGHTMISSINGPRIVATENETWORKACCESSID = "PreflightMissingPrivateNetworkAccessId"
    PREFLIGHTMISSINGPRIVATENETWORKACCESSNAME = "PreflightMissingPrivateNetworkAccessName"
    PRIVATENETWORKACCESSPERMISSIONUNAVAILABLE = "PrivateNetworkAccessPermissionUnavailable"
    PRIVATENETWORKACCESSPERMISSIONDENIED = "PrivateNetworkAccessPermissionDenied"
    LOCALNETWORKACCESSPERMISSIONDENIED = "LocalNetworkAccessPermissionDenied"


class NetworkCorsErrorStatus(CDPObject):

    corsError: Network.CorsError

    failedParameter: str


class NetworkServiceWorkerResponseSource(enum.StrEnum):
    """ Source of serviceworker response. """

    CACHE_STORAGE = "cache-storage"
    HTTP_CACHE = "http-cache"
    FALLBACK_CODE = "fallback-code"
    NETWORK = "network"


class NetworkTrustTokenParams(CDPObject):
    """ Determines what type of Trust Token operation is executed and
    depending on the type, some additional parameters. The values
    are specified in third_party/blink/renderer/core/fetch/trust_token.idl. """

    operation: Network.TrustTokenOperationType

    # Only set for "token-redemption" operation and determine whether to requesta fresh SRR or use a still valid cached SRR.
    refreshPolicy: Literal['UseCached', 'Refresh']

    # Origins of issuers from whom to request tokens or redemption records.
    issuers: list[str] | None = None


class NetworkTrustTokenOperationType(enum.StrEnum):

    ISSUANCE = "Issuance"
    REDEMPTION = "Redemption"
    SIGNING = "Signing"


class NetworkAlternateProtocolUsage(enum.StrEnum):
    """ The reason why Chrome uses a specific transport protocol for HTTP semantics. """

    ALTERNATIVEJOBWONWITHOUTRACE = "alternativeJobWonWithoutRace"
    ALTERNATIVEJOBWONRACE = "alternativeJobWonRace"
    MAINJOBWONRACE = "mainJobWonRace"
    MAPPINGMISSING = "mappingMissing"
    BROKEN = "broken"
    DNSALPNH3JOBWONWITHOUTRACE = "dnsAlpnH3JobWonWithoutRace"
    DNSALPNH3JOBWONRACE = "dnsAlpnH3JobWonRace"
    UNSPECIFIEDREASON = "unspecifiedReason"


class NetworkServiceWorkerRouterSource(enum.StrEnum):
    """ Source of service worker router. """

    NETWORK = "network"
    CACHE = "cache"
    FETCH_EVENT = "fetch-event"
    RACE_NETWORK_AND_FETCH_HANDLER = "race-network-and-fetch-handler"
    RACE_NETWORK_AND_CACHE = "race-network-and-cache"


class NetworkServiceWorkerRouterInfo(CDPObject):

    # ID of the rule matched. If there is a matched rule, this field will beset, otherwiser no value will be set.
    ruleIdMatched: int | None = None

    # The router source of the matched rule. If there is a matched rule, thisfield will be set, otherwise no value will be set.
    matchedSourceType: Network.ServiceWorkerRouterSource | None = None

    # The actual router source used.
    actualSourceType: Network.ServiceWorkerRouterSource | None = None


class NetworkResponse(CDPObject):
    """ HTTP response data. """

    # Response URL. This URL can be different from CachedResource.url in case ofredirect.
    url: str

    # HTTP response status code.
    status: int

    # HTTP response status text.
    statusText: str

    # HTTP response headers.
    headers: Network.Headers

    # HTTP response headers text. This has been replaced by the headers inNetwork.responseReceivedExtraInfo.
    headersText: str | None = None  # deprecated

    # Resource mimeType as determined by the browser.
    mimeType: str

    # Resource charset as determined by the browser (if applicable).
    charset: str

    # Refined HTTP request headers that were actually transmitted over thenetwork.
    requestHeaders: Network.Headers | None = None

    # HTTP request headers text. This has been replaced by the headers inNetwork.requestWillBeSentExtraInfo.
    requestHeadersText: str | None = None  # deprecated

    # Specifies whether physical connection was actually reused for thisrequest.
    connectionReused: bool

    # Physical connection id that was actually used for this request.
    connectionId: float

    # Remote IP address.
    remoteIPAddress: str | None = None

    # Remote port.
    remotePort: int | None = None

    # Specifies that the request was served from the disk cache.
    fromDiskCache: bool | None = None

    # Specifies that the request was served from the ServiceWorker.
    fromServiceWorker: bool | None = None

    # Specifies that the request was served from the prefetch cache.
    fromPrefetchCache: bool | None = None

    # Specifies that the request was served from the prefetch cache.
    fromEarlyHints: bool | None = None

    # Information about how ServiceWorker Static Router API was used. If thisfield is set with `matchedSourceType` field, a matching rule is found. If thisfield is set without `matchedSource`, no matching rule is found. Otherwise, theAPI is not used.
    serviceWorkerRouterInfo: Network.ServiceWorkerRouterInfo | None = None  # experimental

    # Total number of bytes received for this request so far.
    encodedDataLength: float

    # Timing information for the given request.
    timing: Network.ResourceTiming | None = None

    # Response source of response from ServiceWorker.
    serviceWorkerResponseSource: Network.ServiceWorkerResponseSource | None = None

    # The time at which the returned response was generated.
    responseTime: Network.TimeSinceEpoch | None = None

    # Cache Storage Cache Name.
    cacheStorageCacheName: str | None = None

    # Protocol used to fetch this request.
    protocol: str | None = None

    # The reason why Chrome uses a specific transport protocol for HTTPsemantics.
    alternateProtocolUsage: Network.AlternateProtocolUsage | None = None  # experimental

    # Security state of the request resource.
    securityState: Security.SecurityState

    # Security details for the request.
    securityDetails: Network.SecurityDetails | None = None


class NetworkWebSocketRequest(CDPObject):
    """ WebSocket request data. """

    # HTTP request headers.
    headers: Network.Headers


class NetworkWebSocketResponse(CDPObject):
    """ WebSocket response data. """

    # HTTP response status code.
    status: int

    # HTTP response status text.
    statusText: str

    # HTTP response headers.
    headers: Network.Headers

    # HTTP response headers text.
    headersText: str | None = None

    # HTTP request headers.
    requestHeaders: Network.Headers | None = None

    # HTTP request headers text.
    requestHeadersText: str | None = None


class NetworkWebSocketFrame(CDPObject):
    """ WebSocket message data. This represents an entire WebSocket message, not just a fragmented frame as the name suggests. """

    # WebSocket message opcode.
    opcode: float

    # WebSocket message mask.
    mask: bool

    # WebSocket message payload data. If the opcode is 1, this is a text messageand payloadData is a UTF-8 string. If the opcode isn't 1, then payloadData is abase64 encoded string representing binary data.
    payloadData: str


class NetworkCachedResource(CDPObject):
    """ Information about the cached resource. """

    # Resource URL. This is the url of the original network request.
    url: str

    # Type of this resource.
    type: Network.ResourceType

    # Cached response data.
    response: Network.Response | None = None

    # Cached response body size.
    bodySize: float


class NetworkInitiator(CDPObject):
    """ Information about the request initiator. """

    # Type of this initiator.
    type: Literal['parser', 'script', 'preload', 'SignedExchange', 'preflight', 'FedCM', 'other']

    # Initiator JavaScript stack trace, set for Script only. Requires theDebugger domain to be enabled.
    stack: Runtime.StackTrace | None = None

    # Initiator URL, set for Parser type or for Script type (when script isimporting module) or for SignedExchange type.
    url: str | None = None

    # Initiator line number, set for Parser type or for Script type (when scriptis importing module) (0-based).
    lineNumber: float | None = None

    # Initiator column number, set for Parser type or for Script type (whenscript is importing module) (0-based).
    columnNumber: float | None = None

    # Set if another request triggered this request (e.g. preflight).
    requestId: Network.RequestId | None = None


class NetworkCookiePartitionKey(CDPObject):
    """ cookiePartitionKey object
    The representation of the components of the key that are created by the cookiePartitionKey class contained in net/cookies/cookie_partition_key.h. """

    # The site of the top-level URL the browser was visiting at the start of therequest to the endpoint that set the cookie.
    topLevelSite: str

    # Indicates if the cookie has any ancestors that are cross-site to thetopLevelSite.
    hasCrossSiteAncestor: bool


class NetworkCookie(CDPObject):
    """ Cookie object """

    # Cookie name.
    name: str

    # Cookie value.
    value: str

    # Cookie domain.
    domain: str

    # Cookie path.
    path: str

    # Cookie expiration date as the number of seconds since the UNIX epoch. Thevalue is set to -1 if the expiry date is not set. The value can be null forvalues that cannot be represented in JSON (±Inf).
    expires: float

    # Cookie size.
    size: int

    # True if cookie is http-only.
    httpOnly: bool

    # True if cookie is secure.
    secure: bool

    # True in case of session cookie.
    session: bool

    # Cookie SameSite type.
    sameSite: Network.CookieSameSite | None = None

    # Cookie Priority
    priority: Network.CookiePriority | None = None  # experimental

    # True if cookie is SameParty.
    sameParty: bool | None = None  # experimental deprecated

    # Cookie source scheme type.
    sourceScheme: Network.CookieSourceScheme | None = None  # experimental

    # Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates anunspecified port. An unspecified port value allows protocol clients to emulatelegacy cookie scope for the port. This is a temporary ability and it will beremoved in the future.
    sourcePort: int | None = None  # experimental

    # Cookie partition key.
    partitionKey: Network.CookiePartitionKey | None = None  # experimental

    # True if cookie partition key is opaque.
    partitionKeyOpaque: bool | None = None  # experimental


class NetworkSetCookieBlockedReason(enum.StrEnum):
    """ Types of reasons why a cookie may not be stored from a response. """

    SECUREONLY = "SecureOnly"
    SAMESITESTRICT = "SameSiteStrict"
    SAMESITELAX = "SameSiteLax"
    SAMESITEUNSPECIFIEDTREATEDASLAX = "SameSiteUnspecifiedTreatedAsLax"
    SAMESITENONEINSECURE = "SameSiteNoneInsecure"
    USERPREFERENCES = "UserPreferences"
    THIRDPARTYPHASEOUT = "ThirdPartyPhaseout"
    THIRDPARTYBLOCKEDINFIRSTPARTYSET = "ThirdPartyBlockedInFirstPartySet"
    SYNTAXERROR_ = "SyntaxError"
    SCHEMENOTSUPPORTED = "SchemeNotSupported"
    OVERWRITESECURE = "OverwriteSecure"
    INVALIDDOMAIN = "InvalidDomain"
    INVALIDPREFIX = "InvalidPrefix"
    UNKNOWNERROR = "UnknownError"
    SCHEMEFULSAMESITESTRICT = "SchemefulSameSiteStrict"
    SCHEMEFULSAMESITELAX = "SchemefulSameSiteLax"
    SCHEMEFULSAMESITEUNSPECIFIEDTREATEDASLAX = "SchemefulSameSiteUnspecifiedTreatedAsLax"
    SAMEPARTYFROMCROSSPARTYCONTEXT = "SamePartyFromCrossPartyContext"
    SAMEPARTYCONFLICTSWITHOTHERATTRIBUTES = "SamePartyConflictsWithOtherAttributes"
    NAMEVALUEPAIREXCEEDSMAXSIZE = "NameValuePairExceedsMaxSize"
    DISALLOWEDCHARACTER = "DisallowedCharacter"
    NOCOOKIECONTENT = "NoCookieContent"


class NetworkCookieBlockedReason(enum.StrEnum):
    """ Types of reasons why a cookie may not be sent with a request. """

    SECUREONLY = "SecureOnly"
    NOTONPATH = "NotOnPath"
    DOMAINMISMATCH = "DomainMismatch"
    SAMESITESTRICT = "SameSiteStrict"
    SAMESITELAX = "SameSiteLax"
    SAMESITEUNSPECIFIEDTREATEDASLAX = "SameSiteUnspecifiedTreatedAsLax"
    SAMESITENONEINSECURE = "SameSiteNoneInsecure"
    USERPREFERENCES = "UserPreferences"
    THIRDPARTYPHASEOUT = "ThirdPartyPhaseout"
    THIRDPARTYBLOCKEDINFIRSTPARTYSET = "ThirdPartyBlockedInFirstPartySet"
    UNKNOWNERROR = "UnknownError"
    SCHEMEFULSAMESITESTRICT = "SchemefulSameSiteStrict"
    SCHEMEFULSAMESITELAX = "SchemefulSameSiteLax"
    SCHEMEFULSAMESITEUNSPECIFIEDTREATEDASLAX = "SchemefulSameSiteUnspecifiedTreatedAsLax"
    SAMEPARTYFROMCROSSPARTYCONTEXT = "SamePartyFromCrossPartyContext"
    NAMEVALUEPAIREXCEEDSMAXSIZE = "NameValuePairExceedsMaxSize"
    PORTMISMATCH = "PortMismatch"
    SCHEMEMISMATCH = "SchemeMismatch"
    ANONYMOUSCONTEXT = "AnonymousContext"


class NetworkCookieExemptionReason(enum.StrEnum):
    """ Types of reasons why a cookie should have been blocked by 3PCD but is exempted for the request. """

    NONE_ = "None"
    USERSETTING = "UserSetting"
    TPCDMETADATA = "TPCDMetadata"
    TPCDDEPRECATIONTRIAL = "TPCDDeprecationTrial"
    TOPLEVELTPCDDEPRECATIONTRIAL = "TopLevelTPCDDeprecationTrial"
    TPCDHEURISTICS = "TPCDHeuristics"
    ENTERPRISEPOLICY = "EnterprisePolicy"
    STORAGEACCESS = "StorageAccess"
    TOPLEVELSTORAGEACCESS = "TopLevelStorageAccess"
    SCHEME = "Scheme"
    SAMESITENONECOOKIESINSANDBOX = "SameSiteNoneCookiesInSandbox"


class NetworkBlockedSetCookieWithReason(CDPObject):
    """ A cookie which was not stored from a response with the corresponding reason. """

    # The reason(s) this cookie was blocked.
    blockedReasons: list[Network.SetCookieBlockedReason]

    # The string representing this individual cookie as it would appear in theheader. This is not the entire "cookie" or "set-cookie" header which could havemultiple cookies.
    cookieLine: str

    # The cookie object which represents the cookie which was not stored. It isoptional because sometimes complete cookie information is not available, such asin the case of parsing errors.
    cookie: Network.Cookie | None = None


class NetworkExemptedSetCookieWithReason(CDPObject):
    """ A cookie should have been blocked by 3PCD but is exempted and stored from a response with the
    corresponding reason. A cookie could only have at most one exemption reason. """

    # The reason the cookie was exempted.
    exemptionReason: Network.CookieExemptionReason

    # The string representing this individual cookie as it would appear in theheader.
    cookieLine: str

    # The cookie object representing the cookie.
    cookie: Network.Cookie


class NetworkAssociatedCookie(CDPObject):
    """ A cookie associated with the request which may or may not be sent with it.
    Includes the cookies itself and reasons for blocking or exemption. """

    # The cookie object representing the cookie which was not sent.
    cookie: Network.Cookie

    # The reason(s) the cookie was blocked. If empty means the cookie isincluded.
    blockedReasons: list[Network.CookieBlockedReason]

    # The reason the cookie should have been blocked by 3PCD but is exempted. Acookie could only have at most one exemption reason.
    exemptionReason: Network.CookieExemptionReason | None = None


class NetworkCookieParam(CDPObject):
    """ Cookie parameter object """

    # Cookie name.
    name: str

    # Cookie value.
    value: str

    # The request-URI to associate with the setting of the cookie. This valuecan affect the default domain, path, source port, and source scheme values ofthe created cookie.
    url: str | None = None

    # Cookie domain.
    domain: str | None = None

    # Cookie path.
    path: str | None = None

    # True if cookie is secure.
    secure: bool | None = None

    # True if cookie is http-only.
    httpOnly: bool | None = None

    # Cookie SameSite type.
    sameSite: Network.CookieSameSite | None = None

    # Cookie expiration date, session cookie if not set
    expires: Network.TimeSinceEpoch | None = None

    # Cookie Priority.
    priority: Network.CookiePriority | None = None  # experimental

    # True if cookie is SameParty.
    sameParty: bool | None = None  # experimental

    # Cookie source scheme type.
    sourceScheme: Network.CookieSourceScheme | None = None  # experimental

    # Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates anunspecified port. An unspecified port value allows protocol clients to emulatelegacy cookie scope for the port. This is a temporary ability and it will beremoved in the future.
    sourcePort: int | None = None  # experimental

    # Cookie partition key. If not set, the cookie will be set as notpartitioned.
    partitionKey: Network.CookiePartitionKey | None = None  # experimental


class NetworkAuthChallenge(CDPObject):
    """ Authorization challenge for HTTP status code 401 or 407. """

    # Source of the authentication challenge.
    source: Literal['Server', 'Proxy'] | None = None

    # Origin of the challenger.
    origin: str

    # The authentication scheme used, such as basic or digest
    scheme: str

    # The realm of the challenge. May be empty.
    realm: str


class NetworkAuthChallengeResponse(CDPObject):
    """ Response to an AuthChallenge. """

    # The decision on what to do in response to the authorization challenge.Default means deferring to the default behavior of the net stack, which willlikely either the Cancel authentication or display a popup dialog box.
    response: Literal['Default', 'CancelAuth', 'ProvideCredentials']

    # The username to provide, possibly empty. Should only be set if response isProvideCredentials.
    username: str | None = None

    # The password to provide, possibly empty. Should only be set if response isProvideCredentials.
    password: str | None = None


class NetworkInterceptionStage(enum.StrEnum):
    """ Stages of the interception to begin intercepting. Request will intercept before the request is
    sent. Response will intercept after the response is received. """

    REQUEST = "Request"
    HEADERSRECEIVED = "HeadersReceived"


class NetworkRequestPattern(CDPObject):
    """ Request pattern for interception. """

    # Wildcards (`'*'` -> zero or more, `'?'` -> exactly one) are allowed.Escape character is backslash. Omitting is equivalent to `"*"`.
    urlPattern: str | None = None

    # If set, only requests for matching resource types will be intercepted.
    resourceType: Network.ResourceType | None = None

    # Stage at which to begin intercepting requests. Default is Request.
    interceptionStage: Network.InterceptionStage | None = None


class NetworkSignedExchangeSignature(CDPObject):
    """ Information about a signed exchange signature.
    https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#rfc.section.3.1 """

    # Signed exchange signature label.
    label: str

    # The hex string of signed exchange signature.
    signature: str

    # Signed exchange signature integrity.
    integrity: str

    # Signed exchange signature cert Url.
    certUrl: str | None = None

    # The hex string of signed exchange signature cert sha256.
    certSha256: str | None = None

    # Signed exchange signature validity Url.
    validityUrl: str

    # Signed exchange signature date.
    date: int

    # Signed exchange signature expires.
    expires: int

    # The encoded certificates.
    certificates: list[str] | None = None


class NetworkSignedExchangeHeader(CDPObject):
    """ Information about a signed exchange header.
    https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#cbor-representation """

    # Signed exchange request URL.
    requestUrl: str

    # Signed exchange response code.
    responseCode: int

    # Signed exchange response headers.
    responseHeaders: Network.Headers

    # Signed exchange response signature.
    signatures: list[Network.SignedExchangeSignature]

    # Signed exchange header integrity hash in the form of `sha256-<base64-hash-value>`.
    headerIntegrity: str


class NetworkSignedExchangeErrorField(enum.StrEnum):
    """ Field type for a signed exchange related error. """

    SIGNATURESIG = "signatureSig"
    SIGNATUREINTEGRITY = "signatureIntegrity"
    SIGNATURECERTURL = "signatureCertUrl"
    SIGNATURECERTSHA256 = "signatureCertSha256"
    SIGNATUREVALIDITYURL = "signatureValidityUrl"
    SIGNATURETIMESTAMPS = "signatureTimestamps"


class NetworkSignedExchangeError(CDPObject):
    """ Information about a signed exchange response. """

    # Error message.
    message: str

    # The index of the signature which caused the error.
    signatureIndex: int | None = None

    # The field which caused the error.
    errorField: Network.SignedExchangeErrorField | None = None


class NetworkSignedExchangeInfo(CDPObject):
    """ Information about a signed exchange response. """

    # The outer response of signed HTTP exchange which was received fromnetwork.
    outerResponse: Network.Response

    # Whether network response for the signed exchange was accompanied by extraheaders.
    hasExtraInfo: bool

    # Information about the signed exchange header.
    header: Network.SignedExchangeHeader | None = None

    # Security details for the signed exchange header.
    securityDetails: Network.SecurityDetails | None = None

    # Errors occurred while handling the signed exchange.
    errors: list[Network.SignedExchangeError] | None = None


class NetworkContentEncoding(enum.StrEnum):
    """ List of content encodings supported by the backend. """

    DEFLATE = "deflate"
    GZIP = "gzip"
    BR = "br"
    ZSTD = "zstd"


class NetworkNetworkConditions(CDPObject):

    # Only matching requests will be affected by these conditions. Patterns usethe URLPattern constructor string syntax (https://urlpattern.spec.whatwg.org/)and must be absolute. If the pattern is empty, all requests are matched(including p2p connections).
    urlPattern: str

    # Minimum latency from request sent to response headers received (ms).
    latency: float

    # Maximal aggregated download throughput (bytes/sec). -1 disables downloadthrottling.
    downloadThroughput: float

    # Maximal aggregated upload throughput (bytes/sec).  -1 disables uploadthrottling.
    uploadThroughput: float

    # Connection type if known.
    connectionType: Network.ConnectionType | None = None

    # WebRTC packet loss (percent, 0-100). 0 disables packet loss emulation, 100drops all the packets.
    packetLoss: float | None = None

    # WebRTC packet queue length (packet). 0 removes any queue lengthlimitations.
    packetQueueLength: int | None = None

    # WebRTC packetReordering feature.
    packetReordering: bool | None = None


class NetworkBlockPattern(CDPObject):

    # URL pattern to match. Patterns use the URLPattern constructor stringsyntax (https://urlpattern.spec.whatwg.org/) and must be absolute. Example:`*://*:*/*.css`.
    urlPattern: str

    # Whether or not to block the pattern. If false, a matching request will notbe blocked even if it matches a later `BlockPattern`.
    block: bool


class NetworkDirectSocketDnsQueryType(enum.StrEnum):

    IPV4 = "ipv4"
    IPV6 = "ipv6"


class NetworkDirectTCPSocketOptions(CDPObject):

    # TCP_NODELAY option
    noDelay: bool

    # Expected to be unsigned integer.
    keepAliveDelay: float | None = None

    # Expected to be unsigned integer.
    sendBufferSize: float | None = None

    # Expected to be unsigned integer.
    receiveBufferSize: float | None = None

    dnsQueryType: Network.DirectSocketDnsQueryType | None = None


class NetworkDirectUDPSocketOptions(CDPObject):

    remoteAddr: str | None = None

    # Unsigned int 16.
    remotePort: int | None = None

    localAddr: str | None = None

    # Unsigned int 16.
    localPort: int | None = None

    dnsQueryType: Network.DirectSocketDnsQueryType | None = None

    # Expected to be unsigned integer.
    sendBufferSize: float | None = None

    # Expected to be unsigned integer.
    receiveBufferSize: float | None = None

    multicastLoopback: bool | None = None

    # Unsigned int 8.
    multicastTimeToLive: int | None = None

    multicastAllowAddressSharing: bool | None = None


class NetworkDirectUDPMessage(CDPObject):

    data: str

    # Null for connected mode.
    remoteAddr: str | None = None

    # Null for connected mode. Expected to be unsigned integer.
    remotePort: int | None = None


class NetworkPrivateNetworkRequestPolicy(enum.StrEnum):

    ALLOW = "Allow"
    BLOCKFROMINSECURETOMOREPRIVATE = "BlockFromInsecureToMorePrivate"
    WARNFROMINSECURETOMOREPRIVATE = "WarnFromInsecureToMorePrivate"
    PERMISSIONBLOCK = "PermissionBlock"
    PERMISSIONWARN = "PermissionWarn"


class NetworkIPAddressSpace(enum.StrEnum):

    LOOPBACK = "Loopback"
    LOCAL = "Local"
    PUBLIC = "Public"
    UNKNOWN = "Unknown"


class NetworkConnectTiming(CDPObject):

    # Timing's requestTime is a baseline in seconds, while the other numbers areticks in milliseconds relatively to this requestTime. Matches ResourceTiming'srequestTime for the same request (but not for redirected requests).
    requestTime: float


class NetworkClientSecurityState(CDPObject):

    initiatorIsSecureContext: bool

    initiatorIPAddressSpace: Network.IPAddressSpace

    privateNetworkRequestPolicy: Network.PrivateNetworkRequestPolicy


class NetworkCrossOriginOpenerPolicyValue(enum.StrEnum):

    SAMEORIGIN = "SameOrigin"
    SAMEORIGINALLOWPOPUPS = "SameOriginAllowPopups"
    RESTRICTPROPERTIES = "RestrictProperties"
    UNSAFENONE = "UnsafeNone"
    SAMEORIGINPLUSCOEP = "SameOriginPlusCoep"
    RESTRICTPROPERTIESPLUSCOEP = "RestrictPropertiesPlusCoep"
    NOOPENERALLOWPOPUPS = "NoopenerAllowPopups"


class NetworkCrossOriginOpenerPolicyStatus(CDPObject):

    value: Network.CrossOriginOpenerPolicyValue

    reportOnlyValue: Network.CrossOriginOpenerPolicyValue

    reportingEndpoint: str | None = None

    reportOnlyReportingEndpoint: str | None = None


class NetworkCrossOriginEmbedderPolicyValue(enum.StrEnum):

    NONE_ = "None"
    CREDENTIALLESS = "Credentialless"
    REQUIRECORP = "RequireCorp"


class NetworkCrossOriginEmbedderPolicyStatus(CDPObject):

    value: Network.CrossOriginEmbedderPolicyValue

    reportOnlyValue: Network.CrossOriginEmbedderPolicyValue

    reportingEndpoint: str | None = None

    reportOnlyReportingEndpoint: str | None = None


class NetworkContentSecurityPolicySource(enum.StrEnum):

    HTTP = "HTTP"
    META = "Meta"


class NetworkContentSecurityPolicyStatus(CDPObject):

    effectiveDirectives: str

    isEnforced: bool

    source: Network.ContentSecurityPolicySource


class NetworkSecurityIsolationStatus(CDPObject):

    coop: Network.CrossOriginOpenerPolicyStatus | None = None

    coep: Network.CrossOriginEmbedderPolicyStatus | None = None

    csp: list[Network.ContentSecurityPolicyStatus] | None = None


class NetworkReportStatus(enum.StrEnum):
    """ The status of a Reporting API report. """

    QUEUED = "Queued"
    PENDING = "Pending"
    MARKEDFORREMOVAL = "MarkedForRemoval"
    SUCCESS = "Success"


NetworkReportId = str


class NetworkReportingApiReport(CDPObject):
    """ An object representing a report generated by the Reporting API. """

    id: Network.ReportId

    # The URL of the document that triggered the report.
    initiatorUrl: str

    # The name of the endpoint group that should be used to deliver the report.
    destination: str

    # The type of the report (specifies the set of data that is contained in thereport body).
    type: str

    # When the report was generated.
    timestamp: Network.TimeSinceEpoch

    # How many uploads deep the related request was.
    depth: int

    # The number of delivery attempts made so far, not including an activeattempt.
    completedAttempts: int

    body: JSON_DICT

    status: Network.ReportStatus


class NetworkReportingApiEndpoint(CDPObject):

    # The URL of the endpoint to which reports may be delivered.
    url: str

    # Name of the endpoint group.
    groupName: str


class NetworkLoadNetworkResourcePageResult(CDPObject):
    """ An object providing the result of a network resource load. """

    success: bool

    # Optional values used for error reporting.
    netError: float | None = None

    netErrorName: str | None = None

    httpStatusCode: float | None = None

    # If successful, one of the following two fields holds the result.
    stream: IO.StreamHandle | None = None

    # Response headers.
    headers: Network.Headers | None = None


class NetworkLoadNetworkResourceOptions(CDPObject):
    """ An options object that may be extended later to better support CORS,
    CORB and streaming. """

    disableCache: bool

    includeCredentials: bool


class OverlaySourceOrderConfig(CDPObject):
    """ Configuration data for drawing the source order of an elements children. """

    # the color to outline the given element in.
    parentOutlineColor: DOM.RGBA

    # the color to outline the child elements in.
    childOutlineColor: DOM.RGBA


class OverlayGridHighlightConfig(CDPObject):
    """ Configuration data for the highlighting of Grid elements. """

    # Whether the extension lines from grid cells to the rulers should be shown(default: false).
    showGridExtensionLines: bool | None = None

    # Show Positive line number labels (default: false).
    showPositiveLineNumbers: bool | None = None

    # Show Negative line number labels (default: false).
    showNegativeLineNumbers: bool | None = None

    # Show area name labels (default: false).
    showAreaNames: bool | None = None

    # Show line name labels (default: false).
    showLineNames: bool | None = None

    # Show track size labels (default: false).
    showTrackSizes: bool | None = None

    # The grid container border highlight color (default: transparent).
    gridBorderColor: DOM.RGBA | None = None

    # The cell border color (default: transparent). Deprecated, please userowLineColor and columnLineColor instead.
    cellBorderColor: DOM.RGBA | None = None  # deprecated

    # The row line color (default: transparent).
    rowLineColor: DOM.RGBA | None = None

    # The column line color (default: transparent).
    columnLineColor: DOM.RGBA | None = None

    # Whether the grid border is dashed (default: false).
    gridBorderDash: bool | None = None

    # Whether the cell border is dashed (default: false). Deprecated, please usrowLineDash and columnLineDash instead.
    cellBorderDash: bool | None = None  # deprecated

    # Whether row lines are dashed (default: false).
    rowLineDash: bool | None = None

    # Whether column lines are dashed (default: false).
    columnLineDash: bool | None = None

    # The row gap highlight fill color (default: transparent).
    rowGapColor: DOM.RGBA | None = None

    # The row gap hatching fill color (default: transparent).
    rowHatchColor: DOM.RGBA | None = None

    # The column gap highlight fill color (default: transparent).
    columnGapColor: DOM.RGBA | None = None

    # The column gap hatching fill color (default: transparent).
    columnHatchColor: DOM.RGBA | None = None

    # The named grid areas border color (Default: transparent).
    areaBorderColor: DOM.RGBA | None = None

    # The grid container background color (Default: transparent).
    gridBackgroundColor: DOM.RGBA | None = None


class OverlayFlexContainerHighlightConfig(CDPObject):
    """ Configuration data for the highlighting of Flex container elements. """

    # The style of the container border
    containerBorder: Overlay.LineStyle | None = None

    # The style of the separator between lines
    lineSeparator: Overlay.LineStyle | None = None

    # The style of the separator between items
    itemSeparator: Overlay.LineStyle | None = None

    # Style of content-distribution space on the main axis (justify-content).
    mainDistributedSpace: Overlay.BoxStyle | None = None

    # Style of content-distribution space on the cross axis (align-content).
    crossDistributedSpace: Overlay.BoxStyle | None = None

    # Style of empty space caused by row gaps (gap/row-gap).
    rowGapSpace: Overlay.BoxStyle | None = None

    # Style of empty space caused by columns gaps (gap/column-gap).
    columnGapSpace: Overlay.BoxStyle | None = None

    # Style of the self-alignment line (align-items).
    crossAlignment: Overlay.LineStyle | None = None


class OverlayFlexItemHighlightConfig(CDPObject):
    """ Configuration data for the highlighting of Flex item elements. """

    # Style of the box representing the item's base size
    baseSizeBox: Overlay.BoxStyle | None = None

    # Style of the border around the box representing the item's base size
    baseSizeBorder: Overlay.LineStyle | None = None

    # Style of the arrow representing if the item grew or shrank
    flexibilityArrow: Overlay.LineStyle | None = None


class OverlayLineStyle(CDPObject):
    """ Style information for drawing a line. """

    # The color of the line (default: transparent)
    color: DOM.RGBA | None = None

    # The line pattern (default: solid)
    pattern: Literal['dashed', 'dotted'] | None = None


class OverlayBoxStyle(CDPObject):
    """ Style information for drawing a box. """

    # The background color for the box (default: transparent)
    fillColor: DOM.RGBA | None = None

    # The hatching color for the box (default: transparent)
    hatchColor: DOM.RGBA | None = None


class OverlayContrastAlgorithm(enum.StrEnum):

    AA = "aa"
    AAA = "aaa"
    APCA = "apca"


class OverlayHighlightConfig(CDPObject):
    """ Configuration data for the highlighting of page elements. """

    # Whether the node info tooltip should be shown (default: false).
    showInfo: bool | None = None

    # Whether the node styles in the tooltip (default: false).
    showStyles: bool | None = None

    # Whether the rulers should be shown (default: false).
    showRulers: bool | None = None

    # Whether the a11y info should be shown (default: true).
    showAccessibilityInfo: bool | None = None

    # Whether the extension lines from node to the rulers should be shown(default: false).
    showExtensionLines: bool | None = None

    # The content box highlight fill color (default: transparent).
    contentColor: DOM.RGBA | None = None

    # The padding highlight fill color (default: transparent).
    paddingColor: DOM.RGBA | None = None

    # The border highlight fill color (default: transparent).
    borderColor: DOM.RGBA | None = None

    # The margin highlight fill color (default: transparent).
    marginColor: DOM.RGBA | None = None

    # The event target element highlight fill color (default: transparent).
    eventTargetColor: DOM.RGBA | None = None

    # The shape outside fill color (default: transparent).
    shapeColor: DOM.RGBA | None = None

    # The shape margin fill color (default: transparent).
    shapeMarginColor: DOM.RGBA | None = None

    # The grid layout color (default: transparent).
    cssGridColor: DOM.RGBA | None = None

    # The color format used to format color styles (default: hex).
    colorFormat: Overlay.ColorFormat | None = None

    # The grid layout highlight configuration (default: all transparent).
    gridHighlightConfig: Overlay.GridHighlightConfig | None = None

    # The flex container highlight configuration (default: all transparent).
    flexContainerHighlightConfig: Overlay.FlexContainerHighlightConfig | None = None

    # The flex item highlight configuration (default: all transparent).
    flexItemHighlightConfig: Overlay.FlexItemHighlightConfig | None = None

    # The contrast algorithm to use for the contrast ratio (default: aa).
    contrastAlgorithm: Overlay.ContrastAlgorithm | None = None

    # The container query container highlight configuration (default: alltransparent).
    containerQueryContainerHighlightConfig: Overlay.ContainerQueryContainerHighlightConfig | None = None


class OverlayColorFormat(enum.StrEnum):

    RGB = "rgb"
    HSL = "hsl"
    HWB = "hwb"
    HEX_ = "hex"


class OverlayGridNodeHighlightConfig(CDPObject):
    """ Configurations for Persistent Grid Highlight """

    # A descriptor for the highlight appearance.
    gridHighlightConfig: Overlay.GridHighlightConfig

    # Identifier of the node to highlight.
    nodeId: DOM.NodeId


class OverlayFlexNodeHighlightConfig(CDPObject):

    # A descriptor for the highlight appearance of flex containers.
    flexContainerHighlightConfig: Overlay.FlexContainerHighlightConfig

    # Identifier of the node to highlight.
    nodeId: DOM.NodeId


class OverlayScrollSnapContainerHighlightConfig(CDPObject):

    # The style of the snapport border (default: transparent)
    snapportBorder: Overlay.LineStyle | None = None

    # The style of the snap area border (default: transparent)
    snapAreaBorder: Overlay.LineStyle | None = None

    # The margin highlight fill color (default: transparent).
    scrollMarginColor: DOM.RGBA | None = None

    # The padding highlight fill color (default: transparent).
    scrollPaddingColor: DOM.RGBA | None = None


class OverlayScrollSnapHighlightConfig(CDPObject):

    # A descriptor for the highlight appearance of scroll snap containers.
    scrollSnapContainerHighlightConfig: Overlay.ScrollSnapContainerHighlightConfig

    # Identifier of the node to highlight.
    nodeId: DOM.NodeId


class OverlayHingeConfig(CDPObject):
    """ Configuration for dual screen hinge """

    # A rectangle represent hinge
    rect: DOM.Rect

    # The content box highlight fill color (default: a dark color).
    contentColor: DOM.RGBA | None = None

    # The content box highlight outline color (default: transparent).
    outlineColor: DOM.RGBA | None = None


class OverlayWindowControlsOverlayConfig(CDPObject):
    """ Configuration for Window Controls Overlay """

    # Whether the title bar CSS should be shown when emulating the WindowControls Overlay.
    showCSS: bool

    # Selected platforms to show the overlay.
    selectedPlatform: str

    # The theme color defined in app manifest.
    themeColor: str


class OverlayContainerQueryHighlightConfig(CDPObject):

    # A descriptor for the highlight appearance of container query containers.
    containerQueryContainerHighlightConfig: Overlay.ContainerQueryContainerHighlightConfig

    # Identifier of the container node to highlight.
    nodeId: DOM.NodeId


class OverlayContainerQueryContainerHighlightConfig(CDPObject):

    # The style of the container border.
    containerBorder: Overlay.LineStyle | None = None

    # The style of the descendants' borders.
    descendantBorder: Overlay.LineStyle | None = None


class OverlayIsolatedElementHighlightConfig(CDPObject):

    # A descriptor for the highlight appearance of an element in isolation mode.
    isolationModeHighlightConfig: Overlay.IsolationModeHighlightConfig

    # Identifier of the isolated element to highlight.
    nodeId: DOM.NodeId


class OverlayIsolationModeHighlightConfig(CDPObject):

    # The fill color of the resizers (default: transparent).
    resizerColor: DOM.RGBA | None = None

    # The fill color for resizer handles (default: transparent).
    resizerHandleColor: DOM.RGBA | None = None

    # The fill color for the mask covering non-isolated elements (default:transparent).
    maskColor: DOM.RGBA | None = None


class OverlayInspectMode(enum.StrEnum):

    SEARCHFORNODE = "searchForNode"
    SEARCHFORUASHADOWDOM = "searchForUAShadowDOM"
    CAPTUREAREASCREENSHOT = "captureAreaScreenshot"
    NONE = "none"


class PWAFileHandlerAccept(CDPObject):
    """ The following types are the replica of
    https://crsrc.org/c/chrome/browser/web_applications/proto/web_app_os_integration_state.proto;drc=9910d3be894c8f142c977ba1023f30a656bc13fc;l=67 """

    # New name of the mimetype according tohttps://www.iana.org/assignments/media-types/media-types.xhtml
    mediaType: str

    fileExtensions: list[str]


class PWAFileHandler(CDPObject):

    action: str

    accepts: list[PWA.FileHandlerAccept]

    displayName: str


class PWADisplayMode(enum.StrEnum):
    """ If user prefers opening the app in browser or an app window. """

    STANDALONE = "standalone"
    BROWSER = "browser"


""" Unique frame identifier. """

PageFrameId = str


class PageAdFrameType(enum.StrEnum):
    """ Indicates whether a frame has been identified as an ad. """

    NONE = "none"
    CHILD = "child"
    ROOT = "root"


class PageAdFrameExplanation(enum.StrEnum):

    PARENTISAD = "ParentIsAd"
    CREATEDBYADSCRIPT = "CreatedByAdScript"
    MATCHEDBLOCKINGRULE = "MatchedBlockingRule"


class PageAdFrameStatus(CDPObject):
    """ Indicates whether a frame has been identified as an ad and why. """

    adFrameType: Page.AdFrameType

    explanations: list[Page.AdFrameExplanation] | None = None


class PageAdScriptId(CDPObject):
    """ Identifies the script which caused a script or frame to be labelled as an
    ad. """

    # Script Id of the script which caused a script or frame to be labelled asan ad.
    scriptId: Runtime.ScriptId

    # Id of scriptId's debugger.
    debuggerId: Runtime.UniqueDebuggerId


class PageAdScriptAncestry(CDPObject):
    """ Encapsulates the script ancestry and the root script filterlist rule that
    caused the frame to be labelled as an ad. Only created when `ancestryChain`
    is not empty. """

    # A chain of `AdScriptId`s representing the ancestry of an ad script thatled to the creation of a frame. The chain is ordered from the script itself(lower level) up to its root ancestor that was flagged by filterlist.
    ancestryChain: list[Page.AdScriptId]

    # The filterlist rule that caused the root (last) script in `ancestryChain`to be ad-tagged. Only populated if the rule is available.
    rootScriptFilterlistRule: str | None = None


class PageSecureContextType(enum.StrEnum):
    """ Indicates whether the frame is a secure context and why it is the case. """

    SECURE = "Secure"
    SECURELOCALHOST = "SecureLocalhost"
    INSECURESCHEME = "InsecureScheme"
    INSECUREANCESTOR = "InsecureAncestor"


class PageCrossOriginIsolatedContextType(enum.StrEnum):
    """ Indicates whether the frame is cross-origin isolated and why it is the case. """

    ISOLATED = "Isolated"
    NOTISOLATED = "NotIsolated"
    NOTISOLATEDFEATUREDISABLED = "NotIsolatedFeatureDisabled"


class PageGatedAPIFeatures(enum.StrEnum):

    SHAREDARRAYBUFFERS = "SharedArrayBuffers"
    SHAREDARRAYBUFFERSTRANSFERALLOWED = "SharedArrayBuffersTransferAllowed"
    PERFORMANCEMEASUREMEMORY = "PerformanceMeasureMemory"
    PERFORMANCEPROFILE = "PerformanceProfile"


class PagePermissionsPolicyFeature(enum.StrEnum):
    """ All Permissions Policy features. This enum should match the one defined
    in services/network/public/cpp/permissions_policy/permissions_policy_features.json5.
    LINT.IfChange(PermissionsPolicyFeature) """

    ACCELEROMETER = "accelerometer"
    ALL_SCREENS_CAPTURE = "all-screens-capture"
    AMBIENT_LIGHT_SENSOR = "ambient-light-sensor"
    ARIA_NOTIFY = "aria-notify"
    ATTRIBUTION_REPORTING = "attribution-reporting"
    AUTOFILL = "autofill"
    AUTOPLAY = "autoplay"
    BLUETOOTH = "bluetooth"
    BROWSING_TOPICS = "browsing-topics"
    CAMERA = "camera"
    CAPTURED_SURFACE_CONTROL = "captured-surface-control"
    CH_DPR = "ch-dpr"
    CH_DEVICE_MEMORY = "ch-device-memory"
    CH_DOWNLINK = "ch-downlink"
    CH_ECT = "ch-ect"
    CH_PREFERS_COLOR_SCHEME = "ch-prefers-color-scheme"
    CH_PREFERS_REDUCED_MOTION = "ch-prefers-reduced-motion"
    CH_PREFERS_REDUCED_TRANSPARENCY = "ch-prefers-reduced-transparency"
    CH_RTT = "ch-rtt"
    CH_SAVE_DATA = "ch-save-data"
    CH_UA = "ch-ua"
    CH_UA_ARCH = "ch-ua-arch"
    CH_UA_BITNESS = "ch-ua-bitness"
    CH_UA_HIGH_ENTROPY_VALUES = "ch-ua-high-entropy-values"
    CH_UA_PLATFORM = "ch-ua-platform"
    CH_UA_MODEL = "ch-ua-model"
    CH_UA_MOBILE = "ch-ua-mobile"
    CH_UA_FORM_FACTORS = "ch-ua-form-factors"
    CH_UA_FULL_VERSION = "ch-ua-full-version"
    CH_UA_FULL_VERSION_LIST = "ch-ua-full-version-list"
    CH_UA_PLATFORM_VERSION = "ch-ua-platform-version"
    CH_UA_WOW64 = "ch-ua-wow64"
    CH_VIEWPORT_HEIGHT = "ch-viewport-height"
    CH_VIEWPORT_WIDTH = "ch-viewport-width"
    CH_WIDTH = "ch-width"
    CLIPBOARD_READ = "clipboard-read"
    CLIPBOARD_WRITE = "clipboard-write"
    COMPUTE_PRESSURE = "compute-pressure"
    CONTROLLED_FRAME = "controlled-frame"
    CROSS_ORIGIN_ISOLATED = "cross-origin-isolated"
    DEFERRED_FETCH = "deferred-fetch"
    DEFERRED_FETCH_MINIMAL = "deferred-fetch-minimal"
    DEVICE_ATTRIBUTES = "device-attributes"
    DIGITAL_CREDENTIALS_CREATE = "digital-credentials-create"
    DIGITAL_CREDENTIALS_GET = "digital-credentials-get"
    DIRECT_SOCKETS = "direct-sockets"
    DIRECT_SOCKETS_MULTICAST = "direct-sockets-multicast"
    DIRECT_SOCKETS_PRIVATE = "direct-sockets-private"
    DISPLAY_CAPTURE = "display-capture"
    DOCUMENT_DOMAIN = "document-domain"
    ENCRYPTED_MEDIA = "encrypted-media"
    EXECUTION_WHILE_OUT_OF_VIEWPORT = "execution-while-out-of-viewport"
    EXECUTION_WHILE_NOT_RENDERED = "execution-while-not-rendered"
    FENCED_UNPARTITIONED_STORAGE_READ = "fenced-unpartitioned-storage-read"
    FOCUS_WITHOUT_USER_ACTIVATION = "focus-without-user-activation"
    FULLSCREEN = "fullscreen"
    FROBULATE = "frobulate"
    GAMEPAD = "gamepad"
    GEOLOCATION = "geolocation"
    GYROSCOPE = "gyroscope"
    HID = "hid"
    IDENTITY_CREDENTIALS_GET = "identity-credentials-get"
    IDLE_DETECTION = "idle-detection"
    INTEREST_COHORT = "interest-cohort"
    JOIN_AD_INTEREST_GROUP = "join-ad-interest-group"
    KEYBOARD_MAP = "keyboard-map"
    LANGUAGE_DETECTOR = "language-detector"
    LANGUAGE_MODEL = "language-model"
    LOCAL_FONTS = "local-fonts"
    LOCAL_NETWORK = "local-network"
    LOCAL_NETWORK_ACCESS = "local-network-access"
    LOOPBACK_NETWORK = "loopback-network"
    MAGNETOMETER = "magnetometer"
    MANUAL_TEXT = "manual-text"
    MEDIA_PLAYBACK_WHILE_NOT_VISIBLE = "media-playback-while-not-visible"
    MICROPHONE = "microphone"
    MIDI = "midi"
    ON_DEVICE_SPEECH_RECOGNITION = "on-device-speech-recognition"
    OTP_CREDENTIALS = "otp-credentials"
    PAYMENT = "payment"
    PICTURE_IN_PICTURE = "picture-in-picture"
    PRIVATE_AGGREGATION = "private-aggregation"
    PRIVATE_STATE_TOKEN_ISSUANCE = "private-state-token-issuance"
    PRIVATE_STATE_TOKEN_REDEMPTION = "private-state-token-redemption"
    PUBLICKEY_CREDENTIALS_CREATE = "publickey-credentials-create"
    PUBLICKEY_CREDENTIALS_GET = "publickey-credentials-get"
    RECORD_AD_AUCTION_EVENTS = "record-ad-auction-events"
    REWRITER = "rewriter"
    RUN_AD_AUCTION = "run-ad-auction"
    SCREEN_WAKE_LOCK = "screen-wake-lock"
    SERIAL = "serial"
    SHARED_STORAGE = "shared-storage"
    SHARED_STORAGE_SELECT_URL = "shared-storage-select-url"
    SMART_CARD = "smart-card"
    SPEAKER_SELECTION = "speaker-selection"
    STORAGE_ACCESS = "storage-access"
    SUB_APPS = "sub-apps"
    SUMMARIZER = "summarizer"
    SYNC_XHR = "sync-xhr"
    TRANSLATOR = "translator"
    UNLOAD = "unload"
    USB = "usb"
    USB_UNRESTRICTED = "usb-unrestricted"
    VERTICAL_SCROLL = "vertical-scroll"
    WEB_APP_INSTALLATION = "web-app-installation"
    WEB_PRINTING = "web-printing"
    WEB_SHARE = "web-share"
    WINDOW_MANAGEMENT = "window-management"
    WRITER = "writer"
    XR_SPATIAL_TRACKING = "xr-spatial-tracking"


class PagePermissionsPolicyBlockReason(enum.StrEnum):
    """ Reason for a permissions policy feature to be disabled. """

    HEADER = "Header"
    IFRAMEATTRIBUTE = "IframeAttribute"
    INFENCEDFRAMETREE = "InFencedFrameTree"
    INISOLATEDAPP = "InIsolatedApp"


class PagePermissionsPolicyBlockLocator(CDPObject):

    frameId: Page.FrameId

    blockReason: Page.PermissionsPolicyBlockReason


class PagePermissionsPolicyFeatureState(CDPObject):

    feature: Page.PermissionsPolicyFeature

    allowed: bool

    locator: Page.PermissionsPolicyBlockLocator | None = None


class PageOriginTrialTokenStatus(enum.StrEnum):
    """ Origin Trial(https://www.chromium.org/blink/origin-trials) support.
    Status for an Origin Trial token. """

    SUCCESS = "Success"
    NOTSUPPORTED = "NotSupported"
    INSECURE = "Insecure"
    EXPIRED = "Expired"
    WRONGORIGIN = "WrongOrigin"
    INVALIDSIGNATURE = "InvalidSignature"
    MALFORMED = "Malformed"
    WRONGVERSION = "WrongVersion"
    FEATUREDISABLED = "FeatureDisabled"
    TOKENDISABLED = "TokenDisabled"
    FEATUREDISABLEDFORUSER = "FeatureDisabledForUser"
    UNKNOWNTRIAL = "UnknownTrial"


class PageOriginTrialStatus(enum.StrEnum):
    """ Status for an Origin Trial. """

    ENABLED = "Enabled"
    VALIDTOKENNOTPROVIDED = "ValidTokenNotProvided"
    OSNOTSUPPORTED = "OSNotSupported"
    TRIALNOTALLOWED = "TrialNotAllowed"


class PageOriginTrialUsageRestriction(enum.StrEnum):

    NONE_ = "None"
    SUBSET = "Subset"


class PageOriginTrialToken(CDPObject):

    origin: str

    matchSubDomains: bool

    trialName: str

    expiryTime: Network.TimeSinceEpoch

    isThirdParty: bool

    usageRestriction: Page.OriginTrialUsageRestriction


class PageOriginTrialTokenWithStatus(CDPObject):

    rawTokenText: str

    # `parsedToken` is present only when the token is extractable and parsable.
    parsedToken: Page.OriginTrialToken | None = None

    status: Page.OriginTrialTokenStatus


class PageOriginTrial(CDPObject):

    trialName: str

    status: Page.OriginTrialStatus

    tokensWithStatus: list[Page.OriginTrialTokenWithStatus]


class PageSecurityOriginDetails(CDPObject):
    """ Additional information about the frame document's security origin. """

    # Indicates whether the frame document's security origin is one of the localhostnames (e.g. "localhost") or IP addresses (IPv4 127.0.0.0/8 or IPv6 ::1).
    isLocalhost: bool


class PageFrame(CDPObject):
    """ Information about the Frame on the page. """

    # Frame unique identifier.
    id: Page.FrameId

    # Parent frame identifier.
    parentId: Page.FrameId | None = None

    # Identifier of the loader associated with this frame.
    loaderId: Network.LoaderId

    # Frame's name as specified in the tag.
    name: str | None = None

    # Frame document's URL without fragment.
    url: str

    # Frame document's URL fragment including the '#'.
    urlFragment: str | None = None  # experimental

    # Frame document's registered domain, taking the public suffixes list intoaccount. Extracted from the Frame's url. Example URLs:http://www.google.com/file.html -> "google.com"http://a.b.co.uk/file.html      -> "b.co.uk"
    domainAndRegistry: str | None = None  # experimental

    # Frame document's security origin.
    securityOrigin: str

    # Additional details about the frame document's security origin.
    securityOriginDetails: Page.SecurityOriginDetails | None = None  # experimental

    # Frame document's mimeType as determined by the browser.
    mimeType: str

    # If the frame failed to load, this contains the URL that could not beloaded. Note that unlike url above, this URL may contain a fragment.
    unreachableUrl: str | None = None  # experimental

    # Indicates whether this frame was tagged as an ad and why.
    adFrameStatus: Page.AdFrameStatus | None = None  # experimental

    # Indicates whether the main document is a secure context and explains whythat is the case.
    secureContextType: Page.SecureContextType | None = None  # experimental

    # Indicates whether this is a cross origin isolated context.
    crossOriginIsolatedContextType: Page.CrossOriginIsolatedContextType | None = None  # experimental

    # Indicated which gated APIs / features are available.
    gatedAPIFeatures: list[Page.GatedAPIFeatures] | None = None  # experimental


class PageFrameResource(CDPObject):
    """ Information about the Resource on the page. """

    # Resource URL.
    url: str

    # Type of this resource.
    type: Network.ResourceType

    # Resource mimeType as determined by the browser.
    mimeType: str

    # last-modified timestamp as reported by server.
    lastModified: Network.TimeSinceEpoch | None = None

    # Resource content size.
    contentSize: float | None = None

    # True if the resource failed to load.
    failed: bool | None = None

    # True if the resource was canceled during loading.
    canceled: bool | None = None


class PageFrameResourceTree(CDPObject):
    """ Information about the Frame hierarchy along with their cached resources. """

    # Frame information for this tree item.
    frame: Page.Frame

    # Child frames.
    childFrames: list[Page.FrameResourceTree] | None = None

    # Information about frame resources.
    resources: list[Page.FrameResource]


class PageFrameTree(CDPObject):
    """ Information about the Frame hierarchy. """

    # Frame information for this tree item.
    frame: Page.Frame

    # Child frames.
    childFrames: list[Page.FrameTree] | None = None


""" Unique script identifier. """

PageScriptIdentifier = str


class PageTransitionType(enum.StrEnum):
    """ Transition type. """

    LINK = "link"
    TYPED = "typed"
    ADDRESS_BAR = "address_bar"
    AUTO_BOOKMARK = "auto_bookmark"
    AUTO_SUBFRAME = "auto_subframe"
    MANUAL_SUBFRAME = "manual_subframe"
    GENERATED = "generated"
    AUTO_TOPLEVEL = "auto_toplevel"
    FORM_SUBMIT = "form_submit"
    RELOAD = "reload"
    KEYWORD = "keyword"
    KEYWORD_GENERATED = "keyword_generated"
    OTHER = "other"


class PageNavigationEntry(CDPObject):
    """ Navigation history entry. """

    # Unique id of the navigation history entry.
    id: int

    # URL of the navigation history entry.
    url: str

    # URL that the user typed in the url bar.
    userTypedURL: str

    # Title of the navigation history entry.
    title: str

    # Transition type.
    transitionType: Page.TransitionType


class PageScreencastFrameMetadata(CDPObject):
    """ Screencast frame metadata. """

    # Top offset in DIP.
    offsetTop: float

    # Page scale factor.
    pageScaleFactor: float

    # Device screen width in DIP.
    deviceWidth: float

    # Device screen height in DIP.
    deviceHeight: float

    # Position of horizontal scroll in CSS pixels.
    scrollOffsetX: float

    # Position of vertical scroll in CSS pixels.
    scrollOffsetY: float

    # Frame swap timestamp.
    timestamp: Network.TimeSinceEpoch | None = None


class PageDialogType(enum.StrEnum):
    """ Javascript dialog type. """

    ALERT = "alert"
    CONFIRM = "confirm"
    PROMPT = "prompt"
    BEFOREUNLOAD = "beforeunload"


class PageAppManifestError(CDPObject):
    """ Error while paring app manifest. """

    # Error message.
    message: str

    # If critical, this is a non-recoverable parse error.
    critical: int

    # Error line.
    line: int

    # Error column.
    column: int


class PageAppManifestParsedProperties(CDPObject):
    """ Parsed app manifest properties. """

    # Computed scope value
    scope: str


class PageLayoutViewport(CDPObject):
    """ Layout viewport position and dimensions. """

    # Horizontal offset relative to the document (CSS pixels).
    pageX: int

    # Vertical offset relative to the document (CSS pixels).
    pageY: int

    # Width (CSS pixels), excludes scrollbar if present.
    clientWidth: int

    # Height (CSS pixels), excludes scrollbar if present.
    clientHeight: int


class PageVisualViewport(CDPObject):
    """ Visual viewport position, dimensions, and scale. """

    # Horizontal offset relative to the layout viewport (CSS pixels).
    offsetX: float

    # Vertical offset relative to the layout viewport (CSS pixels).
    offsetY: float

    # Horizontal offset relative to the document (CSS pixels).
    pageX: float

    # Vertical offset relative to the document (CSS pixels).
    pageY: float

    # Width (CSS pixels), excludes scrollbar if present.
    clientWidth: float

    # Height (CSS pixels), excludes scrollbar if present.
    clientHeight: float

    # Scale relative to the ideal viewport (size at width=device-width).
    scale: float

    # Page zoom factor (CSS to device independent pixels ratio).
    zoom: float | None = None


class PageViewport(CDPObject):
    """ Viewport for capturing screenshot. """

    # X offset in device independent pixels (dip).
    x: float

    # Y offset in device independent pixels (dip).
    y: float

    # Rectangle width in device independent pixels (dip).
    width: float

    # Rectangle height in device independent pixels (dip).
    height: float

    # Page scale factor.
    scale: float


class PageFontFamilies(CDPObject):
    """ Generic font families collection. """

    # The standard font-family.
    standard: str | None = None

    # The fixed font-family.
    fixed: str | None = None

    # The serif font-family.
    serif: str | None = None

    # The sansSerif font-family.
    sansSerif: str | None = None

    # The cursive font-family.
    cursive: str | None = None

    # The fantasy font-family.
    fantasy: str | None = None

    # The math font-family.
    math: str | None = None


class PageScriptFontFamilies(CDPObject):
    """ Font families collection for a script. """

    # Name of the script which these font families are defined for.
    script: str

    # Generic font families collection for the script.
    fontFamilies: Page.FontFamilies


class PageFontSizes(CDPObject):
    """ Default font sizes. """

    # Default standard font size.
    standard: int | None = None

    # Default fixed font size.
    fixed: int | None = None


class PageClientNavigationReason(enum.StrEnum):

    ANCHORCLICK = "anchorClick"
    FORMSUBMISSIONGET = "formSubmissionGet"
    FORMSUBMISSIONPOST = "formSubmissionPost"
    HTTPHEADERREFRESH = "httpHeaderRefresh"
    INITIALFRAMENAVIGATION = "initialFrameNavigation"
    METATAGREFRESH = "metaTagRefresh"
    OTHER = "other"
    PAGEBLOCKINTERSTITIAL = "pageBlockInterstitial"
    RELOAD = "reload"
    SCRIPTINITIATED = "scriptInitiated"


class PageClientNavigationDisposition(enum.StrEnum):

    CURRENTTAB = "currentTab"
    NEWTAB = "newTab"
    NEWWINDOW = "newWindow"
    DOWNLOAD = "download"


class PageInstallabilityErrorArgument(CDPObject):

    # Argument name (e.g. name:'minimum-icon-size-in-pixels').
    name: str

    # Argument value (e.g. value:'64').
    value: str


class PageInstallabilityError(CDPObject):
    """ The installability error """

    # The error id (e.g. 'manifest-missing-suitable-icon').
    errorId: str

    # The list of error arguments (e.g. {name:'minimum-icon-size-in-pixels',value:'64'}).
    errorArguments: list[Page.InstallabilityErrorArgument]


class PageReferrerPolicy(enum.StrEnum):
    """ The referring-policy used for the navigation. """

    NOREFERRER = "noReferrer"
    NOREFERRERWHENDOWNGRADE = "noReferrerWhenDowngrade"
    ORIGIN = "origin"
    ORIGINWHENCROSSORIGIN = "originWhenCrossOrigin"
    SAMEORIGIN = "sameOrigin"
    STRICTORIGIN = "strictOrigin"
    STRICTORIGINWHENCROSSORIGIN = "strictOriginWhenCrossOrigin"
    UNSAFEURL = "unsafeUrl"


class PageCompilationCacheParams(CDPObject):
    """ Per-script compilation cache parameters for `Page.produceCompilationCache` """

    # The URL of the script to produce a compilation cache entry for.
    url: str

    # A hint to the backend whether eager compilation is recommended. (theactual compilation mode used is upon backend discretion).
    eager: bool | None = None


class PageFileFilter(CDPObject):

    name: str | None = None

    accepts: list[str] | None = None


class PageFileHandler(CDPObject):

    action: str

    name: str

    icons: list[Page.ImageResource] | None = None

    # Mimic a map, name is the key, accepts is the value.
    accepts: list[Page.FileFilter] | None = None

    # Won't repeat the enums, using string for easy comparison. Same as theother enums below.
    launchType: str


class PageImageResource(CDPObject):
    """ The image definition used in both icon and screenshot. """

    # The src field in the definition, but changing to url in favor ofconsistency.
    url: str

    sizes: str | None = None

    type: str | None = None


class PageLaunchHandler(CDPObject):

    clientMode: str


class PageProtocolHandler(CDPObject):

    protocol: str

    url: str


class PageRelatedApplication(CDPObject):

    id: str | None = None

    url: str


class PageScopeExtension(CDPObject):

    # Instead of using tuple, this field always returns the serialized stringfor easy understanding and comparison.
    origin: str

    hasOriginWildcard: bool


class PageScreenshot(CDPObject):

    image: Page.ImageResource

    formFactor: str

    label: str | None = None


class PageShareTarget(CDPObject):

    action: str

    method: str

    enctype: str

    # Embed the ShareTargetParams
    title: str | None = None

    text: str | None = None

    url: str | None = None

    files: list[Page.FileFilter] | None = None


class PageShortcut(CDPObject):

    name: str

    url: str


class PageWebAppManifest(CDPObject):

    backgroundColor: str | None = None

    # The extra description provided by the manifest.
    description: str | None = None

    dir: str | None = None

    display: str | None = None

    # The overrided display mode controlled by the user.
    displayOverrides: list[str] | None = None

    # The handlers to open files.
    fileHandlers: list[Page.FileHandler] | None = None

    icons: list[Page.ImageResource] | None = None

    id: str | None = None

    lang: str | None = None

    # TODO(crbug.com/1231886): This field is non-standard and part of a Chromeexperiment. See: https://github.com/WICG/web-app-launch/blob/main/launch_handler.md
    launchHandler: Page.LaunchHandler | None = None

    name: str | None = None

    orientation: str | None = None

    preferRelatedApplications: bool | None = None

    # The handlers to open protocols.
    protocolHandlers: list[Page.ProtocolHandler] | None = None

    relatedApplications: list[Page.RelatedApplication] | None = None

    scope: str | None = None

    # Non-standard, see https://github.com/WICG/manifest-incubations/blob/gh-pages/scope_extensions-explainer.md
    scopeExtensions: list[Page.ScopeExtension] | None = None

    # The screenshots used by chromium.
    screenshots: list[Page.Screenshot] | None = None

    shareTarget: Page.ShareTarget | None = None

    shortName: str | None = None

    shortcuts: list[Page.Shortcut] | None = None

    startUrl: str | None = None

    themeColor: str | None = None


class PageNavigationType(enum.StrEnum):
    """ The type of a frameNavigated event. """

    NAVIGATION = "Navigation"
    BACKFORWARDCACHERESTORE = "BackForwardCacheRestore"


class PageBackForwardCacheNotRestoredReason(enum.StrEnum):
    """ List of not restored reasons for back-forward cache. """

    NOTPRIMARYMAINFRAME = "NotPrimaryMainFrame"
    BACKFORWARDCACHEDISABLED = "BackForwardCacheDisabled"
    RELATEDACTIVECONTENTSEXIST = "RelatedActiveContentsExist"
    HTTPSTATUSNOTOK = "HTTPStatusNotOK"
    SCHEMENOTHTTPORHTTPS = "SchemeNotHTTPOrHTTPS"
    LOADING = "Loading"
    WASGRANTEDMEDIAACCESS = "WasGrantedMediaAccess"
    DISABLEFORRENDERFRAMEHOSTCALLED = "DisableForRenderFrameHostCalled"
    DOMAINNOTALLOWED = "DomainNotAllowed"
    HTTPMETHODNOTGET = "HTTPMethodNotGET"
    SUBFRAMEISNAVIGATING = "SubframeIsNavigating"
    TIMEOUT = "Timeout"
    CACHELIMIT = "CacheLimit"
    JAVASCRIPTEXECUTION = "JavaScriptExecution"
    RENDERERPROCESSKILLED = "RendererProcessKilled"
    RENDERERPROCESSCRASHED = "RendererProcessCrashed"
    SCHEDULERTRACKEDFEATUREUSED = "SchedulerTrackedFeatureUsed"
    CONFLICTINGBROWSINGINSTANCE = "ConflictingBrowsingInstance"
    CACHEFLUSHED = "CacheFlushed"
    SERVICEWORKERVERSIONACTIVATION = "ServiceWorkerVersionActivation"
    SESSIONRESTORED = "SessionRestored"
    SERVICEWORKERPOSTMESSAGE = "ServiceWorkerPostMessage"
    ENTEREDBACKFORWARDCACHEBEFORESERVICEWORKERHOSTADDED = "EnteredBackForwardCacheBeforeServiceWorkerHostAdded"
    RENDERFRAMEHOSTREUSED_SAMESITE = "RenderFrameHostReused_SameSite"
    RENDERFRAMEHOSTREUSED_CROSSSITE = "RenderFrameHostReused_CrossSite"
    SERVICEWORKERCLAIM = "ServiceWorkerClaim"
    IGNOREEVENTANDEVICT = "IgnoreEventAndEvict"
    HAVEINNERCONTENTS = "HaveInnerContents"
    TIMEOUTPUTTINGINCACHE = "TimeoutPuttingInCache"
    BACKFORWARDCACHEDISABLEDBYLOWMEMORY = "BackForwardCacheDisabledByLowMemory"
    BACKFORWARDCACHEDISABLEDBYCOMMANDLINE = "BackForwardCacheDisabledByCommandLine"
    NETWORKREQUESTDATAPIPEDRAINEDASBYTESCONSUMER = "NetworkRequestDatapipeDrainedAsBytesConsumer"
    NETWORKREQUESTREDIRECTED = "NetworkRequestRedirected"
    NETWORKREQUESTTIMEOUT = "NetworkRequestTimeout"
    NETWORKEXCEEDSBUFFERLIMIT = "NetworkExceedsBufferLimit"
    NAVIGATIONCANCELLEDWHILERESTORING = "NavigationCancelledWhileRestoring"
    NOTMOSTRECENTNAVIGATIONENTRY = "NotMostRecentNavigationEntry"
    BACKFORWARDCACHEDISABLEDFORPRERENDER = "BackForwardCacheDisabledForPrerender"
    USERAGENTOVERRIDEDIFFERS = "UserAgentOverrideDiffers"
    FOREGROUNDCACHELIMIT = "ForegroundCacheLimit"
    BROWSINGINSTANCENOTSWAPPED = "BrowsingInstanceNotSwapped"
    BACKFORWARDCACHEDISABLEDFORDELEGATE = "BackForwardCacheDisabledForDelegate"
    UNLOADHANDLEREXISTSINMAINFRAME = "UnloadHandlerExistsInMainFrame"
    UNLOADHANDLEREXISTSINSUBFRAME = "UnloadHandlerExistsInSubFrame"
    SERVICEWORKERUNREGISTRATION = "ServiceWorkerUnregistration"
    CACHECONTROLNOSTORE = "CacheControlNoStore"
    CACHECONTROLNOSTORECOOKIEMODIFIED = "CacheControlNoStoreCookieModified"
    CACHECONTROLNOSTOREHTTPONLYCOOKIEMODIFIED = "CacheControlNoStoreHTTPOnlyCookieModified"
    NORESPONSEHEAD = "NoResponseHead"
    UNKNOWN = "Unknown"
    ACTIVATIONNAVIGATIONSDISALLOWEDFORBUG1234857 = "ActivationNavigationsDisallowedForBug1234857"
    ERRORDOCUMENT = "ErrorDocument"
    FENCEDFRAMESEMBEDDER = "FencedFramesEmbedder"
    COOKIEDISABLED = "CookieDisabled"
    HTTPAUTHREQUIRED = "HTTPAuthRequired"
    COOKIEFLUSHED = "CookieFlushed"
    BROADCASTCHANNELONMESSAGE = "BroadcastChannelOnMessage"
    WEBVIEWSETTINGSCHANGED = "WebViewSettingsChanged"
    WEBVIEWJAVASCRIPTOBJECTCHANGED = "WebViewJavaScriptObjectChanged"
    WEBVIEWMESSAGELISTENERINJECTED = "WebViewMessageListenerInjected"
    WEBVIEWSAFEBROWSINGALLOWLISTCHANGED = "WebViewSafeBrowsingAllowlistChanged"
    WEBVIEWDOCUMENTSTARTJAVASCRIPTCHANGED = "WebViewDocumentStartJavascriptChanged"
    WEBSOCKET = "WebSocket"
    WEBTRANSPORT = "WebTransport"
    WEBRTC = "WebRTC"
    MAINRESOURCEHASCACHECONTROLNOSTORE = "MainResourceHasCacheControlNoStore"
    MAINRESOURCEHASCACHECONTROLNOCACHE = "MainResourceHasCacheControlNoCache"
    SUBRESOURCEHASCACHECONTROLNOSTORE = "SubresourceHasCacheControlNoStore"
    SUBRESOURCEHASCACHECONTROLNOCACHE = "SubresourceHasCacheControlNoCache"
    CONTAINSPLUGINS = "ContainsPlugins"
    DOCUMENTLOADED = "DocumentLoaded"
    OUTSTANDINGNETWORKREQUESTOTHERS = "OutstandingNetworkRequestOthers"
    REQUESTEDMIDIPERMISSION = "RequestedMIDIPermission"
    REQUESTEDAUDIOCAPTUREPERMISSION = "RequestedAudioCapturePermission"
    REQUESTEDVIDEOCAPTUREPERMISSION = "RequestedVideoCapturePermission"
    REQUESTEDBACKFORWARDCACHEBLOCKEDSENSORS = "RequestedBackForwardCacheBlockedSensors"
    REQUESTEDBACKGROUNDWORKPERMISSION = "RequestedBackgroundWorkPermission"
    BROADCASTCHANNEL = "BroadcastChannel"
    WEBXR = "WebXR"
    SHAREDWORKER = "SharedWorker"
    SHAREDWORKERMESSAGE = "SharedWorkerMessage"
    SHAREDWORKERWITHNOACTIVECLIENT = "SharedWorkerWithNoActiveClient"
    WEBLOCKS = "WebLocks"
    WEBHID = "WebHID"
    WEBBLUETOOTH = "WebBluetooth"
    WEBSHARE = "WebShare"
    REQUESTEDSTORAGEACCESSGRANT = "RequestedStorageAccessGrant"
    WEBNFC = "WebNfc"
    OUTSTANDINGNETWORKREQUESTFETCH = "OutstandingNetworkRequestFetch"
    OUTSTANDINGNETWORKREQUESTXHR = "OutstandingNetworkRequestXHR"
    APPBANNER = "AppBanner"
    PRINTING = "Printing"
    WEBDATABASE = "WebDatabase"
    PICTUREINPICTURE = "PictureInPicture"
    SPEECHRECOGNIZER = "SpeechRecognizer"
    IDLEMANAGER = "IdleManager"
    PAYMENTMANAGER = "PaymentManager"
    SPEECHSYNTHESIS = "SpeechSynthesis"
    KEYBOARDLOCK = "KeyboardLock"
    WEBOTPSERVICE = "WebOTPService"
    OUTSTANDINGNETWORKREQUESTDIRECTSOCKET = "OutstandingNetworkRequestDirectSocket"
    INJECTEDJAVASCRIPT = "InjectedJavascript"
    INJECTEDSTYLESHEET = "InjectedStyleSheet"
    KEEPALIVEREQUEST = "KeepaliveRequest"
    INDEXEDDBEVENT = "IndexedDBEvent"
    DUMMY = "Dummy"
    JSNETWORKREQUESTRECEIVEDCACHECONTROLNOSTORERESOURCE = "JsNetworkRequestReceivedCacheControlNoStoreResource"
    WEBRTCUSEDWITHCCNS = "WebRTCUsedWithCCNS"
    WEBTRANSPORTUSEDWITHCCNS = "WebTransportUsedWithCCNS"
    WEBSOCKETUSEDWITHCCNS = "WebSocketUsedWithCCNS"
    SMARTCARD = "SmartCard"
    LIVEMEDIASTREAMTRACK = "LiveMediaStreamTrack"
    UNLOADHANDLER = "UnloadHandler"
    PARSERABORTED = "ParserAborted"
    CONTENTSECURITYHANDLER = "ContentSecurityHandler"
    CONTENTWEBAUTHENTICATIONAPI = "ContentWebAuthenticationAPI"
    CONTENTFILECHOOSER = "ContentFileChooser"
    CONTENTSERIAL = "ContentSerial"
    CONTENTFILESYSTEMACCESS = "ContentFileSystemAccess"
    CONTENTMEDIADEVICESDISPATCHERHOST = "ContentMediaDevicesDispatcherHost"
    CONTENTWEBBLUETOOTH = "ContentWebBluetooth"
    CONTENTWEBUSB = "ContentWebUSB"
    CONTENTMEDIASESSIONSERVICE = "ContentMediaSessionService"
    CONTENTSCREENREADER = "ContentScreenReader"
    CONTENTDISCARDED = "ContentDiscarded"
    EMBEDDERPOPUPBLOCKERTABHELPER = "EmbedderPopupBlockerTabHelper"
    EMBEDDERSAFEBROWSINGTRIGGEREDPOPUPBLOCKER = "EmbedderSafeBrowsingTriggeredPopupBlocker"
    EMBEDDERSAFEBROWSINGTHREATDETAILS = "EmbedderSafeBrowsingThreatDetails"
    EMBEDDERAPPBANNERMANAGER = "EmbedderAppBannerManager"
    EMBEDDERDOMDISTILLERVIEWERSOURCE = "EmbedderDomDistillerViewerSource"
    EMBEDDERDOMDISTILLERSELFDELETINGREQUESTDELEGATE = "EmbedderDomDistillerSelfDeletingRequestDelegate"
    EMBEDDEROOMINTERVENTIONTABHELPER = "EmbedderOomInterventionTabHelper"
    EMBEDDEROFFLINEPAGE = "EmbedderOfflinePage"
    EMBEDDERCHROMEPASSWORDMANAGERCLIENTBINDCREDENTIALMANAGER = "EmbedderChromePasswordManagerClientBindCredentialManager"
    EMBEDDERPERMISSIONREQUESTMANAGER = "EmbedderPermissionRequestManager"
    EMBEDDERMODALDIALOG = "EmbedderModalDialog"
    EMBEDDEREXTENSIONS = "EmbedderExtensions"
    EMBEDDEREXTENSIONMESSAGING = "EmbedderExtensionMessaging"
    EMBEDDEREXTENSIONMESSAGINGFOROPENPORT = "EmbedderExtensionMessagingForOpenPort"
    EMBEDDEREXTENSIONSENTMESSAGETOCACHEDFRAME = "EmbedderExtensionSentMessageToCachedFrame"
    REQUESTEDBYWEBVIEWCLIENT = "RequestedByWebViewClient"
    POSTMESSAGEBYWEBVIEWCLIENT = "PostMessageByWebViewClient"
    CACHECONTROLNOSTOREDEVICEBOUNDSESSIONTERMINATED = "CacheControlNoStoreDeviceBoundSessionTerminated"
    CACHELIMITPRUNEDONMODERATEMEMORYPRESSURE = "CacheLimitPrunedOnModerateMemoryPressure"
    CACHELIMITPRUNEDONCRITICALMEMORYPRESSURE = "CacheLimitPrunedOnCriticalMemoryPressure"


class PageBackForwardCacheNotRestoredReasonType(enum.StrEnum):
    """ Types of not restored reasons for back-forward cache. """

    SUPPORTPENDING = "SupportPending"
    PAGESUPPORTNEEDED = "PageSupportNeeded"
    CIRCUMSTANTIAL = "Circumstantial"


class PageBackForwardCacheBlockingDetails(CDPObject):

    # Url of the file where blockage happened. Optional because of tests.
    url: str | None = None

    # Function name where blockage happened. Optional because of anonymousfunctions and tests.
    function: str | None = None

    # Line number in the script (0-based).
    lineNumber: int

    # Column number in the script (0-based).
    columnNumber: int


class PageBackForwardCacheNotRestoredExplanation(CDPObject):

    # Type of the reason
    type: Page.BackForwardCacheNotRestoredReasonType

    # Not restored reason
    reason: Page.BackForwardCacheNotRestoredReason

    # Context associated with the reason. The meaning of this context isdependent on the reason: - EmbedderExtensionSentMessageToCachedFrame: theextension ID.
    context: str | None = None

    details: list[Page.BackForwardCacheBlockingDetails] | None = None


class PageBackForwardCacheNotRestoredExplanationTree(CDPObject):

    # URL of each frame
    url: str

    # Not restored reasons of each frame
    explanations: list[Page.BackForwardCacheNotRestoredExplanation]

    # Array of children frame
    children: list[Page.BackForwardCacheNotRestoredExplanationTree]


class PerformanceMetric(CDPObject):
    """ Run-time execution metric. """

    # Metric name.
    name: str

    # Metric value.
    value: float


class PerformanceTimelineLargestContentfulPaint(CDPObject):
    """ See https://github.com/WICG/LargestContentfulPaint and largest_contentful_paint.idl """

    renderTime: Network.TimeSinceEpoch

    loadTime: Network.TimeSinceEpoch

    # The number of pixels being painted.
    size: float

    # The id attribute of the element, if available.
    elementId: str | None = None

    # The URL of the image (may be trimmed).
    url: str | None = None

    nodeId: DOM.BackendNodeId | None = None


class PerformanceTimelineLayoutShiftAttribution(CDPObject):

    previousRect: DOM.Rect

    currentRect: DOM.Rect

    nodeId: DOM.BackendNodeId | None = None


class PerformanceTimelineLayoutShift(CDPObject):
    """ See https://wicg.github.io/layout-instability/#sec-layout-shift and layout_shift.idl """

    # Score increment produced by this event.
    value: float

    hadRecentInput: bool

    lastInputTime: Network.TimeSinceEpoch

    sources: list[PerformanceTimeline.LayoutShiftAttribution]


class PerformanceTimelineTimelineEvent(CDPObject):

    # Identifies the frame that this event is related to. Empty for non-frametargets.
    frameId: Page.FrameId

    # The event type, as specified in https://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype This determines which of the optional"details" fields is present.
    type: str

    # Name may be empty depending on the type.
    name: str

    # Time in seconds since Epoch, monotonically increasing within documentlifetime.
    time: Network.TimeSinceEpoch

    # Event duration, if applicable.
    duration: float | None = None

    lcpDetails: PerformanceTimeline.LargestContentfulPaint | None = None

    layoutShiftDetails: PerformanceTimeline.LayoutShift | None = None


""" Unique id """

PreloadRuleSetId = str


class PreloadRuleSet(CDPObject):
    """ Corresponds to SpeculationRuleSet """

    id: Preload.RuleSetId

    # Identifies a document which the rule set is associated with.
    loaderId: Network.LoaderId

    # Source text of JSON representing the rule set. If it comes from `<script>`tag, it is the textContent of the node. Note that it is a JSON for valid case.See also: - https://wicg.github.io/nav-speculation/speculation-rules.html -https://github.com/WICG/nav-speculation/blob/main/triggers.md
    sourceText: str

    # A speculation rule set is either added through an inline `<script>` tag orthrough an external resource via the 'Speculation-Rules' HTTP header. For thefirst case, we include the BackendNodeId of the relevant `<script>` tag. For thesecond case, we include the external URL where the rule set was loaded from, andalso RequestId if Network domain is enabled.  See also: -https://wicg.github.io/nav-speculation/speculation-rules.html#speculation-rules-script - https://wicg.github.io/nav-speculation/speculation-rules.html#speculation-rules-header
    backendNodeId: DOM.BackendNodeId | None = None

    url: str | None = None

    requestId: Network.RequestId | None = None

    # Error information `errorMessage` is null iff `errorType` is null.
    errorType: Preload.RuleSetErrorType | None = None

    # TODO(https://crbug.com/1425354): Replace this property with structurederror.
    errorMessage: str | None = None  # deprecated

    # For more details, see: https://github.com/WICG/nav-speculation/blob/main/speculation-rules-tags.md
    tag: str | None = None


class PreloadRuleSetErrorType(enum.StrEnum):

    SOURCEISNOTJSONOBJECT = "SourceIsNotJsonObject"
    INVALIDRULESSKIPPED = "InvalidRulesSkipped"
    INVALIDRULESETLEVELTAG = "InvalidRulesetLevelTag"


class PreloadSpeculationAction(enum.StrEnum):
    """ The type of preloading attempted. It corresponds to
    mojom::SpeculationAction (although PrefetchWithSubresources is omitted as it
    isn't being used by clients). """

    PREFETCH = "Prefetch"
    PRERENDER = "Prerender"
    PRERENDERUNTILSCRIPT = "PrerenderUntilScript"


class PreloadSpeculationTargetHint(enum.StrEnum):
    """ Corresponds to mojom::SpeculationTargetHint.
    See https://github.com/WICG/nav-speculation/blob/main/triggers.md#window-name-targeting-hints """

    BLANK = "Blank"
    SELF = "Self"


class PreloadPreloadingAttemptKey(CDPObject):
    """ A key that identifies a preloading attempt.

    The url used is the url specified by the trigger (i.e. the initial URL), and
    not the final url that is navigated to. For example, prerendering allows
    same-origin main frame navigations during the attempt, but the attempt is
    still keyed with the initial URL. """

    loaderId: Network.LoaderId

    action: Preload.SpeculationAction

    url: str

    targetHint: Preload.SpeculationTargetHint | None = None


class PreloadPreloadingAttemptSource(CDPObject):
    """ Lists sources for a preloading attempt, specifically the ids of rule sets
    that had a speculation rule that triggered the attempt, and the
    BackendNodeIds of <a href> or <area href> elements that triggered the
    attempt (in the case of attempts triggered by a document rule). It is
    possible for multiple rule sets and links to trigger a single attempt. """

    key: Preload.PreloadingAttemptKey

    ruleSetIds: list[Preload.RuleSetId]

    nodeIds: list[DOM.BackendNodeId]


""" Chrome manages different types of preloads together using a
concept of preloading pipeline. For example, if a site uses a
SpeculationRules for prerender, Chrome first starts a prefetch and
then upgrades it to prerender.

CDP events for them are emitted separately but they share
`PreloadPipelineId`. """

PreloadPreloadPipelineId = str


class PreloadPrerenderFinalStatus(enum.StrEnum):
    """ List of FinalStatus reasons for Prerender2. """

    ACTIVATED = "Activated"
    DESTROYED = "Destroyed"
    LOWENDDEVICE = "LowEndDevice"
    INVALIDSCHEMEREDIRECT = "InvalidSchemeRedirect"
    INVALIDSCHEMENAVIGATION = "InvalidSchemeNavigation"
    NAVIGATIONREQUESTBLOCKEDBYCSP = "NavigationRequestBlockedByCsp"
    MOJOBINDERPOLICY = "MojoBinderPolicy"
    RENDERERPROCESSCRASHED = "RendererProcessCrashed"
    RENDERERPROCESSKILLED = "RendererProcessKilled"
    DOWNLOAD = "Download"
    TRIGGERDESTROYED = "TriggerDestroyed"
    NAVIGATIONNOTCOMMITTED = "NavigationNotCommitted"
    NAVIGATIONBADHTTPSTATUS = "NavigationBadHttpStatus"
    CLIENTCERTREQUESTED = "ClientCertRequested"
    NAVIGATIONREQUESTNETWORKERROR = "NavigationRequestNetworkError"
    CANCELALLHOSTSFORTESTING = "CancelAllHostsForTesting"
    DIDFAILLOAD = "DidFailLoad"
    STOP = "Stop"
    SSLCERTIFICATEERROR = "SslCertificateError"
    LOGINAUTHREQUESTED = "LoginAuthRequested"
    UACHANGEREQUIRESRELOAD = "UaChangeRequiresReload"
    BLOCKEDBYCLIENT = "BlockedByClient"
    AUDIOOUTPUTDEVICEREQUESTED = "AudioOutputDeviceRequested"
    MIXEDCONTENT = "MixedContent"
    TRIGGERBACKGROUNDED = "TriggerBackgrounded"
    MEMORYLIMITEXCEEDED = "MemoryLimitExceeded"
    DATASAVERENABLED = "DataSaverEnabled"
    TRIGGERURLHASEFFECTIVEURL = "TriggerUrlHasEffectiveUrl"
    ACTIVATEDBEFORESTARTED = "ActivatedBeforeStarted"
    INACTIVEPAGERESTRICTION = "InactivePageRestriction"
    STARTFAILED = "StartFailed"
    TIMEOUTBACKGROUNDED = "TimeoutBackgrounded"
    CROSSSITEREDIRECTININITIALNAVIGATION = "CrossSiteRedirectInInitialNavigation"
    CROSSSITENAVIGATIONININITIALNAVIGATION = "CrossSiteNavigationInInitialNavigation"
    SAMESITECROSSORIGINREDIRECTNOTOPTINININITIALNAVIGATION = "SameSiteCrossOriginRedirectNotOptInInInitialNavigation"
    SAMESITECROSSORIGINNAVIGATIONNOTOPTINININITIALNAVIGATION = "SameSiteCrossOriginNavigationNotOptInInInitialNavigation"
    ACTIVATIONNAVIGATIONPARAMETERMISMATCH = "ActivationNavigationParameterMismatch"
    ACTIVATEDINBACKGROUND = "ActivatedInBackground"
    EMBEDDERHOSTDISALLOWED = "EmbedderHostDisallowed"
    ACTIVATIONNAVIGATIONDESTROYEDBEFORESUCCESS = "ActivationNavigationDestroyedBeforeSuccess"
    TABCLOSEDBYUSERGESTURE = "TabClosedByUserGesture"
    TABCLOSEDWITHOUTUSERGESTURE = "TabClosedWithoutUserGesture"
    PRIMARYMAINFRAMERENDERERPROCESSCRASHED = "PrimaryMainFrameRendererProcessCrashed"
    PRIMARYMAINFRAMERENDERERPROCESSKILLED = "PrimaryMainFrameRendererProcessKilled"
    ACTIVATIONFRAMEPOLICYNOTCOMPATIBLE = "ActivationFramePolicyNotCompatible"
    PRELOADINGDISABLED = "PreloadingDisabled"
    BATTERYSAVERENABLED = "BatterySaverEnabled"
    ACTIVATEDDURINGMAINFRAMENAVIGATION = "ActivatedDuringMainFrameNavigation"
    PRELOADINGUNSUPPORTEDBYWEBCONTENTS = "PreloadingUnsupportedByWebContents"
    CROSSSITEREDIRECTINMAINFRAMENAVIGATION = "CrossSiteRedirectInMainFrameNavigation"
    CROSSSITENAVIGATIONINMAINFRAMENAVIGATION = "CrossSiteNavigationInMainFrameNavigation"
    SAMESITECROSSORIGINREDIRECTNOTOPTININMAINFRAMENAVIGATION = "SameSiteCrossOriginRedirectNotOptInInMainFrameNavigation"
    SAMESITECROSSORIGINNAVIGATIONNOTOPTININMAINFRAMENAVIGATION = "SameSiteCrossOriginNavigationNotOptInInMainFrameNavigation"
    MEMORYPRESSUREONTRIGGER = "MemoryPressureOnTrigger"
    MEMORYPRESSUREAFTERTRIGGERED = "MemoryPressureAfterTriggered"
    PRERENDERINGDISABLEDBYDEVTOOLS = "PrerenderingDisabledByDevTools"
    SPECULATIONRULEREMOVED = "SpeculationRuleRemoved"
    ACTIVATEDWITHAUXILIARYBROWSINGCONTEXTS = "ActivatedWithAuxiliaryBrowsingContexts"
    MAXNUMOFRUNNINGEAGERPRERENDERSEXCEEDED = "MaxNumOfRunningEagerPrerendersExceeded"
    MAXNUMOFRUNNINGNONEAGERPRERENDERSEXCEEDED = "MaxNumOfRunningNonEagerPrerendersExceeded"
    MAXNUMOFRUNNINGEMBEDDERPRERENDERSEXCEEDED = "MaxNumOfRunningEmbedderPrerendersExceeded"
    PRERENDERINGURLHASEFFECTIVEURL = "PrerenderingUrlHasEffectiveUrl"
    REDIRECTEDPRERENDERINGURLHASEFFECTIVEURL = "RedirectedPrerenderingUrlHasEffectiveUrl"
    ACTIVATIONURLHASEFFECTIVEURL = "ActivationUrlHasEffectiveUrl"
    JAVASCRIPTINTERFACEADDED = "JavaScriptInterfaceAdded"
    JAVASCRIPTINTERFACEREMOVED = "JavaScriptInterfaceRemoved"
    ALLPRERENDERINGCANCELED = "AllPrerenderingCanceled"
    WINDOWCLOSED = "WindowClosed"
    SLOWNETWORK = "SlowNetwork"
    OTHERPRERENDEREDPAGEACTIVATED = "OtherPrerenderedPageActivated"
    V8OPTIMIZERDISABLED = "V8OptimizerDisabled"
    PRERENDERFAILEDDURINGPREFETCH = "PrerenderFailedDuringPrefetch"
    BROWSINGDATAREMOVED = "BrowsingDataRemoved"
    PRERENDERHOSTREUSED = "PrerenderHostReused"


class PreloadPreloadingStatus(enum.StrEnum):
    """ Preloading status values, see also PreloadingTriggeringOutcome. This
    status is shared by prefetchStatusUpdated and prerenderStatusUpdated. """

    PENDING = "Pending"
    RUNNING = "Running"
    READY = "Ready"
    SUCCESS = "Success"
    FAILURE = "Failure"
    NOTSUPPORTED = "NotSupported"


class PreloadPrefetchStatus(enum.StrEnum):
    """ TODO(https://crbug.com/1384419): revisit the list of PrefetchStatus and
    filter out the ones that aren't necessary to the developers. """

    PREFETCHALLOWED = "PrefetchAllowed"
    PREFETCHFAILEDINELIGIBLEREDIRECT = "PrefetchFailedIneligibleRedirect"
    PREFETCHFAILEDINVALIDREDIRECT = "PrefetchFailedInvalidRedirect"
    PREFETCHFAILEDMIMENOTSUPPORTED = "PrefetchFailedMIMENotSupported"
    PREFETCHFAILEDNETERROR = "PrefetchFailedNetError"
    PREFETCHFAILEDNON2XX = "PrefetchFailedNon2XX"
    PREFETCHEVICTEDAFTERBROWSINGDATAREMOVED = "PrefetchEvictedAfterBrowsingDataRemoved"
    PREFETCHEVICTEDAFTERCANDIDATEREMOVED = "PrefetchEvictedAfterCandidateRemoved"
    PREFETCHEVICTEDFORNEWERPREFETCH = "PrefetchEvictedForNewerPrefetch"
    PREFETCHHELDBACK = "PrefetchHeldback"
    PREFETCHINELIGIBLERETRYAFTER = "PrefetchIneligibleRetryAfter"
    PREFETCHISPRIVACYDECOY = "PrefetchIsPrivacyDecoy"
    PREFETCHISSTALE = "PrefetchIsStale"
    PREFETCHNOTELIGIBLEBROWSERCONTEXTOFFTHERECORD = "PrefetchNotEligibleBrowserContextOffTheRecord"
    PREFETCHNOTELIGIBLEDATASAVERENABLED = "PrefetchNotEligibleDataSaverEnabled"
    PREFETCHNOTELIGIBLEEXISTINGPROXY = "PrefetchNotEligibleExistingProxy"
    PREFETCHNOTELIGIBLEHOSTISNONUNIQUE = "PrefetchNotEligibleHostIsNonUnique"
    PREFETCHNOTELIGIBLENONDEFAULTSTORAGEPARTITION = "PrefetchNotEligibleNonDefaultStoragePartition"
    PREFETCHNOTELIGIBLESAMESITECROSSORIGINPREFETCHREQUIREDPROXY = "PrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy"
    PREFETCHNOTELIGIBLESCHEMEISNOTHTTPS = "PrefetchNotEligibleSchemeIsNotHttps"
    PREFETCHNOTELIGIBLEUSERHASCOOKIES = "PrefetchNotEligibleUserHasCookies"
    PREFETCHNOTELIGIBLEUSERHASSERVICEWORKER = "PrefetchNotEligibleUserHasServiceWorker"
    PREFETCHNOTELIGIBLEUSERHASSERVICEWORKERNOFETCHHANDLER = "PrefetchNotEligibleUserHasServiceWorkerNoFetchHandler"
    PREFETCHNOTELIGIBLEREDIRECTFROMSERVICEWORKER = "PrefetchNotEligibleRedirectFromServiceWorker"
    PREFETCHNOTELIGIBLEREDIRECTTOSERVICEWORKER = "PrefetchNotEligibleRedirectToServiceWorker"
    PREFETCHNOTELIGIBLEBATTERYSAVERENABLED = "PrefetchNotEligibleBatterySaverEnabled"
    PREFETCHNOTELIGIBLEPRELOADINGDISABLED = "PrefetchNotEligiblePreloadingDisabled"
    PREFETCHNOTFINISHEDINTIME = "PrefetchNotFinishedInTime"
    PREFETCHNOTSTARTED = "PrefetchNotStarted"
    PREFETCHNOTUSEDCOOKIESCHANGED = "PrefetchNotUsedCookiesChanged"
    PREFETCHPROXYNOTAVAILABLE = "PrefetchProxyNotAvailable"
    PREFETCHRESPONSEUSED = "PrefetchResponseUsed"
    PREFETCHSUCCESSFULBUTNOTUSED = "PrefetchSuccessfulButNotUsed"
    PREFETCHNOTUSEDPROBEFAILED = "PrefetchNotUsedProbeFailed"


class PreloadPrerenderMismatchedHeaders(CDPObject):
    """ Information of headers to be displayed when the header mismatch occurred. """

    headerName: str

    initialValue: str | None = None

    activationValue: str | None = None


""" An internal certificate ID value. """

SecurityCertificateId = int


class SecurityMixedContentType(enum.StrEnum):
    """ A description of mixed content (HTTP resources on HTTPS pages), as defined by
    https://www.w3.org/TR/mixed-content/#categories """

    BLOCKABLE = "blockable"
    OPTIONALLY_BLOCKABLE = "optionally-blockable"
    NONE = "none"


class SecuritySecurityState(enum.StrEnum):
    """ The security level of a page or resource. """

    UNKNOWN = "unknown"
    NEUTRAL = "neutral"
    INSECURE = "insecure"
    SECURE = "secure"
    INFO = "info"
    INSECURE_BROKEN = "insecure-broken"


class SecurityCertificateSecurityState(CDPObject):
    """ Details about the security state of the page certificate. """

    # Protocol name (e.g. "TLS 1.2" or "QUIC").
    protocol: str

    # Key Exchange used by the connection, or the empty string if notapplicable.
    keyExchange: str

    # (EC)DH group used by the connection, if applicable.
    keyExchangeGroup: str | None = None

    # Cipher name.
    cipher: str

    # TLS MAC. Note that AEAD ciphers do not have separate MACs.
    mac: str | None = None

    # Page certificate.
    certificate: list[str]

    # Certificate subject name.
    subjectName: str

    # Name of the issuing CA.
    issuer: str

    # Certificate valid from date.
    validFrom: Network.TimeSinceEpoch

    # Certificate valid to (expiration) date
    validTo: Network.TimeSinceEpoch

    # The highest priority network error code, if the certificate has an error.
    certificateNetworkError: str | None = None

    # True if the certificate uses a weak signature algorithm.
    certificateHasWeakSignature: bool

    # True if the certificate has a SHA1 signature in the chain.
    certificateHasSha1Signature: bool

    # True if modern SSL
    modernSSL: bool

    # True if the connection is using an obsolete SSL protocol.
    obsoleteSslProtocol: bool

    # True if the connection is using an obsolete SSL key exchange.
    obsoleteSslKeyExchange: bool

    # True if the connection is using an obsolete SSL cipher.
    obsoleteSslCipher: bool

    # True if the connection is using an obsolete SSL signature.
    obsoleteSslSignature: bool


class SecuritySafetyTipStatus(enum.StrEnum):

    BADREPUTATION = "badReputation"
    LOOKALIKE = "lookalike"


class SecuritySafetyTipInfo(CDPObject):

    # Describes whether the page triggers any safety tips or reputationwarnings. Default is unknown.
    safetyTipStatus: Security.SafetyTipStatus

    # The URL the safety tip suggested ("Did you mean?"). Only filled in forlookalike matches.
    safeUrl: str | None = None


class SecurityVisibleSecurityState(CDPObject):
    """ Security state information about the page. """

    # The security level of the page.
    securityState: Security.SecurityState

    # Security state details about the page certificate.
    certificateSecurityState: Security.CertificateSecurityState | None = None

    # The type of Safety Tip triggered on the page. Note that this field will beset even if the Safety Tip UI was not actually shown.
    safetyTipInfo: Security.SafetyTipInfo | None = None

    # Array of security state issues ids.
    securityStateIssueIds: list[str]


class SecuritySecurityStateExplanation(CDPObject):
    """ An explanation of an factor contributing to the security state. """

    # Security state representing the severity of the factor being explained.
    securityState: Security.SecurityState

    # Title describing the type of factor.
    title: str

    # Short phrase describing the type of factor.
    summary: str

    # Full text explanation of the factor.
    description: str

    # The type of mixed content described by the explanation.
    mixedContentType: Security.MixedContentType

    # Page certificate.
    certificate: list[str]

    # Recommendations to fix any issues.
    recommendations: list[str] | None = None


class SecurityInsecureContentStatus(CDPObject):
    """ Information about insecure content on the page. """

    # Always false.
    ranMixedContent: bool

    # Always false.
    displayedMixedContent: bool

    # Always false.
    containedMixedForm: bool

    # Always false.
    ranContentWithCertErrors: bool

    # Always false.
    displayedContentWithCertErrors: bool

    # Always set to unknown.
    ranInsecureContentStyle: Security.SecurityState

    # Always set to unknown.
    displayedInsecureContentStyle: Security.SecurityState


class SecurityCertificateErrorAction(enum.StrEnum):
    """ The action to take when a certificate error occurs. continue will continue processing the
    request and cancel will cancel the request. """

    CONTINUE = "continue"
    CANCEL = "cancel"


ServiceWorkerRegistrationID = str


class ServiceWorkerServiceWorkerRegistration(CDPObject):
    """ ServiceWorker registration. """

    registrationId: ServiceWorker.RegistrationID

    scopeURL: str

    isDeleted: bool


class ServiceWorkerServiceWorkerVersionRunningStatus(enum.StrEnum):

    STOPPED = "stopped"
    STARTING = "starting"
    RUNNING = "running"
    STOPPING = "stopping"


class ServiceWorkerServiceWorkerVersionStatus(enum.StrEnum):

    NEW = "new"
    INSTALLING = "installing"
    INSTALLED = "installed"
    ACTIVATING = "activating"
    ACTIVATED = "activated"
    REDUNDANT = "redundant"


class ServiceWorkerServiceWorkerVersion(CDPObject):
    """ ServiceWorker version. """

    versionId: str

    registrationId: ServiceWorker.RegistrationID

    scriptURL: str

    runningStatus: ServiceWorker.ServiceWorkerVersionRunningStatus

    status: ServiceWorker.ServiceWorkerVersionStatus

    # The Last-Modified header value of the main script.
    scriptLastModified: float | None = None

    # The time at which the response headers of the main script were receivedfrom the server. For cached script it is the last time the cache entry wasvalidated.
    scriptResponseTime: float | None = None

    controlledClients: list[Target.TargetID] | None = None

    targetId: Target.TargetID | None = None

    routerRules: str | None = None


class ServiceWorkerServiceWorkerErrorMessage(CDPObject):
    """ ServiceWorker error message. """

    errorMessage: str

    registrationId: ServiceWorker.RegistrationID

    versionId: str

    sourceURL: str

    lineNumber: int

    columnNumber: int


StorageSerializedStorageKey = str


class StorageStorageType(enum.StrEnum):
    """ Enum of possible storage types. """

    COOKIES = "cookies"
    FILE_SYSTEMS = "file_systems"
    INDEXEDDB = "indexeddb"
    LOCAL_STORAGE = "local_storage"
    SHADER_CACHE = "shader_cache"
    WEBSQL = "websql"
    SERVICE_WORKERS = "service_workers"
    CACHE_STORAGE = "cache_storage"
    INTEREST_GROUPS = "interest_groups"
    SHARED_STORAGE = "shared_storage"
    STORAGE_BUCKETS = "storage_buckets"
    ALL_ = "all"
    OTHER = "other"


class StorageUsageForType(CDPObject):
    """ Usage for a storage type. """

    # Name of storage type.
    storageType: Storage.StorageType

    # Storage usage (bytes).
    usage: float


class StorageTrustTokens(CDPObject):
    """ Pair of issuer origin and number of available (signed, but not used) Trust
    Tokens from that issuer. """

    issuerOrigin: str

    count: float


""" Protected audience interest group auction identifier. """

StorageInterestGroupAuctionId = str


class StorageInterestGroupAccessType(enum.StrEnum):
    """ Enum of interest group access types. """

    JOIN = "join"
    LEAVE = "leave"
    UPDATE = "update"
    LOADED = "loaded"
    BID = "bid"
    WIN = "win"
    ADDITIONALBID = "additionalBid"
    ADDITIONALBIDWIN = "additionalBidWin"
    TOPLEVELBID = "topLevelBid"
    TOPLEVELADDITIONALBID = "topLevelAdditionalBid"
    CLEAR = "clear"


class StorageInterestGroupAuctionEventType(enum.StrEnum):
    """ Enum of auction events. """

    STARTED = "started"
    CONFIGRESOLVED = "configResolved"


class StorageInterestGroupAuctionFetchType(enum.StrEnum):
    """ Enum of network fetches auctions can do. """

    BIDDERJS = "bidderJs"
    BIDDERWASM = "bidderWasm"
    SELLERJS = "sellerJs"
    BIDDERTRUSTEDSIGNALS = "bidderTrustedSignals"
    SELLERTRUSTEDSIGNALS = "sellerTrustedSignals"


class StorageSharedStorageAccessScope(enum.StrEnum):
    """ Enum of shared storage access scopes. """

    WINDOW = "window"
    SHAREDSTORAGEWORKLET = "sharedStorageWorklet"
    PROTECTEDAUDIENCEWORKLET = "protectedAudienceWorklet"
    HEADER = "header"


class StorageSharedStorageAccessMethod(enum.StrEnum):
    """ Enum of shared storage access methods. """

    ADDMODULE = "addModule"
    CREATEWORKLET = "createWorklet"
    SELECTURL = "selectURL"
    RUN = "run"
    BATCHUPDATE = "batchUpdate"
    SET_ = "set"
    APPEND = "append"
    DELETE = "delete"
    CLEAR = "clear"
    GET = "get"
    KEYS = "keys"
    VALUES = "values"
    ENTRIES = "entries"
    LENGTH = "length"
    REMAININGBUDGET = "remainingBudget"


class StorageSharedStorageEntry(CDPObject):
    """ Struct for a single key-value pair in an origin's shared storage. """

    key: str

    value: str


class StorageSharedStorageMetadata(CDPObject):
    """ Details for an origin's shared storage. """

    # Time when the origin's shared storage was last created.
    creationTime: Network.TimeSinceEpoch

    # Number of key-value pairs stored in origin's shared storage.
    length: int

    # Current amount of bits of entropy remaining in the navigation budget.
    remainingBudget: float

    # Total number of bytes stored as key-value pairs in origin's sharedstorage.
    bytesUsed: int


class StorageSharedStoragePrivateAggregationConfig(CDPObject):
    """ Represents a dictionary object passed in as privateAggregationConfig to
    run or selectURL. """

    # The chosen aggregation service deployment.
    aggregationCoordinatorOrigin: str | None = None

    # The context ID provided.
    contextId: str | None = None

    # Configures the maximum size allowed for filtering IDs.
    filteringIdMaxBytes: int

    # The limit on the number of contributions in the final report.
    maxContributions: int | None = None


class StorageSharedStorageReportingMetadata(CDPObject):
    """ Pair of reporting metadata details for a candidate URL for `selectURL()`. """

    eventType: str

    reportingUrl: str


class StorageSharedStorageUrlWithMetadata(CDPObject):
    """ Bundles a candidate URL with its reporting metadata. """

    # Spec of candidate URL.
    url: str

    # Any associated reporting metadata.
    reportingMetadata: list[Storage.SharedStorageReportingMetadata]


class StorageSharedStorageAccessParams(CDPObject):
    """ Bundles the parameters for shared storage access events whose
    presence/absence can vary according to SharedStorageAccessType. """

    # Spec of the module script URL. Present only forSharedStorageAccessMethods: addModule and createWorklet.
    scriptSourceUrl: str | None = None

    # String denoting "context-origin", "script-origin", or a custom origin tobe used as the worklet's data origin. Present only forSharedStorageAccessMethod: createWorklet.
    dataOrigin: str | None = None

    # Name of the registered operation to be run. Present only forSharedStorageAccessMethods: run and selectURL.
    operationName: str | None = None

    # ID of the operation call. Present only for SharedStorageAccessMethods: runand selectURL.
    operationId: str | None = None

    # Whether or not to keep the worket alive for future run or selectURL calls.Present only for SharedStorageAccessMethods: run and selectURL.
    keepAlive: bool | None = None

    # Configures the private aggregation options. Present only forSharedStorageAccessMethods: run and selectURL.
    privateAggregationConfig: Storage.SharedStoragePrivateAggregationConfig | None = None

    # The operation's serialized data in bytes (converted to a string). Presentonly for SharedStorageAccessMethods: run and selectURL.TODO(crbug.com/401011862): Consider updating this parameter to binary.
    serializedData: str | None = None

    # Array of candidate URLs' specs, along with any associated metadata.Present only for SharedStorageAccessMethod: selectURL.
    urlsWithMetadata: list[Storage.SharedStorageUrlWithMetadata] | None = None

    # Spec of the URN:UUID generated for a selectURL call. Present only forSharedStorageAccessMethod: selectURL.
    urnUuid: str | None = None

    # Key for a specific entry in an origin's shared storage. Present only forSharedStorageAccessMethods: set, append, delete, and get.
    key: str | None = None

    # Value for a specific entry in an origin's shared storage. Present only forSharedStorageAccessMethods: set and append.
    value: str | None = None

    # Whether or not to set an entry for a key if that key is already present.Present only for SharedStorageAccessMethod: set.
    ignoreIfPresent: bool | None = None

    # A number denoting the (0-based) order of the worklet's creation relativeto all other shared storage worklets created by documents using the currentstorage partition. Present only for SharedStorageAccessMethods: addModule,createWorklet.
    workletOrdinal: int | None = None

    # Hex representation of the DevTools token used as the TargetID for theassociated shared storage worklet. Present only for SharedStorageAccessMethods:addModule, createWorklet, run, selectURL, and any otherSharedStorageAccessMethod when the SharedStorageAccessScope issharedStorageWorklet.
    workletTargetId: Target.TargetID | None = None

    # Name of the lock to be acquired, if present. Optionally present only forSharedStorageAccessMethods: batchUpdate, set, append, delete, and clear.
    withLock: str | None = None

    # If the method has been called as part of a batchUpdate, then this numberidentifies the batch to which it belongs. Optionally present only forSharedStorageAccessMethods: batchUpdate (required), set, append, delete, andclear.
    batchUpdateId: str | None = None

    # Number of modifier methods sent in batch. Present only forSharedStorageAccessMethod: batchUpdate.
    batchSize: int | None = None


class StorageStorageBucketsDurability(enum.StrEnum):

    RELAXED = "relaxed"
    STRICT = "strict"


class StorageStorageBucket(CDPObject):

    storageKey: Storage.SerializedStorageKey

    # If not specified, it is the default bucket of the storageKey.
    name: str | None = None


class StorageStorageBucketInfo(CDPObject):

    bucket: Storage.StorageBucket

    id: str

    expiration: Network.TimeSinceEpoch

    # Storage quota (bytes).
    quota: float

    persistent: bool

    durability: Storage.StorageBucketsDurability


class StorageAttributionReportingSourceType(enum.StrEnum):

    NAVIGATION = "navigation"
    EVENT = "event"


StorageUnsignedInt64AsBase10 = str

StorageUnsignedInt128AsBase16 = str

StorageSignedInt64AsBase10 = str


class StorageAttributionReportingFilterDataEntry(CDPObject):

    key: str

    values: list[str]


class StorageAttributionReportingFilterConfig(CDPObject):

    filterValues: list[Storage.AttributionReportingFilterDataEntry]

    # duration in seconds
    lookbackWindow: int | None = None


class StorageAttributionReportingFilterPair(CDPObject):

    filters: list[Storage.AttributionReportingFilterConfig]

    notFilters: list[Storage.AttributionReportingFilterConfig]


class StorageAttributionReportingAggregationKeysEntry(CDPObject):

    key: str

    value: Storage.UnsignedInt128AsBase16


class StorageAttributionReportingEventReportWindows(CDPObject):

    # duration in seconds
    start: int

    # duration in seconds
    ends: list[int]


class StorageAttributionReportingTriggerDataMatching(enum.StrEnum):

    EXACT = "exact"
    MODULUS = "modulus"


class StorageAttributionReportingAggregatableDebugReportingData(CDPObject):

    keyPiece: Storage.UnsignedInt128AsBase16

    # number instead of integer because not all uint32 can be represented by int
    value: float

    types: list[str]


class StorageAttributionReportingAggregatableDebugReportingConfig(CDPObject):

    # number instead of integer because not all uint32 can be represented byint, only present for source registrations
    budget: float | None = None

    keyPiece: Storage.UnsignedInt128AsBase16

    debugData: list[Storage.AttributionReportingAggregatableDebugReportingData]

    aggregationCoordinatorOrigin: str | None = None


class StorageAttributionScopesData(CDPObject):

    values: list[str]

    # number instead of integer because not all uint32 can be represented by int
    limit: float

    maxEventStates: float


class StorageAttributionReportingNamedBudgetDef(CDPObject):

    name: str

    budget: int


class StorageAttributionReportingSourceRegistration(CDPObject):

    time: Network.TimeSinceEpoch

    # duration in seconds
    expiry: int

    # number instead of integer because not all uint32 can be represented by int
    triggerData: list[float]

    eventReportWindows: Storage.AttributionReportingEventReportWindows

    # duration in seconds
    aggregatableReportWindow: int

    type: Storage.AttributionReportingSourceType

    sourceOrigin: str

    reportingOrigin: str

    destinationSites: list[str]

    eventId: Storage.UnsignedInt64AsBase10

    priority: Storage.SignedInt64AsBase10

    filterData: list[Storage.AttributionReportingFilterDataEntry]

    aggregationKeys: list[Storage.AttributionReportingAggregationKeysEntry]

    debugKey: Storage.UnsignedInt64AsBase10 | None = None

    triggerDataMatching: Storage.AttributionReportingTriggerDataMatching

    destinationLimitPriority: Storage.SignedInt64AsBase10

    aggregatableDebugReportingConfig: Storage.AttributionReportingAggregatableDebugReportingConfig

    scopesData: Storage.AttributionScopesData | None = None

    maxEventLevelReports: int

    namedBudgets: list[Storage.AttributionReportingNamedBudgetDef]

    debugReporting: bool

    eventLevelEpsilon: float


class StorageAttributionReportingSourceRegistrationResult(enum.StrEnum):

    SUCCESS = "success"
    INTERNALERROR = "internalError"
    INSUFFICIENTSOURCECAPACITY = "insufficientSourceCapacity"
    INSUFFICIENTUNIQUEDESTINATIONCAPACITY = "insufficientUniqueDestinationCapacity"
    EXCESSIVEREPORTINGORIGINS = "excessiveReportingOrigins"
    PROHIBITEDBYBROWSERPOLICY = "prohibitedByBrowserPolicy"
    SUCCESSNOISED = "successNoised"
    DESTINATIONREPORTINGLIMITREACHED = "destinationReportingLimitReached"
    DESTINATIONGLOBALLIMITREACHED = "destinationGlobalLimitReached"
    DESTINATIONBOTHLIMITSREACHED = "destinationBothLimitsReached"
    REPORTINGORIGINSPERSITELIMITREACHED = "reportingOriginsPerSiteLimitReached"
    EXCEEDSMAXCHANNELCAPACITY = "exceedsMaxChannelCapacity"
    EXCEEDSMAXSCOPESCHANNELCAPACITY = "exceedsMaxScopesChannelCapacity"
    EXCEEDSMAXTRIGGERSTATECARDINALITY = "exceedsMaxTriggerStateCardinality"
    EXCEEDSMAXEVENTSTATESLIMIT = "exceedsMaxEventStatesLimit"
    DESTINATIONPERDAYREPORTINGLIMITREACHED = "destinationPerDayReportingLimitReached"


class StorageAttributionReportingSourceRegistrationTimeConfig(enum.StrEnum):

    INCLUDE = "include"
    EXCLUDE = "exclude"


class StorageAttributionReportingAggregatableValueDictEntry(CDPObject):

    key: str

    # number instead of integer because not all uint32 can be represented by int
    value: float

    filteringId: Storage.UnsignedInt64AsBase10


class StorageAttributionReportingAggregatableValueEntry(CDPObject):

    values: list[Storage.AttributionReportingAggregatableValueDictEntry]

    filters: Storage.AttributionReportingFilterPair


class StorageAttributionReportingEventTriggerData(CDPObject):

    data: Storage.UnsignedInt64AsBase10

    priority: Storage.SignedInt64AsBase10

    dedupKey: Storage.UnsignedInt64AsBase10 | None = None

    filters: Storage.AttributionReportingFilterPair


class StorageAttributionReportingAggregatableTriggerData(CDPObject):

    keyPiece: Storage.UnsignedInt128AsBase16

    sourceKeys: list[str]

    filters: Storage.AttributionReportingFilterPair


class StorageAttributionReportingAggregatableDedupKey(CDPObject):

    dedupKey: Storage.UnsignedInt64AsBase10 | None = None

    filters: Storage.AttributionReportingFilterPair


class StorageAttributionReportingNamedBudgetCandidate(CDPObject):

    name: str | None = None

    filters: Storage.AttributionReportingFilterPair


class StorageAttributionReportingTriggerRegistration(CDPObject):

    filters: Storage.AttributionReportingFilterPair

    debugKey: Storage.UnsignedInt64AsBase10 | None = None

    aggregatableDedupKeys: list[Storage.AttributionReportingAggregatableDedupKey]

    eventTriggerData: list[Storage.AttributionReportingEventTriggerData]

    aggregatableTriggerData: list[Storage.AttributionReportingAggregatableTriggerData]

    aggregatableValues: list[Storage.AttributionReportingAggregatableValueEntry]

    aggregatableFilteringIdMaxBytes: int

    debugReporting: bool

    aggregationCoordinatorOrigin: str | None = None

    sourceRegistrationTimeConfig: Storage.AttributionReportingSourceRegistrationTimeConfig

    triggerContextId: str | None = None

    aggregatableDebugReportingConfig: Storage.AttributionReportingAggregatableDebugReportingConfig

    scopes: list[str]

    namedBudgets: list[Storage.AttributionReportingNamedBudgetCandidate]


class StorageAttributionReportingEventLevelResult(enum.StrEnum):

    SUCCESS = "success"
    SUCCESSDROPPEDLOWERPRIORITY = "successDroppedLowerPriority"
    INTERNALERROR = "internalError"
    NOCAPACITYFORATTRIBUTIONDESTINATION = "noCapacityForAttributionDestination"
    NOMATCHINGSOURCES = "noMatchingSources"
    DEDUPLICATED = "deduplicated"
    EXCESSIVEATTRIBUTIONS = "excessiveAttributions"
    PRIORITYTOOLOW = "priorityTooLow"
    NEVERATTRIBUTEDSOURCE = "neverAttributedSource"
    EXCESSIVEREPORTINGORIGINS = "excessiveReportingOrigins"
    NOMATCHINGSOURCEFILTERDATA = "noMatchingSourceFilterData"
    PROHIBITEDBYBROWSERPOLICY = "prohibitedByBrowserPolicy"
    NOMATCHINGCONFIGURATIONS = "noMatchingConfigurations"
    EXCESSIVEREPORTS = "excessiveReports"
    FALSELYATTRIBUTEDSOURCE = "falselyAttributedSource"
    REPORTWINDOWPASSED = "reportWindowPassed"
    NOTREGISTERED = "notRegistered"
    REPORTWINDOWNOTSTARTED = "reportWindowNotStarted"
    NOMATCHINGTRIGGERDATA = "noMatchingTriggerData"


class StorageAttributionReportingAggregatableResult(enum.StrEnum):

    SUCCESS = "success"
    INTERNALERROR = "internalError"
    NOCAPACITYFORATTRIBUTIONDESTINATION = "noCapacityForAttributionDestination"
    NOMATCHINGSOURCES = "noMatchingSources"
    EXCESSIVEATTRIBUTIONS = "excessiveAttributions"
    EXCESSIVEREPORTINGORIGINS = "excessiveReportingOrigins"
    NOHISTOGRAMS = "noHistograms"
    INSUFFICIENTBUDGET = "insufficientBudget"
    INSUFFICIENTNAMEDBUDGET = "insufficientNamedBudget"
    NOMATCHINGSOURCEFILTERDATA = "noMatchingSourceFilterData"
    NOTREGISTERED = "notRegistered"
    PROHIBITEDBYBROWSERPOLICY = "prohibitedByBrowserPolicy"
    DEDUPLICATED = "deduplicated"
    REPORTWINDOWPASSED = "reportWindowPassed"
    EXCESSIVEREPORTS = "excessiveReports"


class StorageAttributionReportingReportResult(enum.StrEnum):

    SENT = "sent"
    PROHIBITED = "prohibited"
    FAILEDTOASSEMBLE = "failedToAssemble"
    EXPIRED = "expired"


class StorageRelatedWebsiteSet(CDPObject):
    """ A single Related Website Set object. """

    # The primary site of this set, along with the ccTLDs if there is any.
    primarySites: list[str]

    # The associated sites of this set, along with the ccTLDs if there is any.
    associatedSites: list[str]

    # The service sites of this set, along with the ccTLDs if there is any.
    serviceSites: list[str]


class SystemInfoGPUDevice(CDPObject):
    """ Describes a single graphics processor (GPU). """

    # PCI ID of the GPU vendor, if available; 0 otherwise.
    vendorId: float

    # PCI ID of the GPU device, if available; 0 otherwise.
    deviceId: float

    # Sub sys ID of the GPU, only available on Windows.
    subSysId: float | None = None

    # Revision of the GPU, only available on Windows.
    revision: float | None = None

    # String description of the GPU vendor, if the PCI ID is not available.
    vendorString: str

    # String description of the GPU device, if the PCI ID is not available.
    deviceString: str

    # String description of the GPU driver vendor.
    driverVendor: str

    # String description of the GPU driver version.
    driverVersion: str


class SystemInfoSize(CDPObject):
    """ Describes the width and height dimensions of an entity. """

    # Width in pixels.
    width: int

    # Height in pixels.
    height: int


class SystemInfoVideoDecodeAcceleratorCapability(CDPObject):
    """ Describes a supported video decoding profile with its associated minimum and
    maximum resolutions. """

    # Video codec profile that is supported, e.g. VP9 Profile 2.
    profile: str

    # Maximum video dimensions in pixels supported for this |profile|.
    maxResolution: SystemInfo.Size

    # Minimum video dimensions in pixels supported for this |profile|.
    minResolution: SystemInfo.Size


class SystemInfoVideoEncodeAcceleratorCapability(CDPObject):
    """ Describes a supported video encoding profile with its associated maximum
    resolution and maximum framerate. """

    # Video codec profile that is supported, e.g H264 Main.
    profile: str

    # Maximum video dimensions in pixels supported for this |profile|.
    maxResolution: SystemInfo.Size

    # Maximum encoding framerate in frames per second supported for this|profile|, as fraction's numerator and denominator, e.g. 24/1 fps, 24000/1001fps, etc.
    maxFramerateNumerator: int

    maxFramerateDenominator: int


class SystemInfoSubsamplingFormat(enum.StrEnum):
    """ YUV subsampling type of the pixels of a given image. """

    YUV420 = "yuv420"
    YUV422 = "yuv422"
    YUV444 = "yuv444"


class SystemInfoImageType(enum.StrEnum):
    """ Image format of a given image. """

    JPEG = "jpeg"
    WEBP = "webp"
    UNKNOWN = "unknown"


class SystemInfoGPUInfo(CDPObject):
    """ Provides information about the GPU(s) on the system. """

    # The graphics devices on the system. Element 0 is the primary GPU.
    devices: list[SystemInfo.GPUDevice]

    # An optional dictionary of additional GPU related attributes.
    auxAttributes: JSON_DICT | None = None

    # An optional dictionary of graphics features and their status.
    featureStatus: JSON_DICT | None = None

    # An optional array of GPU driver bug workarounds.
    driverBugWorkarounds: list[str]

    # Supported accelerated video decoding capabilities.
    videoDecoding: list[SystemInfo.VideoDecodeAcceleratorCapability]

    # Supported accelerated video encoding capabilities.
    videoEncoding: list[SystemInfo.VideoEncodeAcceleratorCapability]


class SystemInfoProcessInfo(CDPObject):
    """ Represents process info. """

    # Specifies process type.
    type: str

    # Specifies process id.
    id: int

    # Specifies cumulative CPU usage in seconds across all threads of theprocess since the process start.
    cpuTime: float


TargetTargetID = str
""" Unique identifier of attached debugging session. """

TargetSessionID = str


class TargetTargetInfo(CDPObject):

    targetId: Target.TargetID

    # List of types: https://source.chromium.org/chromium/chromium/src/+/main:content/browser/devtools/devtools_agent_host_impl.cc?ss=chromium&q=f:devtools%20-f:out%20%22::kTypeTab%5B%5D%22
    type: str

    title: str

    url: str

    # Whether the target has an attached client.
    attached: bool

    # Opener target Id
    openerId: Target.TargetID | None = None

    # Whether the target has access to the originating window.
    canAccessOpener: bool | None = None  # experimental

    # Frame id of originating window (is only set if target has an opener).
    openerFrameId: Page.FrameId | None = None  # experimental

    # Id of the parent frame, only present for the "iframe" targets.
    parentFrameId: Page.FrameId | None = None  # experimental

    browserContextId: Browser.BrowserContextID | None = None  # experimental

    # Provides additional details for specific target types. For example, forthe type of "page", this may be set to "prerender".
    subtype: str | None = None  # experimental


class TargetFilterEntry(CDPObject):
    """ A filter used by target query/discovery/auto-attach operations. """

    # If set, causes exclusion of matching targets from the list.
    exclude: bool | None = None

    # If not present, matches any type.
    type: str | None = None


""" The entries in TargetFilter are matched sequentially against targets and
the first entry that matches determines if the target is included or not,
depending on the value of `exclude` field in the entry.
If filter is not specified, the one assumed is
[{type: "browser", exclude: true}, {type: "tab", exclude: true}, {}]
(i.e. include everything but `browser` and `tab`). """

TargetTargetFilter = list[TargetFilterEntry]


class TargetRemoteLocation(CDPObject):

    host: str

    port: int


class TargetWindowState(enum.StrEnum):
    """ The state of the target window. """

    NORMAL = "normal"
    MINIMIZED = "minimized"
    MAXIMIZED = "maximized"
    FULLSCREEN = "fullscreen"


""" Configuration for memory dump. Used only when "memory-infra" category is enabled. """

TracingMemoryDumpConfig = JSON_DICT


class TracingTraceConfig(CDPObject):

    # Controls how the trace buffer stores data. The default is`recordUntilFull`.
    recordMode: Literal['recordUntilFull', 'recordContinuously', 'recordAsMuchAsPossible', 'echoToConsole'] | None = None  # experimental

    # Size of the trace buffer in kilobytes. If not specified or zero is passed,a default value of 200 MB would be used.
    traceBufferSizeInKb: float | None = None  # experimental

    # Turns on JavaScript stack sampling.
    enableSampling: bool | None = None  # experimental

    # Turns on system tracing.
    enableSystrace: bool | None = None  # experimental

    # Turns on argument filter.
    enableArgumentFilter: bool | None = None  # experimental

    # Included category filters.
    includedCategories: list[str] | None = None

    # Excluded category filters.
    excludedCategories: list[str] | None = None

    # Configuration to synthesize the delays in tracing.
    syntheticDelays: list[str] | None = None  # experimental

    # Configuration for memory dump triggers. Used only when "memory-infra"category is enabled.
    memoryDumpConfig: Tracing.MemoryDumpConfig | None = None  # experimental


class TracingStreamFormat(enum.StrEnum):
    """ Data format of a trace. Can be either the legacy JSON format or the
    protocol buffer format. Note that the JSON format will be deprecated soon. """

    JSON = "json"
    PROTO = "proto"


class TracingStreamCompression(enum.StrEnum):
    """ Compression type to use for traces returned via streams. """

    NONE = "none"
    GZIP = "gzip"


class TracingMemoryDumpLevelOfDetail(enum.StrEnum):
    """ Details exposed when memory request explicitly declared.
    Keep consistent with memory_dump_request_args.h and
    memory_instrumentation.mojom """

    BACKGROUND = "background"
    LIGHT = "light"
    DETAILED = "detailed"


class TracingTracingBackend(enum.StrEnum):
    """ Backend type to use for tracing. `chrome` uses the Chrome-integrated
    tracing service and is supported on all platforms. `system` is only
    supported on Chrome OS and uses the Perfetto system tracing service.
    `auto` chooses `system` when the perfettoConfig provided to Tracing.start
    specifies at least one non-Chrome data source; otherwise uses `chrome`. """

    AUTO = "auto"
    CHROME = "chrome"
    SYSTEM = "system"


""" An unique ID for a graph object (AudioContext, AudioNode, AudioParam) in Web Audio API """

WebAudioGraphObjectId = str


class WebAudioContextType(enum.StrEnum):
    """ Enum of BaseAudioContext types """

    REALTIME = "realtime"
    OFFLINE = "offline"


class WebAudioContextState(enum.StrEnum):
    """ Enum of AudioContextState from the spec """

    SUSPENDED = "suspended"
    RUNNING = "running"
    CLOSED = "closed"
    INTERRUPTED = "interrupted"


""" Enum of AudioNode types """

WebAudioNodeType = str


class WebAudioChannelCountMode(enum.StrEnum):
    """ Enum of AudioNode::ChannelCountMode from the spec """

    CLAMPED_MAX = "clamped-max"
    EXPLICIT = "explicit"
    MAX_ = "max"


class WebAudioChannelInterpretation(enum.StrEnum):
    """ Enum of AudioNode::ChannelInterpretation from the spec """

    DISCRETE = "discrete"
    SPEAKERS = "speakers"


""" Enum of AudioParam types """

WebAudioParamType = str


class WebAudioAutomationRate(enum.StrEnum):
    """ Enum of AudioParam::AutomationRate from the spec """

    A_RATE = "a-rate"
    K_RATE = "k-rate"


class WebAudioContextRealtimeData(CDPObject):
    """ Fields in AudioContext that change in real-time. """

    # The current context time in second in BaseAudioContext.
    currentTime: float

    # The time spent on rendering graph divided by render quantum duration, andmultiplied by 100. 100 means the audio renderer reached the full capacity andglitch may occur.
    renderCapacity: float

    # A running mean of callback interval.
    callbackIntervalMean: float

    # A running variance of callback interval.
    callbackIntervalVariance: float


class WebAudioBaseAudioContext(CDPObject):
    """ Protocol object for BaseAudioContext """

    contextId: WebAudio.GraphObjectId

    contextType: WebAudio.ContextType

    contextState: WebAudio.ContextState

    realtimeData: WebAudio.ContextRealtimeData | None = None

    # Platform-dependent callback buffer size.
    callbackBufferSize: float

    # Number of output channels supported by audio hardware in use.
    maxOutputChannelCount: float

    # Context sample rate.
    sampleRate: float


class WebAudioAudioListener(CDPObject):
    """ Protocol object for AudioListener """

    listenerId: WebAudio.GraphObjectId

    contextId: WebAudio.GraphObjectId


class WebAudioAudioNode(CDPObject):
    """ Protocol object for AudioNode """

    nodeId: WebAudio.GraphObjectId

    contextId: WebAudio.GraphObjectId

    nodeType: WebAudio.NodeType

    numberOfInputs: float

    numberOfOutputs: float

    channelCount: float

    channelCountMode: WebAudio.ChannelCountMode

    channelInterpretation: WebAudio.ChannelInterpretation


class WebAudioAudioParam(CDPObject):
    """ Protocol object for AudioParam """

    paramId: WebAudio.GraphObjectId

    nodeId: WebAudio.GraphObjectId

    contextId: WebAudio.GraphObjectId

    paramType: WebAudio.ParamType

    rate: WebAudio.AutomationRate

    defaultValue: float

    minValue: float

    maxValue: float


WebAuthnAuthenticatorId = str


class WebAuthnAuthenticatorProtocol(enum.StrEnum):

    U2F = "u2f"
    CTAP2 = "ctap2"


class WebAuthnCtap2Version(enum.StrEnum):

    CTAP2_0 = "ctap2_0"
    CTAP2_1 = "ctap2_1"


class WebAuthnAuthenticatorTransport(enum.StrEnum):

    USB = "usb"
    NFC = "nfc"
    BLE = "ble"
    CABLE = "cable"
    INTERNAL = "internal"


class WebAuthnVirtualAuthenticatorOptions(CDPObject):

    protocol: WebAuthn.AuthenticatorProtocol

    # Defaults to ctap2_0. Ignored if |protocol| == u2f.
    ctap2Version: WebAuthn.Ctap2Version | None = None

    transport: WebAuthn.AuthenticatorTransport

    # Defaults to false.
    hasResidentKey: bool | None = None

    # Defaults to false.
    hasUserVerification: bool | None = None

    # If set to true, the authenticator will support the largeBlob extension.https://w3c.github.io/webauthn#largeBlob Defaults to false.
    hasLargeBlob: bool | None = None

    # If set to true, the authenticator will support the credBlob extension.https://fidoalliance.org/specs/fido-v2.1-rd-20201208/fido-client-to-authenticator-protocol-v2.1-rd-20201208.html#sctn-credBlob-extension Defaults tofalse.
    hasCredBlob: bool | None = None

    # If set to true, the authenticator will support the minPinLength extension.https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-20210615.html#sctn-minpinlength-extensionDefaults to false.
    hasMinPinLength: bool | None = None

    # If set to true, the authenticator will support the prf extension.https://w3c.github.io/webauthn/#prf-extension Defaults to false.
    hasPrf: bool | None = None

    # If set to true, tests of user presence will succeed immediately.Otherwise, they will not be resolved. Defaults to true.
    automaticPresenceSimulation: bool | None = None

    # Sets whether User Verification succeeds or fails for an authenticator.Defaults to false.
    isUserVerified: bool | None = None

    # Credentials created by this authenticator will have the backup eligibility(BE) flag set to this value. Defaults to false.https://w3c.github.io/webauthn/#sctn-credential-backup
    defaultBackupEligibility: bool | None = None

    # Credentials created by this authenticator will have the backup state (BS)flag set to this value. Defaults to false. https://w3c.github.io/webauthn/#sctn-credential-backup
    defaultBackupState: bool | None = None


class WebAuthnCredential(CDPObject):

    credentialId: str

    isResidentCredential: bool

    # Relying Party ID the credential is scoped to. Must be set when adding acredential.
    rpId: str | None = None

    # The ECDSA P-256 private key in PKCS#8 format. (Encoded as a base64 stringwhen passed over JSON)
    privateKey: str

    # An opaque byte sequence with a maximum size of 64 bytes mapping thecredential to a specific user. (Encoded as a base64 string when passed overJSON)
    userHandle: str | None = None

    # Signature counter. This is incremented by one for each successfulassertion. See https://w3c.github.io/webauthn/#signature-counter
    signCount: int

    # The large blob associated with the credential. Seehttps://w3c.github.io/webauthn/#sctn-large-blob-extension (Encoded as a base64string when passed over JSON)
    largeBlob: str | None = None

    # Assertions returned by this credential will have the backup eligibility(BE) flag set to this value. Defaults to the authenticator'sdefaultBackupEligibility value.
    backupEligibility: bool | None = None

    # Assertions returned by this credential will have the backup state (BS)flag set to this value. Defaults to the authenticator's defaultBackupStatevalue.
    backupState: bool | None = None

    # The credential's user.name property. Equivalent to empty if not set.https://w3c.github.io/webauthn/#dom-publickeycredentialentity-name
    userName: str | None = None

    # The credential's user.displayName property. Equivalent to empty if notset. https://w3c.github.io/webauthn/#dom-publickeycredentialuserentity-displayname
    userDisplayName: str | None = None


class ConsoleConsoleMessage(CDPObject):
    """ Console message. """

    # Message source.
    source: Literal['xml', 'javascript', 'network', 'console-api', 'storage', 'appcache', 'rendering', 'security', 'other', 'deprecation', 'worker']

    # Message severity.
    level: Literal['log', 'warning', 'error', 'debug', 'info']

    # Message text.
    text: str

    # URL of the message origin.
    url: str | None = None

    # Line number in the resource that generated this message (1-based).
    line: int | None = None

    # Column number in the resource that generated this message (1-based).
    column: int | None = None


""" Breakpoint identifier. """

DebuggerBreakpointId = str
""" Call frame identifier. """

DebuggerCallFrameId = str


class DebuggerLocation(CDPObject):
    """ Location in the source code. """

    # Script identifier as reported in the `Debugger.scriptParsed`.
    scriptId: Runtime.ScriptId

    # Line number in the script (0-based).
    lineNumber: int

    # Column number in the script (0-based).
    columnNumber: int | None = None


class DebuggerScriptPosition(CDPObject):
    """ Location in the source code. """

    lineNumber: int

    columnNumber: int


class DebuggerLocationRange(CDPObject):
    """ Location range within one script. """

    scriptId: Runtime.ScriptId

    start: Debugger.ScriptPosition

    end: Debugger.ScriptPosition


class DebuggerCallFrame(CDPObject):
    """ JavaScript call frame. Array of call frames form the call stack. """

    # Call frame identifier. This identifier is only valid while the virtualmachine is paused.
    callFrameId: Debugger.CallFrameId

    # Name of the JavaScript function called on this call frame.
    functionName: str

    # Location in the source code.
    functionLocation: Debugger.Location | None = None

    # Location in the source code.
    location: Debugger.Location

    # JavaScript script name or url. Deprecated in favor of using the`location.scriptId` to resolve the URL via a previously sent`Debugger.scriptParsed` event.
    url: str  # deprecated

    # Scope chain for this call frame.
    scopeChain: list[Debugger.Scope]

    # `this` object for this call frame.
    this: Runtime.RemoteObject

    # The value being returned, if the function is at return point.
    returnValue: Runtime.RemoteObject | None = None

    # Valid only while the VM is paused and indicates whether this frame can berestarted or not. Note that a `true` value here does not guarantee thatDebugger#restartFrame with this CallFrameId will be successful, but it is verylikely.
    canBeRestarted: bool | None = None  # experimental


class DebuggerScope(CDPObject):
    """ Scope description. """

    # Scope type.
    type: Literal['global', 'local', 'with', 'closure', 'catch', 'block', 'script', 'eval', 'module', 'wasm-expression-stack']

    # Object representing the scope. For `global` and `with` scopes itrepresents the actual object; for the rest of the scopes, it is artificialtransient object enumerating scope variables as its properties.
    object: Runtime.RemoteObject

    name: str | None = None

    # Location in the source code where scope starts
    startLocation: Debugger.Location | None = None

    # Location in the source code where scope ends
    endLocation: Debugger.Location | None = None


class DebuggerSearchMatch(CDPObject):
    """ Search match for resource. """

    # Line number in resource content.
    lineNumber: float

    # Line with match content.
    lineContent: str


class DebuggerBreakLocation(CDPObject):

    # Script identifier as reported in the `Debugger.scriptParsed`.
    scriptId: Runtime.ScriptId

    # Line number in the script (0-based).
    lineNumber: int

    # Column number in the script (0-based).
    columnNumber: int | None = None

    type: Literal['debuggerStatement', 'call', 'return'] | None = None


class DebuggerWasmDisassemblyChunk(CDPObject):

    # The next chunk of disassembled lines.
    lines: list[str]

    # The bytecode offsets describing the start of each line.
    bytecodeOffsets: list[int]


class DebuggerScriptLanguage(enum.StrEnum):
    """ Enum of possible script languages. """

    JAVASCRIPT = "JavaScript"
    WEBASSEMBLY = "WebAssembly"


class DebuggerDebugSymbols(CDPObject):
    """ Debug symbols available for a wasm script. """

    # Type of the debug symbols.
    type: Literal['SourceMap', 'EmbeddedDWARF', 'ExternalDWARF']

    # URL of the external symbol source.
    externalURL: str | None = None


class DebuggerResolvedBreakpoint(CDPObject):

    # Breakpoint unique identifier.
    breakpointId: Debugger.BreakpointId

    # Actual breakpoint location.
    location: Debugger.Location


""" Heap snapshot object id. """

HeapProfilerHeapSnapshotObjectId = str


class HeapProfilerSamplingHeapProfileNode(CDPObject):
    """ Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes. """

    # Function location.
    callFrame: Runtime.CallFrame

    # Allocations size in bytes for the node excluding children.
    selfSize: float

    # Node id. Ids are unique across all profiles collected betweenstartSampling and stopSampling.
    id: int

    # Child nodes.
    children: list[HeapProfiler.SamplingHeapProfileNode]


class HeapProfilerSamplingHeapProfileSample(CDPObject):
    """ A single sample from a sampling profile. """

    # Allocation size in bytes attributed to the sample.
    size: float

    # Id of the corresponding profile tree node.
    nodeId: int

    # Time-ordered sample ordinal number. It is unique across all profilesretrieved between startSampling and stopSampling.
    ordinal: float


class HeapProfilerSamplingHeapProfile(CDPObject):
    """ Sampling profile. """

    head: HeapProfiler.SamplingHeapProfileNode

    samples: list[HeapProfiler.SamplingHeapProfileSample]


class ProfilerProfileNode(CDPObject):
    """ Profile node. Holds callsite information, execution statistics and child nodes. """

    # Unique id of the node.
    id: int

    # Function location.
    callFrame: Runtime.CallFrame

    # Number of samples where this node was on top of the call stack.
    hitCount: int | None = None

    # Child node ids.
    children: list[int] | None = None

    # The reason of being not optimized. The function may be deoptimized ormarked as don't optimize.
    deoptReason: str | None = None

    # An array of source position ticks.
    positionTicks: list[Profiler.PositionTickInfo] | None = None


class ProfilerProfile(CDPObject):
    """ Profile. """

    # The list of profile nodes. First item is the root node.
    nodes: list[Profiler.ProfileNode]

    # Profiling start timestamp in microseconds.
    startTime: float

    # Profiling end timestamp in microseconds.
    endTime: float

    # Ids of samples top nodes.
    samples: list[int] | None = None

    # Time intervals between adjacent samples in microseconds. The first deltais relative to the profile startTime.
    timeDeltas: list[int] | None = None


class ProfilerPositionTickInfo(CDPObject):
    """ Specifies a number of samples attributed to a certain source position. """

    # Source line number (1-based).
    line: int

    # Number of samples attributed to the source line.
    ticks: int


class ProfilerCoverageRange(CDPObject):
    """ Coverage data for a source range. """

    # JavaScript script source offset for the range start.
    startOffset: int

    # JavaScript script source offset for the range end.
    endOffset: int

    # Collected execution count of the source range.
    count: int


class ProfilerFunctionCoverage(CDPObject):
    """ Coverage data for a JavaScript function. """

    # JavaScript function name.
    functionName: str

    # Source ranges inside the function with coverage data.
    ranges: list[Profiler.CoverageRange]

    # Whether coverage data for this function has block granularity.
    isBlockCoverage: bool


class ProfilerScriptCoverage(CDPObject):
    """ Coverage data for a JavaScript script. """

    # JavaScript script id.
    scriptId: Runtime.ScriptId

    # JavaScript script name or url.
    url: str

    # Functions contained in the script that has coverage data.
    functions: list[Profiler.FunctionCoverage]


""" Unique script identifier. """

RuntimeScriptId = str


class RuntimeSerializationOptions(CDPObject):
    """ Represents options for serialization. Overrides `generatePreview` and `returnByValue`. """

    serialization: Literal['deep', 'json', 'idOnly']

    # Deep serialization depth. Default is full depth. Respected only in `deep`serialization mode.
    maxDepth: int | None = None

    # Embedder-specific parameters. For example if connected to V8 in Chromethese control DOM serialization via `maxNodeDepth: integer` and`includeShadowTree: "none" | "open" | "all"`. Values can be only of type stringor integer.
    additionalParameters: JSON_DICT | None = None


class RuntimeDeepSerializedValue(CDPObject):
    """ Represents deep serialized value. """

    type: Literal['undefined', 'null', 'string', 'number', 'boolean', 'bigint', 'regexp', 'date', 'symbol', 'array', 'object', 'function', 'map', 'set', 'weakmap', 'weakset', 'error', 'proxy', 'promise', 'typedarray', 'arraybuffer', 'node', 'window', 'generator']

    value: Any = None

    objectId: str | None = None

    # Set if value reference met more then once during serialization. In suchcase, value is provided only to one of the serialized values. Unique per valuein the scope of one CDP call.
    weakLocalObjectReference: int | None = None


""" Unique object identifier. """

RuntimeRemoteObjectId = str
""" Primitive value which cannot be JSON-stringified. Includes values `-0`, `NaN`, `Infinity`,
`-Infinity`, and bigint literals. """

RuntimeUnserializableValue = str


class RuntimeRemoteObject(CDPObject):
    """ Mirror object referencing original JavaScript object. """

    # Object type.
    type: Literal['object', 'function', 'undefined', 'string', 'number', 'boolean', 'symbol', 'bigint']

    # Object subtype hint. Specified for `object` type values only. NOTE: If youchange anything here, make sure to also update `subtype` in `ObjectPreview` and`PropertyPreview` below.
    subtype: Literal['array', 'null', 'node', 'regexp', 'date', 'map', 'set', 'weakmap', 'weakset', 'iterator', 'generator', 'error', 'proxy', 'promise', 'typedarray', 'arraybuffer', 'dataview', 'webassemblymemory', 'wasmvalue', 'trustedtype'] | None = None

    # Object class (constructor) name. Specified for `object` type values only.
    className: str | None = None

    # Remote object value in case of primitive values or JSON values (if it wasrequested).
    value: Any = None

    # Primitive value which can not be JSON-stringified does not have `value`,but gets this property.
    unserializableValue: Runtime.UnserializableValue | None = None

    # String representation of the object.
    description: str | None = None

    # Deep serialized value.
    deepSerializedValue: Runtime.DeepSerializedValue | None = None  # experimental

    # Unique object identifier (for non-primitive values).
    objectId: Runtime.RemoteObjectId | None = None

    # Preview containing abbreviated property values. Specified for `object`type values only.
    preview: Runtime.ObjectPreview | None = None  # experimental

    customPreview: Runtime.CustomPreview | None = None  # experimental


class RuntimeCustomPreview(CDPObject):

    # The JSON-stringified result of formatter.header(object, config) call. Itcontains json ML array that represents RemoteObject.
    header: str

    # If formatter returns true as a result of formatter.hasBody call thenbodyGetterId will contain RemoteObjectId for the function that returns result offormatter.body(object, config) call. The result value is json ML array.
    bodyGetterId: Runtime.RemoteObjectId | None = None


class RuntimeObjectPreview(CDPObject):
    """ Object containing abbreviated remote object value. """

    # Object type.
    type: Literal['object', 'function', 'undefined', 'string', 'number', 'boolean', 'symbol', 'bigint']

    # Object subtype hint. Specified for `object` type values only.
    subtype: Literal['array', 'null', 'node', 'regexp', 'date', 'map', 'set', 'weakmap', 'weakset', 'iterator', 'generator', 'error', 'proxy', 'promise', 'typedarray', 'arraybuffer', 'dataview', 'webassemblymemory', 'wasmvalue', 'trustedtype'] | None = None

    # String representation of the object.
    description: str | None = None

    # True iff some of the properties or entries of the original object did notfit.
    overflow: bool

    # List of the properties.
    properties: list[Runtime.PropertyPreview]

    # List of the entries. Specified for `map` and `set` subtype values only.
    entries: list[Runtime.EntryPreview] | None = None


class RuntimePropertyPreview(CDPObject):

    # Property name.
    name: str

    # Object type. Accessor means that the property itself is an accessorproperty.
    type: Literal['object', 'function', 'undefined', 'string', 'number', 'boolean', 'symbol', 'accessor', 'bigint']

    # User-friendly property value string.
    value: str | None = None

    # Nested value preview.
    valuePreview: Runtime.ObjectPreview | None = None

    # Object subtype hint. Specified for `object` type values only.
    subtype: Literal['array', 'null', 'node', 'regexp', 'date', 'map', 'set', 'weakmap', 'weakset', 'iterator', 'generator', 'error', 'proxy', 'promise', 'typedarray', 'arraybuffer', 'dataview', 'webassemblymemory', 'wasmvalue', 'trustedtype'] | None = None


class RuntimeEntryPreview(CDPObject):

    # Preview of the key. Specified for map-like collection entries.
    key: Runtime.ObjectPreview | None = None

    # Preview of the value.
    value: Runtime.ObjectPreview


class RuntimePropertyDescriptor(CDPObject):
    """ Object property descriptor. """

    # Property name or symbol description.
    name: str

    # The value associated with the property.
    value: Runtime.RemoteObject | None = None

    # True if the value associated with the property may be changed (datadescriptors only).
    writable: bool | None = None

    # A function which serves as a getter for the property, or `undefined` ifthere is no getter (accessor descriptors only).
    get: Runtime.RemoteObject | None = None

    # A function which serves as a setter for the property, or `undefined` ifthere is no setter (accessor descriptors only).
    set: Runtime.RemoteObject | None = None

    # True if the type of this property descriptor may be changed and if theproperty may be deleted from the corresponding object.
    configurable: bool

    # True if this property shows up during enumeration of the properties on thecorresponding object.
    enumerable: bool

    # True if the result was thrown during the evaluation.
    wasThrown: bool | None = None

    # True if the property is owned for the object.
    isOwn: bool | None = None

    # Property symbol object, if the property is of the `symbol` type.
    symbol: Runtime.RemoteObject | None = None


class RuntimeInternalPropertyDescriptor(CDPObject):
    """ Object internal property descriptor. This property isn't normally visible in JavaScript code. """

    # Conventional property name.
    name: str

    # The value associated with the property.
    value: Runtime.RemoteObject | None = None


class RuntimePrivatePropertyDescriptor(CDPObject):
    """ Object private field descriptor. """

    # Private property name.
    name: str

    # The value associated with the private property.
    value: Runtime.RemoteObject | None = None

    # A function which serves as a getter for the private property, or`undefined` if there is no getter (accessor descriptors only).
    get: Runtime.RemoteObject | None = None

    # A function which serves as a setter for the private property, or`undefined` if there is no setter (accessor descriptors only).
    set: Runtime.RemoteObject | None = None


class RuntimeCallArgument(CDPObject):
    """ Represents function call argument. Either remote object id `objectId`, primitive `value`,
    unserializable primitive value or neither of (for undefined) them should be specified. """

    # Primitive value or serializable javascript object.
    value: Any = None

    # Primitive value which can not be JSON-stringified.
    unserializableValue: Runtime.UnserializableValue | None = None

    # Remote object handle.
    objectId: Runtime.RemoteObjectId | None = None


""" Id of an execution context. """

RuntimeExecutionContextId = int


class RuntimeExecutionContextDescription(CDPObject):
    """ Description of an isolated world. """

    # Unique id of the execution context. It can be used to specify in whichexecution context script evaluation should be performed.
    id: Runtime.ExecutionContextId

    # Execution context origin.
    origin: str

    # Human readable name describing given context.
    name: str

    # A system-unique execution context identifier. Unlike the id, this isunique across multiple processes, so can be reliably used to identify specificcontext while backend performs a cross-process navigation.
    uniqueId: str | None = None  # experimental

    # Embedder-specific auxiliary data likely matching {isDefault: boolean,type: 'default'|'isolated'|'worker', frameId: string}
    auxData: JSON_DICT | None = None


class RuntimeExceptionDetails(CDPObject):
    """ Detailed information about exception (or error) that was thrown during script compilation or
    execution. """

    # Exception id.
    exceptionId: int

    # Exception text, which should be used together with exception object whenavailable.
    text: str

    # Line number of the exception location (0-based).
    lineNumber: int

    # Column number of the exception location (0-based).
    columnNumber: int

    # Script ID of the exception location.
    scriptId: Runtime.ScriptId | None = None

    # URL of the exception location, to be used when the script was notreported.
    url: str | None = None

    # JavaScript stack trace if available.
    stackTrace: Runtime.StackTrace | None = None

    # Exception object if available.
    exception: Runtime.RemoteObject | None = None

    # Identifier of the context where exception happened.
    executionContextId: Runtime.ExecutionContextId | None = None

    # Dictionary with entries of meta data that the client associated with thisexception, such as information about associated network requests, etc.
    exceptionMetaData: JSON_DICT | None = None  # experimental


""" Number of milliseconds since epoch. """

RuntimeTimestamp = float
""" Number of milliseconds. """

RuntimeTimeDelta = float


class RuntimeCallFrame(CDPObject):
    """ Stack entry for runtime errors and assertions. """

    # JavaScript function name.
    functionName: str

    # JavaScript script id.
    scriptId: Runtime.ScriptId

    # JavaScript script name or url.
    url: str

    # JavaScript script line number (0-based).
    lineNumber: int

    # JavaScript script column number (0-based).
    columnNumber: int


class RuntimeStackTrace(CDPObject):
    """ Call frames for assertions or error messages. """

    # String label of this stack trace. For async traces this may be a name ofthe function that initiated the async call.
    description: str | None = None

    # JavaScript function name.
    callFrames: list[Runtime.CallFrame]

    # Asynchronous JavaScript stack trace that preceded this stack, ifavailable.
    parent: Runtime.StackTrace | None = None

    # Asynchronous JavaScript stack trace that preceded this stack, ifavailable.
    parentId: Runtime.StackTraceId | None = None  # experimental


""" Unique identifier of current debugger. """

RuntimeUniqueDebuggerId = str


class RuntimeStackTraceId(CDPObject):
    """ If `debuggerId` is set stack trace comes from another debugger and can be resolved there. This
    allows to track cross-debugger calls. See `Runtime.StackTrace` and `Debugger.paused` for usages. """

    id: str

    debuggerId: Runtime.UniqueDebuggerId | None = None


class SchemaDomain(CDPObject):
    """ Description of the protocol domain. """

    # Domain name.
    name: str

    # Domain version.
    version: str


class Accessibility:

    AXNodeId = AccessibilityAXNodeId
    AXValueType = AccessibilityAXValueType
    AXValueSourceType = AccessibilityAXValueSourceType
    AXValueNativeSourceType = AccessibilityAXValueNativeSourceType
    AXValueSource = AccessibilityAXValueSource
    AXRelatedNode = AccessibilityAXRelatedNode
    AXProperty = AccessibilityAXProperty
    AXValue = AccessibilityAXValue
    AXPropertyName = AccessibilityAXPropertyName
    AXNode = AccessibilityAXNode


class Animation:

    Animation = AnimationAnimation
    ViewOrScrollTimeline = AnimationViewOrScrollTimeline
    AnimationEffect = AnimationAnimationEffect
    KeyframesRule = AnimationKeyframesRule
    KeyframeStyle = AnimationKeyframeStyle


class Audits:

    AffectedCookie = AuditsAffectedCookie
    AffectedRequest = AuditsAffectedRequest
    AffectedFrame = AuditsAffectedFrame
    CookieExclusionReason = AuditsCookieExclusionReason
    CookieWarningReason = AuditsCookieWarningReason
    CookieOperation = AuditsCookieOperation
    InsightType = AuditsInsightType
    CookieIssueInsight = AuditsCookieIssueInsight
    CookieIssueDetails = AuditsCookieIssueDetails
    MixedContentResolutionStatus = AuditsMixedContentResolutionStatus
    MixedContentResourceType = AuditsMixedContentResourceType
    MixedContentIssueDetails = AuditsMixedContentIssueDetails
    BlockedByResponseReason = AuditsBlockedByResponseReason
    BlockedByResponseIssueDetails = AuditsBlockedByResponseIssueDetails
    HeavyAdResolutionStatus = AuditsHeavyAdResolutionStatus
    HeavyAdReason = AuditsHeavyAdReason
    HeavyAdIssueDetails = AuditsHeavyAdIssueDetails
    ContentSecurityPolicyViolationType = AuditsContentSecurityPolicyViolationType
    SourceCodeLocation = AuditsSourceCodeLocation
    ContentSecurityPolicyIssueDetails = AuditsContentSecurityPolicyIssueDetails
    SharedArrayBufferIssueType = AuditsSharedArrayBufferIssueType
    SharedArrayBufferIssueDetails = AuditsSharedArrayBufferIssueDetails
    LowTextContrastIssueDetails = AuditsLowTextContrastIssueDetails
    CorsIssueDetails = AuditsCorsIssueDetails
    AttributionReportingIssueType = AuditsAttributionReportingIssueType
    SharedDictionaryError = AuditsSharedDictionaryError
    SRIMessageSignatureError = AuditsSRIMessageSignatureError
    UnencodedDigestError = AuditsUnencodedDigestError
    AttributionReportingIssueDetails = AuditsAttributionReportingIssueDetails
    QuirksModeIssueDetails = AuditsQuirksModeIssueDetails
    NavigatorUserAgentIssueDetails = AuditsNavigatorUserAgentIssueDetails
    SharedDictionaryIssueDetails = AuditsSharedDictionaryIssueDetails
    SRIMessageSignatureIssueDetails = AuditsSRIMessageSignatureIssueDetails
    UnencodedDigestIssueDetails = AuditsUnencodedDigestIssueDetails
    GenericIssueErrorType = AuditsGenericIssueErrorType
    GenericIssueDetails = AuditsGenericIssueDetails
    DeprecationIssueDetails = AuditsDeprecationIssueDetails
    BounceTrackingIssueDetails = AuditsBounceTrackingIssueDetails
    CookieDeprecationMetadataIssueDetails = AuditsCookieDeprecationMetadataIssueDetails
    ClientHintIssueReason = AuditsClientHintIssueReason
    FederatedAuthRequestIssueDetails = AuditsFederatedAuthRequestIssueDetails
    FederatedAuthRequestIssueReason = AuditsFederatedAuthRequestIssueReason
    FederatedAuthUserInfoRequestIssueDetails = AuditsFederatedAuthUserInfoRequestIssueDetails
    FederatedAuthUserInfoRequestIssueReason = AuditsFederatedAuthUserInfoRequestIssueReason
    ClientHintIssueDetails = AuditsClientHintIssueDetails
    FailedRequestInfo = AuditsFailedRequestInfo
    PartitioningBlobURLInfo = AuditsPartitioningBlobURLInfo
    PartitioningBlobURLIssueDetails = AuditsPartitioningBlobURLIssueDetails
    ElementAccessibilityIssueReason = AuditsElementAccessibilityIssueReason
    ElementAccessibilityIssueDetails = AuditsElementAccessibilityIssueDetails
    StyleSheetLoadingIssueReason = AuditsStyleSheetLoadingIssueReason
    StylesheetLoadingIssueDetails = AuditsStylesheetLoadingIssueDetails
    PropertyRuleIssueReason = AuditsPropertyRuleIssueReason
    PropertyRuleIssueDetails = AuditsPropertyRuleIssueDetails
    UserReidentificationIssueType = AuditsUserReidentificationIssueType
    UserReidentificationIssueDetails = AuditsUserReidentificationIssueDetails
    PermissionElementIssueType = AuditsPermissionElementIssueType
    PermissionElementIssueDetails = AuditsPermissionElementIssueDetails
    InspectorIssueCode = AuditsInspectorIssueCode
    InspectorIssueDetails = AuditsInspectorIssueDetails
    IssueId = AuditsIssueId
    InspectorIssue = AuditsInspectorIssue


class Autofill:

    CreditCard = AutofillCreditCard
    AddressField = AutofillAddressField
    AddressFields = AutofillAddressFields
    Address = AutofillAddress
    AddressUI = AutofillAddressUI
    FillingStrategy = AutofillFillingStrategy
    FilledField = AutofillFilledField


class BackgroundService:

    ServiceName = BackgroundServiceServiceName
    EventMetadata = BackgroundServiceEventMetadata
    BackgroundServiceEvent = BackgroundServiceBackgroundServiceEvent


class BluetoothEmulation:

    CentralState = BluetoothEmulationCentralState
    GATTOperationType = BluetoothEmulationGATTOperationType
    CharacteristicWriteType = BluetoothEmulationCharacteristicWriteType
    CharacteristicOperationType = BluetoothEmulationCharacteristicOperationType
    DescriptorOperationType = BluetoothEmulationDescriptorOperationType
    ManufacturerData = BluetoothEmulationManufacturerData
    ScanRecord = BluetoothEmulationScanRecord
    ScanEntry = BluetoothEmulationScanEntry
    CharacteristicProperties = BluetoothEmulationCharacteristicProperties


class Browser:

    BrowserContextID = BrowserBrowserContextID
    WindowID = BrowserWindowID
    WindowState = BrowserWindowState
    Bounds = BrowserBounds
    PermissionType = BrowserPermissionType
    PermissionSetting = BrowserPermissionSetting
    PermissionDescriptor = BrowserPermissionDescriptor
    BrowserCommandId = BrowserBrowserCommandId
    Bucket = BrowserBucket
    Histogram = BrowserHistogram
    PrivacySandboxAPI = BrowserPrivacySandboxAPI


class CSS:

    StyleSheetOrigin = CSSStyleSheetOrigin
    PseudoElementMatches = CSSPseudoElementMatches
    CSSAnimationStyle = CSSCSSAnimationStyle
    InheritedStyleEntry = CSSInheritedStyleEntry
    InheritedAnimatedStyleEntry = CSSInheritedAnimatedStyleEntry
    InheritedPseudoElementMatches = CSSInheritedPseudoElementMatches
    RuleMatch = CSSRuleMatch
    Value = CSSValue
    Specificity = CSSSpecificity
    SelectorList = CSSSelectorList
    CSSStyleSheetHeader = CSSCSSStyleSheetHeader
    CSSRule = CSSCSSRule
    CSSRuleType = CSSCSSRuleType
    RuleUsage = CSSRuleUsage
    SourceRange = CSSSourceRange
    ShorthandEntry = CSSShorthandEntry
    CSSComputedStyleProperty = CSSCSSComputedStyleProperty
    ComputedStyleExtraFields = CSSComputedStyleExtraFields
    CSSStyle = CSSCSSStyle
    CSSProperty = CSSCSSProperty
    CSSMedia = CSSCSSMedia
    MediaQuery = CSSMediaQuery
    MediaQueryExpression = CSSMediaQueryExpression
    CSSContainerQuery = CSSCSSContainerQuery
    CSSSupports = CSSCSSSupports
    CSSScope = CSSCSSScope
    CSSLayer = CSSCSSLayer
    CSSStartingStyle = CSSCSSStartingStyle
    CSSLayerData = CSSCSSLayerData
    PlatformFontUsage = CSSPlatformFontUsage
    FontVariationAxis = CSSFontVariationAxis
    FontFace = CSSFontFace
    CSSTryRule = CSSCSSTryRule
    CSSPositionTryRule = CSSCSSPositionTryRule
    CSSKeyframesRule = CSSCSSKeyframesRule
    CSSPropertyRegistration = CSSCSSPropertyRegistration
    CSSAtRule = CSSCSSAtRule
    CSSPropertyRule = CSSCSSPropertyRule
    CSSFunctionParameter = CSSCSSFunctionParameter
    CSSFunctionConditionNode = CSSCSSFunctionConditionNode
    CSSFunctionNode = CSSCSSFunctionNode
    CSSFunctionRule = CSSCSSFunctionRule
    CSSKeyframeRule = CSSCSSKeyframeRule
    StyleDeclarationEdit = CSSStyleDeclarationEdit


class CacheStorage:

    CacheId = CacheStorageCacheId
    CachedResponseType = CacheStorageCachedResponseType
    DataEntry = CacheStorageDataEntry
    Cache = CacheStorageCache
    Header = CacheStorageHeader
    CachedResponse = CacheStorageCachedResponse


class Cast:

    Sink = CastSink


class DOM:

    NodeId = DOMNodeId
    BackendNodeId = DOMBackendNodeId
    StyleSheetId = DOMStyleSheetId
    BackendNode = DOMBackendNode
    PseudoType = DOMPseudoType
    ShadowRootType = DOMShadowRootType
    CompatibilityMode = DOMCompatibilityMode
    PhysicalAxes = DOMPhysicalAxes
    LogicalAxes = DOMLogicalAxes
    ScrollOrientation = DOMScrollOrientation
    Node = DOMNode
    DetachedElementInfo = DOMDetachedElementInfo
    RGBA = DOMRGBA
    Quad = DOMQuad
    BoxModel = DOMBoxModel
    ShapeOutsideInfo = DOMShapeOutsideInfo
    Rect = DOMRect
    CSSComputedStyleProperty = DOMCSSComputedStyleProperty


class DOMDebugger:

    DOMBreakpointType = DOMDebuggerDOMBreakpointType
    CSPViolationType = DOMDebuggerCSPViolationType
    EventListener = DOMDebuggerEventListener


class DOMSnapshot:

    DOMNode = DOMSnapshotDOMNode
    InlineTextBox = DOMSnapshotInlineTextBox
    LayoutTreeNode = DOMSnapshotLayoutTreeNode
    ComputedStyle = DOMSnapshotComputedStyle
    NameValue = DOMSnapshotNameValue
    StringIndex = DOMSnapshotStringIndex
    ArrayOfStrings = DOMSnapshotArrayOfStrings
    RareStringData = DOMSnapshotRareStringData
    RareBooleanData = DOMSnapshotRareBooleanData
    RareIntegerData = DOMSnapshotRareIntegerData
    Rectangle = DOMSnapshotRectangle
    DocumentSnapshot = DOMSnapshotDocumentSnapshot
    NodeTreeSnapshot = DOMSnapshotNodeTreeSnapshot
    LayoutTreeSnapshot = DOMSnapshotLayoutTreeSnapshot
    TextBoxSnapshot = DOMSnapshotTextBoxSnapshot


class DOMStorage:

    SerializedStorageKey = DOMStorageSerializedStorageKey
    StorageId = DOMStorageStorageId
    Item = DOMStorageItem


class DeviceAccess:

    RequestId = DeviceAccessRequestId
    DeviceId = DeviceAccessDeviceId
    PromptDevice = DeviceAccessPromptDevice


class Emulation:

    SafeAreaInsets = EmulationSafeAreaInsets
    ScreenOrientation = EmulationScreenOrientation
    DisplayFeature = EmulationDisplayFeature
    DevicePosture = EmulationDevicePosture
    MediaFeature = EmulationMediaFeature
    VirtualTimePolicy = EmulationVirtualTimePolicy
    UserAgentBrandVersion = EmulationUserAgentBrandVersion
    UserAgentMetadata = EmulationUserAgentMetadata
    SensorType = EmulationSensorType
    SensorMetadata = EmulationSensorMetadata
    SensorReadingSingle = EmulationSensorReadingSingle
    SensorReadingXYZ = EmulationSensorReadingXYZ
    SensorReadingQuaternion = EmulationSensorReadingQuaternion
    SensorReading = EmulationSensorReading
    PressureSource = EmulationPressureSource
    PressureState = EmulationPressureState
    PressureMetadata = EmulationPressureMetadata
    WorkAreaInsets = EmulationWorkAreaInsets
    ScreenId = EmulationScreenId
    ScreenInfo = EmulationScreenInfo
    DisabledImageType = EmulationDisabledImageType


class Extensions:

    StorageArea = ExtensionsStorageArea


class FedCm:

    LoginState = FedCmLoginState
    DialogType = FedCmDialogType
    DialogButton = FedCmDialogButton
    AccountUrlType = FedCmAccountUrlType
    Account = FedCmAccount


class Fetch:

    RequestId = FetchRequestId
    RequestStage = FetchRequestStage
    RequestPattern = FetchRequestPattern
    HeaderEntry = FetchHeaderEntry
    AuthChallenge = FetchAuthChallenge
    AuthChallengeResponse = FetchAuthChallengeResponse


class FileSystem:

    File = FileSystemFile
    Directory = FileSystemDirectory
    BucketFileSystemLocator = FileSystemBucketFileSystemLocator


class HeadlessExperimental:

    ScreenshotParams = HeadlessExperimentalScreenshotParams


class IO:

    StreamHandle = IOStreamHandle


class IndexedDB:

    DatabaseWithObjectStores = IndexedDBDatabaseWithObjectStores
    ObjectStore = IndexedDBObjectStore
    ObjectStoreIndex = IndexedDBObjectStoreIndex
    Key = IndexedDBKey
    KeyRange = IndexedDBKeyRange
    DataEntry = IndexedDBDataEntry
    KeyPath = IndexedDBKeyPath


class Input:

    TouchPoint = InputTouchPoint
    GestureSourceType = InputGestureSourceType
    MouseButton = InputMouseButton
    TimeSinceEpoch = InputTimeSinceEpoch
    DragDataItem = InputDragDataItem
    DragData = InputDragData


class LayerTree:

    LayerId = LayerTreeLayerId
    SnapshotId = LayerTreeSnapshotId
    ScrollRect = LayerTreeScrollRect
    StickyPositionConstraint = LayerTreeStickyPositionConstraint
    PictureTile = LayerTreePictureTile
    Layer = LayerTreeLayer
    PaintProfile = LayerTreePaintProfile


class Log:

    LogEntry = LogLogEntry
    ViolationSetting = LogViolationSetting


class Media:

    PlayerId = MediaPlayerId
    Timestamp = MediaTimestamp
    PlayerMessage = MediaPlayerMessage
    PlayerProperty = MediaPlayerProperty
    PlayerEvent = MediaPlayerEvent
    PlayerErrorSourceLocation = MediaPlayerErrorSourceLocation
    PlayerError = MediaPlayerError
    Player = MediaPlayer


class Memory:

    PressureLevel = MemoryPressureLevel
    SamplingProfileNode = MemorySamplingProfileNode
    SamplingProfile = MemorySamplingProfile
    Module = MemoryModule
    DOMCounter = MemoryDOMCounter


class Network:

    ResourceType = NetworkResourceType
    LoaderId = NetworkLoaderId
    RequestId = NetworkRequestId
    InterceptionId = NetworkInterceptionId
    ErrorReason = NetworkErrorReason
    TimeSinceEpoch = NetworkTimeSinceEpoch
    MonotonicTime = NetworkMonotonicTime
    Headers = NetworkHeaders
    ConnectionType = NetworkConnectionType
    CookieSameSite = NetworkCookieSameSite
    CookiePriority = NetworkCookiePriority
    CookieSourceScheme = NetworkCookieSourceScheme
    ResourceTiming = NetworkResourceTiming
    ResourcePriority = NetworkResourcePriority
    RenderBlockingBehavior = NetworkRenderBlockingBehavior
    PostDataEntry = NetworkPostDataEntry
    Request = NetworkRequest
    SignedCertificateTimestamp = NetworkSignedCertificateTimestamp
    SecurityDetails = NetworkSecurityDetails
    CertificateTransparencyCompliance = NetworkCertificateTransparencyCompliance
    BlockedReason = NetworkBlockedReason
    CorsError = NetworkCorsError
    CorsErrorStatus = NetworkCorsErrorStatus
    ServiceWorkerResponseSource = NetworkServiceWorkerResponseSource
    TrustTokenParams = NetworkTrustTokenParams
    TrustTokenOperationType = NetworkTrustTokenOperationType
    AlternateProtocolUsage = NetworkAlternateProtocolUsage
    ServiceWorkerRouterSource = NetworkServiceWorkerRouterSource
    ServiceWorkerRouterInfo = NetworkServiceWorkerRouterInfo
    Response = NetworkResponse
    WebSocketRequest = NetworkWebSocketRequest
    WebSocketResponse = NetworkWebSocketResponse
    WebSocketFrame = NetworkWebSocketFrame
    CachedResource = NetworkCachedResource
    Initiator = NetworkInitiator
    CookiePartitionKey = NetworkCookiePartitionKey
    Cookie = NetworkCookie
    SetCookieBlockedReason = NetworkSetCookieBlockedReason
    CookieBlockedReason = NetworkCookieBlockedReason
    CookieExemptionReason = NetworkCookieExemptionReason
    BlockedSetCookieWithReason = NetworkBlockedSetCookieWithReason
    ExemptedSetCookieWithReason = NetworkExemptedSetCookieWithReason
    AssociatedCookie = NetworkAssociatedCookie
    CookieParam = NetworkCookieParam
    AuthChallenge = NetworkAuthChallenge
    AuthChallengeResponse = NetworkAuthChallengeResponse
    InterceptionStage = NetworkInterceptionStage
    RequestPattern = NetworkRequestPattern
    SignedExchangeSignature = NetworkSignedExchangeSignature
    SignedExchangeHeader = NetworkSignedExchangeHeader
    SignedExchangeErrorField = NetworkSignedExchangeErrorField
    SignedExchangeError = NetworkSignedExchangeError
    SignedExchangeInfo = NetworkSignedExchangeInfo
    ContentEncoding = NetworkContentEncoding
    NetworkConditions = NetworkNetworkConditions
    BlockPattern = NetworkBlockPattern
    DirectSocketDnsQueryType = NetworkDirectSocketDnsQueryType
    DirectTCPSocketOptions = NetworkDirectTCPSocketOptions
    DirectUDPSocketOptions = NetworkDirectUDPSocketOptions
    DirectUDPMessage = NetworkDirectUDPMessage
    PrivateNetworkRequestPolicy = NetworkPrivateNetworkRequestPolicy
    IPAddressSpace = NetworkIPAddressSpace
    ConnectTiming = NetworkConnectTiming
    ClientSecurityState = NetworkClientSecurityState
    CrossOriginOpenerPolicyValue = NetworkCrossOriginOpenerPolicyValue
    CrossOriginOpenerPolicyStatus = NetworkCrossOriginOpenerPolicyStatus
    CrossOriginEmbedderPolicyValue = NetworkCrossOriginEmbedderPolicyValue
    CrossOriginEmbedderPolicyStatus = NetworkCrossOriginEmbedderPolicyStatus
    ContentSecurityPolicySource = NetworkContentSecurityPolicySource
    ContentSecurityPolicyStatus = NetworkContentSecurityPolicyStatus
    SecurityIsolationStatus = NetworkSecurityIsolationStatus
    ReportStatus = NetworkReportStatus
    ReportId = NetworkReportId
    ReportingApiReport = NetworkReportingApiReport
    ReportingApiEndpoint = NetworkReportingApiEndpoint
    LoadNetworkResourcePageResult = NetworkLoadNetworkResourcePageResult
    LoadNetworkResourceOptions = NetworkLoadNetworkResourceOptions


class Overlay:

    SourceOrderConfig = OverlaySourceOrderConfig
    GridHighlightConfig = OverlayGridHighlightConfig
    FlexContainerHighlightConfig = OverlayFlexContainerHighlightConfig
    FlexItemHighlightConfig = OverlayFlexItemHighlightConfig
    LineStyle = OverlayLineStyle
    BoxStyle = OverlayBoxStyle
    ContrastAlgorithm = OverlayContrastAlgorithm
    HighlightConfig = OverlayHighlightConfig
    ColorFormat = OverlayColorFormat
    GridNodeHighlightConfig = OverlayGridNodeHighlightConfig
    FlexNodeHighlightConfig = OverlayFlexNodeHighlightConfig
    ScrollSnapContainerHighlightConfig = OverlayScrollSnapContainerHighlightConfig
    ScrollSnapHighlightConfig = OverlayScrollSnapHighlightConfig
    HingeConfig = OverlayHingeConfig
    WindowControlsOverlayConfig = OverlayWindowControlsOverlayConfig
    ContainerQueryHighlightConfig = OverlayContainerQueryHighlightConfig
    ContainerQueryContainerHighlightConfig = OverlayContainerQueryContainerHighlightConfig
    IsolatedElementHighlightConfig = OverlayIsolatedElementHighlightConfig
    IsolationModeHighlightConfig = OverlayIsolationModeHighlightConfig
    InspectMode = OverlayInspectMode


class PWA:

    FileHandlerAccept = PWAFileHandlerAccept
    FileHandler = PWAFileHandler
    DisplayMode = PWADisplayMode


class Page:

    FrameId = PageFrameId
    AdFrameType = PageAdFrameType
    AdFrameExplanation = PageAdFrameExplanation
    AdFrameStatus = PageAdFrameStatus
    AdScriptId = PageAdScriptId
    AdScriptAncestry = PageAdScriptAncestry
    SecureContextType = PageSecureContextType
    CrossOriginIsolatedContextType = PageCrossOriginIsolatedContextType
    GatedAPIFeatures = PageGatedAPIFeatures
    PermissionsPolicyFeature = PagePermissionsPolicyFeature
    PermissionsPolicyBlockReason = PagePermissionsPolicyBlockReason
    PermissionsPolicyBlockLocator = PagePermissionsPolicyBlockLocator
    PermissionsPolicyFeatureState = PagePermissionsPolicyFeatureState
    OriginTrialTokenStatus = PageOriginTrialTokenStatus
    OriginTrialStatus = PageOriginTrialStatus
    OriginTrialUsageRestriction = PageOriginTrialUsageRestriction
    OriginTrialToken = PageOriginTrialToken
    OriginTrialTokenWithStatus = PageOriginTrialTokenWithStatus
    OriginTrial = PageOriginTrial
    SecurityOriginDetails = PageSecurityOriginDetails
    Frame = PageFrame
    FrameResource = PageFrameResource
    FrameResourceTree = PageFrameResourceTree
    FrameTree = PageFrameTree
    ScriptIdentifier = PageScriptIdentifier
    TransitionType = PageTransitionType
    NavigationEntry = PageNavigationEntry
    ScreencastFrameMetadata = PageScreencastFrameMetadata
    DialogType = PageDialogType
    AppManifestError = PageAppManifestError
    AppManifestParsedProperties = PageAppManifestParsedProperties
    LayoutViewport = PageLayoutViewport
    VisualViewport = PageVisualViewport
    Viewport = PageViewport
    FontFamilies = PageFontFamilies
    ScriptFontFamilies = PageScriptFontFamilies
    FontSizes = PageFontSizes
    ClientNavigationReason = PageClientNavigationReason
    ClientNavigationDisposition = PageClientNavigationDisposition
    InstallabilityErrorArgument = PageInstallabilityErrorArgument
    InstallabilityError = PageInstallabilityError
    ReferrerPolicy = PageReferrerPolicy
    CompilationCacheParams = PageCompilationCacheParams
    FileFilter = PageFileFilter
    FileHandler = PageFileHandler
    ImageResource = PageImageResource
    LaunchHandler = PageLaunchHandler
    ProtocolHandler = PageProtocolHandler
    RelatedApplication = PageRelatedApplication
    ScopeExtension = PageScopeExtension
    Screenshot = PageScreenshot
    ShareTarget = PageShareTarget
    Shortcut = PageShortcut
    WebAppManifest = PageWebAppManifest
    NavigationType = PageNavigationType
    BackForwardCacheNotRestoredReason = PageBackForwardCacheNotRestoredReason
    BackForwardCacheNotRestoredReasonType = PageBackForwardCacheNotRestoredReasonType
    BackForwardCacheBlockingDetails = PageBackForwardCacheBlockingDetails
    BackForwardCacheNotRestoredExplanation = PageBackForwardCacheNotRestoredExplanation
    BackForwardCacheNotRestoredExplanationTree = PageBackForwardCacheNotRestoredExplanationTree


class Performance:

    Metric = PerformanceMetric


class PerformanceTimeline:

    LargestContentfulPaint = PerformanceTimelineLargestContentfulPaint
    LayoutShiftAttribution = PerformanceTimelineLayoutShiftAttribution
    LayoutShift = PerformanceTimelineLayoutShift
    TimelineEvent = PerformanceTimelineTimelineEvent


class Preload:

    RuleSetId = PreloadRuleSetId
    RuleSet = PreloadRuleSet
    RuleSetErrorType = PreloadRuleSetErrorType
    SpeculationAction = PreloadSpeculationAction
    SpeculationTargetHint = PreloadSpeculationTargetHint
    PreloadingAttemptKey = PreloadPreloadingAttemptKey
    PreloadingAttemptSource = PreloadPreloadingAttemptSource
    PreloadPipelineId = PreloadPreloadPipelineId
    PrerenderFinalStatus = PreloadPrerenderFinalStatus
    PreloadingStatus = PreloadPreloadingStatus
    PrefetchStatus = PreloadPrefetchStatus
    PrerenderMismatchedHeaders = PreloadPrerenderMismatchedHeaders


class Security:

    CertificateId = SecurityCertificateId
    MixedContentType = SecurityMixedContentType
    SecurityState = SecuritySecurityState
    CertificateSecurityState = SecurityCertificateSecurityState
    SafetyTipStatus = SecuritySafetyTipStatus
    SafetyTipInfo = SecuritySafetyTipInfo
    VisibleSecurityState = SecurityVisibleSecurityState
    SecurityStateExplanation = SecuritySecurityStateExplanation
    InsecureContentStatus = SecurityInsecureContentStatus
    CertificateErrorAction = SecurityCertificateErrorAction


class ServiceWorker:

    RegistrationID = ServiceWorkerRegistrationID
    ServiceWorkerRegistration = ServiceWorkerServiceWorkerRegistration
    ServiceWorkerVersionRunningStatus = ServiceWorkerServiceWorkerVersionRunningStatus
    ServiceWorkerVersionStatus = ServiceWorkerServiceWorkerVersionStatus
    ServiceWorkerVersion = ServiceWorkerServiceWorkerVersion
    ServiceWorkerErrorMessage = ServiceWorkerServiceWorkerErrorMessage


class Storage:

    SerializedStorageKey = StorageSerializedStorageKey
    StorageType = StorageStorageType
    UsageForType = StorageUsageForType
    TrustTokens = StorageTrustTokens
    InterestGroupAuctionId = StorageInterestGroupAuctionId
    InterestGroupAccessType = StorageInterestGroupAccessType
    InterestGroupAuctionEventType = StorageInterestGroupAuctionEventType
    InterestGroupAuctionFetchType = StorageInterestGroupAuctionFetchType
    SharedStorageAccessScope = StorageSharedStorageAccessScope
    SharedStorageAccessMethod = StorageSharedStorageAccessMethod
    SharedStorageEntry = StorageSharedStorageEntry
    SharedStorageMetadata = StorageSharedStorageMetadata
    SharedStoragePrivateAggregationConfig = StorageSharedStoragePrivateAggregationConfig
    SharedStorageReportingMetadata = StorageSharedStorageReportingMetadata
    SharedStorageUrlWithMetadata = StorageSharedStorageUrlWithMetadata
    SharedStorageAccessParams = StorageSharedStorageAccessParams
    StorageBucketsDurability = StorageStorageBucketsDurability
    StorageBucket = StorageStorageBucket
    StorageBucketInfo = StorageStorageBucketInfo
    AttributionReportingSourceType = StorageAttributionReportingSourceType
    UnsignedInt64AsBase10 = StorageUnsignedInt64AsBase10
    UnsignedInt128AsBase16 = StorageUnsignedInt128AsBase16
    SignedInt64AsBase10 = StorageSignedInt64AsBase10
    AttributionReportingFilterDataEntry = StorageAttributionReportingFilterDataEntry
    AttributionReportingFilterConfig = StorageAttributionReportingFilterConfig
    AttributionReportingFilterPair = StorageAttributionReportingFilterPair
    AttributionReportingAggregationKeysEntry = StorageAttributionReportingAggregationKeysEntry
    AttributionReportingEventReportWindows = StorageAttributionReportingEventReportWindows
    AttributionReportingTriggerDataMatching = StorageAttributionReportingTriggerDataMatching
    AttributionReportingAggregatableDebugReportingData = StorageAttributionReportingAggregatableDebugReportingData
    AttributionReportingAggregatableDebugReportingConfig = StorageAttributionReportingAggregatableDebugReportingConfig
    AttributionScopesData = StorageAttributionScopesData
    AttributionReportingNamedBudgetDef = StorageAttributionReportingNamedBudgetDef
    AttributionReportingSourceRegistration = StorageAttributionReportingSourceRegistration
    AttributionReportingSourceRegistrationResult = StorageAttributionReportingSourceRegistrationResult
    AttributionReportingSourceRegistrationTimeConfig = StorageAttributionReportingSourceRegistrationTimeConfig
    AttributionReportingAggregatableValueDictEntry = StorageAttributionReportingAggregatableValueDictEntry
    AttributionReportingAggregatableValueEntry = StorageAttributionReportingAggregatableValueEntry
    AttributionReportingEventTriggerData = StorageAttributionReportingEventTriggerData
    AttributionReportingAggregatableTriggerData = StorageAttributionReportingAggregatableTriggerData
    AttributionReportingAggregatableDedupKey = StorageAttributionReportingAggregatableDedupKey
    AttributionReportingNamedBudgetCandidate = StorageAttributionReportingNamedBudgetCandidate
    AttributionReportingTriggerRegistration = StorageAttributionReportingTriggerRegistration
    AttributionReportingEventLevelResult = StorageAttributionReportingEventLevelResult
    AttributionReportingAggregatableResult = StorageAttributionReportingAggregatableResult
    AttributionReportingReportResult = StorageAttributionReportingReportResult
    RelatedWebsiteSet = StorageRelatedWebsiteSet


class SystemInfo:

    GPUDevice = SystemInfoGPUDevice
    Size = SystemInfoSize
    VideoDecodeAcceleratorCapability = SystemInfoVideoDecodeAcceleratorCapability
    VideoEncodeAcceleratorCapability = SystemInfoVideoEncodeAcceleratorCapability
    SubsamplingFormat = SystemInfoSubsamplingFormat
    ImageType = SystemInfoImageType
    GPUInfo = SystemInfoGPUInfo
    ProcessInfo = SystemInfoProcessInfo


class Target:

    TargetID = TargetTargetID
    SessionID = TargetSessionID
    TargetInfo = TargetTargetInfo
    FilterEntry = TargetFilterEntry
    TargetFilter = TargetTargetFilter
    RemoteLocation = TargetRemoteLocation
    WindowState = TargetWindowState


class Tracing:

    MemoryDumpConfig = TracingMemoryDumpConfig
    TraceConfig = TracingTraceConfig
    StreamFormat = TracingStreamFormat
    StreamCompression = TracingStreamCompression
    MemoryDumpLevelOfDetail = TracingMemoryDumpLevelOfDetail
    TracingBackend = TracingTracingBackend


class WebAudio:

    GraphObjectId = WebAudioGraphObjectId
    ContextType = WebAudioContextType
    ContextState = WebAudioContextState
    NodeType = WebAudioNodeType
    ChannelCountMode = WebAudioChannelCountMode
    ChannelInterpretation = WebAudioChannelInterpretation
    ParamType = WebAudioParamType
    AutomationRate = WebAudioAutomationRate
    ContextRealtimeData = WebAudioContextRealtimeData
    BaseAudioContext = WebAudioBaseAudioContext
    AudioListener = WebAudioAudioListener
    AudioNode = WebAudioAudioNode
    AudioParam = WebAudioAudioParam


class WebAuthn:

    AuthenticatorId = WebAuthnAuthenticatorId
    AuthenticatorProtocol = WebAuthnAuthenticatorProtocol
    Ctap2Version = WebAuthnCtap2Version
    AuthenticatorTransport = WebAuthnAuthenticatorTransport
    VirtualAuthenticatorOptions = WebAuthnVirtualAuthenticatorOptions
    Credential = WebAuthnCredential


class Console:

    ConsoleMessage = ConsoleConsoleMessage


class Debugger:

    BreakpointId = DebuggerBreakpointId
    CallFrameId = DebuggerCallFrameId
    Location = DebuggerLocation
    ScriptPosition = DebuggerScriptPosition
    LocationRange = DebuggerLocationRange
    CallFrame = DebuggerCallFrame
    Scope = DebuggerScope
    SearchMatch = DebuggerSearchMatch
    BreakLocation = DebuggerBreakLocation
    WasmDisassemblyChunk = DebuggerWasmDisassemblyChunk
    ScriptLanguage = DebuggerScriptLanguage
    DebugSymbols = DebuggerDebugSymbols
    ResolvedBreakpoint = DebuggerResolvedBreakpoint


class HeapProfiler:

    HeapSnapshotObjectId = HeapProfilerHeapSnapshotObjectId
    SamplingHeapProfileNode = HeapProfilerSamplingHeapProfileNode
    SamplingHeapProfileSample = HeapProfilerSamplingHeapProfileSample
    SamplingHeapProfile = HeapProfilerSamplingHeapProfile


class Profiler:

    ProfileNode = ProfilerProfileNode
    Profile = ProfilerProfile
    PositionTickInfo = ProfilerPositionTickInfo
    CoverageRange = ProfilerCoverageRange
    FunctionCoverage = ProfilerFunctionCoverage
    ScriptCoverage = ProfilerScriptCoverage


class Runtime:

    ScriptId = RuntimeScriptId
    SerializationOptions = RuntimeSerializationOptions
    DeepSerializedValue = RuntimeDeepSerializedValue
    RemoteObjectId = RuntimeRemoteObjectId
    UnserializableValue = RuntimeUnserializableValue
    RemoteObject = RuntimeRemoteObject
    CustomPreview = RuntimeCustomPreview
    ObjectPreview = RuntimeObjectPreview
    PropertyPreview = RuntimePropertyPreview
    EntryPreview = RuntimeEntryPreview
    PropertyDescriptor = RuntimePropertyDescriptor
    InternalPropertyDescriptor = RuntimeInternalPropertyDescriptor
    PrivatePropertyDescriptor = RuntimePrivatePropertyDescriptor
    CallArgument = RuntimeCallArgument
    ExecutionContextId = RuntimeExecutionContextId
    ExecutionContextDescription = RuntimeExecutionContextDescription
    ExceptionDetails = RuntimeExceptionDetails
    Timestamp = RuntimeTimestamp
    TimeDelta = RuntimeTimeDelta
    CallFrame = RuntimeCallFrame
    StackTrace = RuntimeStackTrace
    UniqueDebuggerId = RuntimeUniqueDebuggerId
    StackTraceId = RuntimeStackTraceId


class Schema:

    Domain = SchemaDomain
