# AUTO-GENERATED By cidipi/tools/generator.py. DO NOT EDIT.

from typing import Any, Literal, Optional, Union

from pydantic import PrivateAttr

import cidipi.protocols.types as types
from cidipi.interface import ICommand


class Console:
    """
    This domain is deprecated - use Runtime or Log instead.
    """

    class clearMessages(ICommand):
        """
        Does nothing.
        """

        _domain: str = PrivateAttr("Console")

    class disable(ICommand):
        """
        Disables console domain, prevents further console messages from being reported to the client.
        """

        _domain: str = PrivateAttr("Console")

    class enable(ICommand):
        """
                Enables console domain, sends the messages collected so far to the client by means of the
        `messageAdded` notification.
        """

        _domain: str = PrivateAttr("Console")


class Debugger:
    """
        Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing
    breakpoints, stepping through execution, exploring stack traces, etc.
    """

    class continueToLocation(ICommand):
        """
        Continues execution until specific location is reached.
        """

        _domain: str = PrivateAttr("Debugger")
        location: "types.Debugger.TypeLocation"
        """
        Location to continue to.
        """
        targetCallFrames: Optional[Literal["any", "current"]] = None

    class disable(ICommand):
        """
        Disables debugger for given page.
        """

        _domain: str = PrivateAttr("Debugger")

    class enable(ICommand):
        """
                Enables debugger for the given page. Clients should not assume that the debugging has been
        enabled until the result for this command is received.
        """

        _domain: str = PrivateAttr("Debugger")
        maxScriptsCacheSize: Optional[Union[float, int]] = None
        """
        The maximum size in bytes of collected scripts (not referenced by other heap objects)
the debugger can hold. Puts no limit if parameter is omitted.
        """

    class evaluateOnCallFrame(ICommand):
        """
        Evaluates expression on a given call frame.
        """

        _domain: str = PrivateAttr("Debugger")
        callFrameId: "types.Debugger.TypeCallFrameId"
        """
        Call frame identifier to evaluate on.
        """
        expression: str
        """
        Expression to evaluate.
        """
        objectGroup: Optional[str] = None
        """
        String object group name to put result into (allows rapid releasing resulting object handles
using `releaseObjectGroup`).
        """
        includeCommandLineAPI: Optional[bool] = None
        """
        Specifies whether command line API should be available to the evaluated expression, defaults
to false.
        """
        silent: Optional[bool] = None
        """
        In silent mode exceptions thrown during evaluation are not reported and do not pause
execution. Overrides `setPauseOnException` state.
        """
        returnByValue: Optional[bool] = None
        """
        Whether the result is expected to be a JSON object that should be sent by value.
        """
        generatePreview: Optional[bool] = None
        """
        Whether preview should be generated for the result.
        """
        throwOnSideEffect: Optional[bool] = None
        """
        Whether to throw an exception if side effect cannot be ruled out during evaluation.
        """
        timeout: Optional["types.Runtime.TypeTimeDelta"] = None
        """
        Terminate execution after timing out (number of milliseconds).
        """

    class getPossibleBreakpoints(ICommand):
        """
                Returns possible locations for breakpoint. scriptId in start and end range locations should be
        the same.
        """

        _domain: str = PrivateAttr("Debugger")
        start: "types.Debugger.TypeLocation"
        """
        Start of range to search possible breakpoint locations in.
        """
        end: Optional["types.Debugger.TypeLocation"] = None
        """
        End of range to search possible breakpoint locations in (excluding). When not specified, end
of scripts is used as end of range.
        """
        restrictToFunction: Optional[bool] = None
        """
        Only consider locations which are in the same (non-nested) function as start.
        """

    class getScriptSource(ICommand):
        """
        Returns source for the script with given id.
        """

        _domain: str = PrivateAttr("Debugger")
        scriptId: "types.Runtime.TypeScriptId"
        """
        Id of the script to get source for.
        """

    class disassembleWasmModule(ICommand):
        _domain: str = PrivateAttr("Debugger")
        scriptId: "types.Runtime.TypeScriptId"
        """
        Id of the script to disassemble
        """

    class nextWasmDisassemblyChunk(ICommand):
        """
                Disassemble the next chunk of lines for the module corresponding to the
        stream. If disassembly is complete, this API will invalidate the streamId
        and return an empty chunk. Any subsequent calls for the now invalid stream
        will return errors.
        """

        _domain: str = PrivateAttr("Debugger")
        streamId: str

    class getWasmBytecode(ICommand):
        """
        This command is deprecated. Use getScriptSource instead.
        """

        _domain: str = PrivateAttr("Debugger")
        scriptId: "types.Runtime.TypeScriptId"
        """
        Id of the Wasm script to get source for.
        """

    class getStackTrace(ICommand):
        """
        Returns stack trace with given `stackTraceId`.
        """

        _domain: str = PrivateAttr("Debugger")
        stackTraceId: "types.Runtime.TypeStackTraceId"

    class pause(ICommand):
        """
        Stops on the next JavaScript statement.
        """

        _domain: str = PrivateAttr("Debugger")

    class pauseOnAsyncCall(ICommand):
        _domain: str = PrivateAttr("Debugger")
        parentStackTraceId: "types.Runtime.TypeStackTraceId"
        """
        Debugger will pause when async call with given stack trace is started.
        """

    class removeBreakpoint(ICommand):
        """
        Removes JavaScript breakpoint.
        """

        _domain: str = PrivateAttr("Debugger")
        breakpointId: "types.Debugger.TypeBreakpointId"

    class restartFrame(ICommand):
        """
                Restarts particular call frame from the beginning. The old, deprecated
        behavior of `restartFrame` is to stay paused and allow further CDP commands
        after a restart was scheduled. This can cause problems with restarting, so
        we now continue execution immediatly after it has been scheduled until we
        reach the beginning of the restarted frame.

        To stay back-wards compatible, `restartFrame` now expects a `mode`
        parameter to be present. If the `mode` parameter is missing, `restartFrame`
        errors out.

        The various return values are deprecated and `callFrames` is always empty.
        Use the call frames from the `Debugger#paused` events instead, that fires
        once V8 pauses at the beginning of the restarted function.
        """

        _domain: str = PrivateAttr("Debugger")
        callFrameId: "types.Debugger.TypeCallFrameId"
        """
        Call frame identifier to evaluate on.
        """
        mode: Optional[Literal["StepInto"]] = None
        """
        The `mode` parameter must be present and set to 'StepInto', otherwise
`restartFrame` will error out.
        """

    class resume(ICommand):
        """
        Resumes JavaScript execution.
        """

        _domain: str = PrivateAttr("Debugger")
        terminateOnResume: Optional[bool] = None
        """
        Set to true to terminate execution upon resuming execution. In contrast
to Runtime.terminateExecution, this will allows to execute further
JavaScript (i.e. via evaluation) until execution of the paused code
is actually resumed, at which point termination is triggered.
If execution is currently not paused, this parameter has no effect.
        """

    class searchInContent(ICommand):
        """
        Searches for given string in script content.
        """

        _domain: str = PrivateAttr("Debugger")
        scriptId: "types.Runtime.TypeScriptId"
        """
        Id of the script to search in.
        """
        query: str
        """
        String to search for.
        """
        caseSensitive: Optional[bool] = None
        """
        If true, search is case sensitive.
        """
        isRegex: Optional[bool] = None
        """
        If true, treats string parameter as regex.
        """

    class setAsyncCallStackDepth(ICommand):
        """
        Enables or disables async call stacks tracking.
        """

        _domain: str = PrivateAttr("Debugger")
        maxDepth: Union[float, int]
        """
        Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async
call stacks (default).
        """

    class setBlackboxPatterns(ICommand):
        """
                Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in
        scripts with url matching one of the patterns. VM will try to leave blackboxed script by
        performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
        """

        _domain: str = PrivateAttr("Debugger")
        patterns: list[Any]
        """
        Array of regexps that will be used to check script url for blackbox state.
        """

    class setBlackboxedRanges(ICommand):
        """
                Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted
        scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
        Positions array contains positions where blackbox state is changed. First interval isn't
        blackboxed. Array should be sorted.
        """

        _domain: str = PrivateAttr("Debugger")
        scriptId: "types.Runtime.TypeScriptId"
        """
        Id of the script.
        """
        positions: list[Any]

    class setBreakpoint(ICommand):
        """
        Sets JavaScript breakpoint at a given location.
        """

        _domain: str = PrivateAttr("Debugger")
        location: "types.Debugger.TypeLocation"
        """
        Location to set breakpoint in.
        """
        condition: Optional[str] = None
        """
        Expression to use as a breakpoint condition. When specified, debugger will only stop on the
breakpoint if this expression evaluates to true.
        """

    class setInstrumentationBreakpoint(ICommand):
        """
        Sets instrumentation breakpoint.
        """

        _domain: str = PrivateAttr("Debugger")
        instrumentation: Literal[
            "beforeScriptExecution", "beforeScriptWithSourceMapExecution"
        ]
        """
        Instrumentation name.
        """

    class setBreakpointByUrl(ICommand):
        """
                Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this
        command is issued, all existing parsed scripts will have breakpoints resolved and returned in
        `locations` property. Further matching script parsing will result in subsequent
        `breakpointResolved` events issued. This logical breakpoint will survive page reloads.
        """

        _domain: str = PrivateAttr("Debugger")
        lineNumber: Union[float, int]
        """
        Line number to set breakpoint at.
        """
        url: Optional[str] = None
        """
        URL of the resources to set breakpoint on.
        """
        urlRegex: Optional[str] = None
        """
        Regex pattern for the URLs of the resources to set breakpoints on. Either `url` or
`urlRegex` must be specified.
        """
        scriptHash: Optional[str] = None
        """
        Script hash of the resources to set breakpoint on.
        """
        columnNumber: Optional[Union[float, int]] = None
        """
        Offset in the line to set breakpoint at.
        """
        condition: Optional[str] = None
        """
        Expression to use as a breakpoint condition. When specified, debugger will only stop on the
breakpoint if this expression evaluates to true.
        """

    class setBreakpointOnFunctionCall(ICommand):
        """
                Sets JavaScript breakpoint before each call to the given function.
        If another function was created from the same source as a given one,
        calling it will also trigger the breakpoint.
        """

        _domain: str = PrivateAttr("Debugger")
        objectId: "types.Runtime.TypeRemoteObjectId"
        """
        Function object id.
        """
        condition: Optional[str] = None
        """
        Expression to use as a breakpoint condition. When specified, debugger will
stop on the breakpoint if this expression evaluates to true.
        """

    class setBreakpointsActive(ICommand):
        """
        Activates / deactivates all breakpoints on the page.
        """

        _domain: str = PrivateAttr("Debugger")
        active: bool
        """
        New value for breakpoints active state.
        """

    class setPauseOnExceptions(ICommand):
        """
                Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions,
        or caught exceptions, no exceptions. Initial pause on exceptions state is `none`.
        """

        _domain: str = PrivateAttr("Debugger")
        state: Literal["none", "caught", "uncaught", "all"]
        """
        Pause on exceptions mode.
        """

    class setReturnValue(ICommand):
        """
        Changes return value in top frame. Available only at return break position.
        """

        _domain: str = PrivateAttr("Debugger")
        newValue: "types.Runtime.TypeCallArgument"
        """
        New return value.
        """

    class setScriptSource(ICommand):
        """
                Edits JavaScript source live.

        In general, functions that are currently on the stack can not be edited with
        a single exception: If the edited function is the top-most stack frame and
        that is the only activation of that function on the stack. In this case
        the live edit will be successful and a `Debugger.restartFrame` for the
        top-most function is automatically triggered.
        """

        _domain: str = PrivateAttr("Debugger")
        scriptId: "types.Runtime.TypeScriptId"
        """
        Id of the script to edit.
        """
        scriptSource: str
        """
        New content of the script.
        """
        dryRun: Optional[bool] = None
        """
        If true the change will not actually be applied. Dry run may be used to get result
description without actually modifying the code.
        """
        allowTopFrameEditing: Optional[bool] = None
        """
        If true, then `scriptSource` is allowed to change the function on top of the stack
as long as the top-most stack frame is the only activation of that function.
        """

    class setSkipAllPauses(ICommand):
        """
        Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
        """

        _domain: str = PrivateAttr("Debugger")
        skip: bool
        """
        New value for skip pauses state.
        """

    class setVariableValue(ICommand):
        """
                Changes value of variable in a callframe. Object-based scopes are not supported and must be
        mutated manually.
        """

        _domain: str = PrivateAttr("Debugger")
        scopeNumber: Union[float, int]
        """
        0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch'
scope types are allowed. Other scopes could be manipulated manually.
        """
        variableName: str
        """
        Variable name.
        """
        newValue: "types.Runtime.TypeCallArgument"
        """
        New variable value.
        """
        callFrameId: "types.Debugger.TypeCallFrameId"
        """
        Id of callframe that holds variable.
        """

    class stepInto(ICommand):
        """
        Steps into the function call.
        """

        _domain: str = PrivateAttr("Debugger")
        breakOnAsyncCall: Optional[bool] = None
        """
        Debugger will pause on the execution of the first async task which was scheduled
before next pause.
        """
        skipList: Optional[list[Any]] = None
        """
        The skipList specifies location ranges that should be skipped on step into.
        """

    class stepOut(ICommand):
        """
        Steps out of the function call.
        """

        _domain: str = PrivateAttr("Debugger")

    class stepOver(ICommand):
        """
        Steps over the statement.
        """

        _domain: str = PrivateAttr("Debugger")
        skipList: Optional[list[Any]] = None
        """
        The skipList specifies location ranges that should be skipped on step over.
        """


class HeapProfiler:
    class addInspectedHeapObject(ICommand):
        """
                Enables console to refer to the node with given id via $x (see Command Line API for more details
        $x functions).
        """

        _domain: str = PrivateAttr("HeapProfiler")
        heapObjectId: "types.HeapProfiler.TypeHeapSnapshotObjectId"
        """
        Heap snapshot object id to be accessible by means of $x command line API.
        """

    class collectGarbage(ICommand):
        _domain: str = PrivateAttr("HeapProfiler")

    class disable(ICommand):
        _domain: str = PrivateAttr("HeapProfiler")

    class enable(ICommand):
        _domain: str = PrivateAttr("HeapProfiler")

    class getHeapObjectId(ICommand):
        _domain: str = PrivateAttr("HeapProfiler")
        objectId: "types.Runtime.TypeRemoteObjectId"
        """
        Identifier of the object to get heap object id for.
        """

    class getObjectByHeapObjectId(ICommand):
        _domain: str = PrivateAttr("HeapProfiler")
        objectId: "types.HeapProfiler.TypeHeapSnapshotObjectId"
        objectGroup: Optional[str] = None
        """
        Symbolic group name that can be used to release multiple objects.
        """

    class getSamplingProfile(ICommand):
        _domain: str = PrivateAttr("HeapProfiler")

    class startSampling(ICommand):
        _domain: str = PrivateAttr("HeapProfiler")
        samplingInterval: Optional[Union[float, int]] = None
        """
        Average sample interval in bytes. Poisson distribution is used for the intervals. The
default value is 32768 bytes.
        """
        includeObjectsCollectedByMajorGC: Optional[bool] = None
        """
        By default, the sampling heap profiler reports only objects which are
still alive when the profile is returned via getSamplingProfile or
stopSampling, which is useful for determining what functions contribute
the most to steady-state memory usage. This flag instructs the sampling
heap profiler to also include information about objects discarded by
major GC, which will show which functions cause large temporary memory
usage or long GC pauses.
        """
        includeObjectsCollectedByMinorGC: Optional[bool] = None
        """
        By default, the sampling heap profiler reports only objects which are
still alive when the profile is returned via getSamplingProfile or
stopSampling, which is useful for determining what functions contribute
the most to steady-state memory usage. This flag instructs the sampling
heap profiler to also include information about objects discarded by
minor GC, which is useful when tuning a latency-sensitive application
for minimal GC activity.
        """

    class startTrackingHeapObjects(ICommand):
        _domain: str = PrivateAttr("HeapProfiler")
        trackAllocations: Optional[bool] = None

    class stopSampling(ICommand):
        _domain: str = PrivateAttr("HeapProfiler")

    class stopTrackingHeapObjects(ICommand):
        _domain: str = PrivateAttr("HeapProfiler")
        reportProgress: Optional[bool] = None
        """
        If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken
when the tracking is stopped.
        """
        treatGlobalObjectsAsRoots: Optional[bool] = None
        """
        Deprecated in favor of `exposeInternals`.
        """
        captureNumericValue: Optional[bool] = None
        """
        If true, numerical values are included in the snapshot
        """
        exposeInternals: Optional[bool] = None
        """
        If true, exposes internals of the snapshot.
        """

    class takeHeapSnapshot(ICommand):
        _domain: str = PrivateAttr("HeapProfiler")
        reportProgress: Optional[bool] = None
        """
        If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
        """
        treatGlobalObjectsAsRoots: Optional[bool] = None
        """
        If true, a raw snapshot without artificial roots will be generated.
Deprecated in favor of `exposeInternals`.
        """
        captureNumericValue: Optional[bool] = None
        """
        If true, numerical values are included in the snapshot
        """
        exposeInternals: Optional[bool] = None
        """
        If true, exposes internals of the snapshot.
        """


class Profiler:
    class disable(ICommand):
        _domain: str = PrivateAttr("Profiler")

    class enable(ICommand):
        _domain: str = PrivateAttr("Profiler")

    class getBestEffortCoverage(ICommand):
        """
                Collect coverage data for the current isolate. The coverage data may be incomplete due to
        garbage collection.
        """

        _domain: str = PrivateAttr("Profiler")

    class setSamplingInterval(ICommand):
        """
        Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
        """

        _domain: str = PrivateAttr("Profiler")
        interval: Union[float, int]
        """
        New sampling interval in microseconds.
        """

    class start(ICommand):
        _domain: str = PrivateAttr("Profiler")

    class startPreciseCoverage(ICommand):
        """
                Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code
        coverage may be incomplete. Enabling prevents running optimized code and resets execution
        counters.
        """

        _domain: str = PrivateAttr("Profiler")
        callCount: Optional[bool] = None
        """
        Collect accurate call counts beyond simple 'covered' or 'not covered'.
        """
        detailed: Optional[bool] = None
        """
        Collect block-based coverage.
        """
        allowTriggeredUpdates: Optional[bool] = None
        """
        Allow the backend to send updates on its own initiative
        """

    class stop(ICommand):
        _domain: str = PrivateAttr("Profiler")

    class stopPreciseCoverage(ICommand):
        """
                Disable precise code coverage. Disabling releases unnecessary execution count records and allows
        executing optimized code.
        """

        _domain: str = PrivateAttr("Profiler")

    class takePreciseCoverage(ICommand):
        """
                Collect coverage data for the current isolate, and resets execution counters. Precise code
        coverage needs to have started.
        """

        _domain: str = PrivateAttr("Profiler")


class Runtime:
    """
        Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects.
    Evaluation results are returned as mirror object that expose object type, string representation
    and unique identifier that can be used for further object reference. Original objects are
    maintained in memory unless they are either explicitly released or are released along with the
    other objects in their object group.
    """

    class awaitPromise(ICommand):
        """
        Add handler to promise with given promise object id.
        """

        _domain: str = PrivateAttr("Runtime")
        promiseObjectId: "types.Runtime.TypeRemoteObjectId"
        """
        Identifier of the promise.
        """
        returnByValue: Optional[bool] = None
        """
        Whether the result is expected to be a JSON object that should be sent by value.
        """
        generatePreview: Optional[bool] = None
        """
        Whether preview should be generated for the result.
        """

    class callFunctionOn(ICommand):
        """
                Calls function with given declaration on the given object. Object group of the result is
        inherited from the target object.
        """

        _domain: str = PrivateAttr("Runtime")
        functionDeclaration: str
        """
        Declaration of the function to call.
        """
        objectId: Optional["types.Runtime.TypeRemoteObjectId"] = None
        """
        Identifier of the object to call function on. Either objectId or executionContextId should
be specified.
        """
        arguments: Optional[list[Any]] = None
        """
        Call arguments. All call arguments must belong to the same JavaScript world as the target
object.
        """
        silent: Optional[bool] = None
        """
        In silent mode exceptions thrown during evaluation are not reported and do not pause
execution. Overrides `setPauseOnException` state.
        """
        returnByValue: Optional[bool] = None
        """
        Whether the result is expected to be a JSON object which should be sent by value.
Can be overriden by `serializationOptions`.
        """
        generatePreview: Optional[bool] = None
        """
        Whether preview should be generated for the result.
        """
        userGesture: Optional[bool] = None
        """
        Whether execution should be treated as initiated by user in the UI.
        """
        awaitPromise: Optional[bool] = None
        """
        Whether execution should `await` for resulting value and return once awaited promise is
resolved.
        """
        executionContextId: Optional["types.Runtime.TypeExecutionContextId"] = None
        """
        Specifies execution context which global object will be used to call function on. Either
executionContextId or objectId should be specified.
        """
        objectGroup: Optional[str] = None
        """
        Symbolic group name that can be used to release multiple objects. If objectGroup is not
specified and objectId is, objectGroup will be inherited from object.
        """
        throwOnSideEffect: Optional[bool] = None
        """
        Whether to throw an exception if side effect cannot be ruled out during evaluation.
        """
        uniqueContextId: Optional[str] = None
        """
        An alternative way to specify the execution context to call function on.
Compared to contextId that may be reused across processes, this is guaranteed to be
system-unique, so it can be used to prevent accidental function call
in context different than intended (e.g. as a result of navigation across process
boundaries).
This is mutually exclusive with `executionContextId`.
        """
        serializationOptions: Optional["types.Runtime.TypeSerializationOptions"] = None
        """
        Specifies the result serialization. If provided, overrides
`generatePreview` and `returnByValue`.
        """

    class compileScript(ICommand):
        """
        Compiles expression.
        """

        _domain: str = PrivateAttr("Runtime")
        expression: str
        """
        Expression to compile.
        """
        sourceURL: str
        """
        Source url to be set for the script.
        """
        persistScript: bool
        """
        Specifies whether the compiled script should be persisted.
        """
        executionContextId: Optional["types.Runtime.TypeExecutionContextId"] = None
        """
        Specifies in which execution context to perform script run. If the parameter is omitted the
evaluation will be performed in the context of the inspected page.
        """

    class disable(ICommand):
        """
        Disables reporting of execution contexts creation.
        """

        _domain: str = PrivateAttr("Runtime")

    class discardConsoleEntries(ICommand):
        """
        Discards collected exceptions and console API calls.
        """

        _domain: str = PrivateAttr("Runtime")

    class enable(ICommand):
        """
                Enables reporting of execution contexts creation by means of `executionContextCreated` event.
        When the reporting gets enabled the event will be sent immediately for each existing execution
        context.
        """

        _domain: str = PrivateAttr("Runtime")

    class evaluate(ICommand):
        """
        Evaluates expression on global object.
        """

        _domain: str = PrivateAttr("Runtime")
        expression: str
        """
        Expression to evaluate.
        """
        objectGroup: Optional[str] = None
        """
        Symbolic group name that can be used to release multiple objects.
        """
        includeCommandLineAPI: Optional[bool] = None
        """
        Determines whether Command Line API should be available during the evaluation.
        """
        silent: Optional[bool] = None
        """
        In silent mode exceptions thrown during evaluation are not reported and do not pause
execution. Overrides `setPauseOnException` state.
        """
        contextId: Optional["types.Runtime.TypeExecutionContextId"] = None
        """
        Specifies in which execution context to perform evaluation. If the parameter is omitted the
evaluation will be performed in the context of the inspected page.
This is mutually exclusive with `uniqueContextId`, which offers an
alternative way to identify the execution context that is more reliable
in a multi-process environment.
        """
        returnByValue: Optional[bool] = None
        """
        Whether the result is expected to be a JSON object that should be sent by value.
        """
        generatePreview: Optional[bool] = None
        """
        Whether preview should be generated for the result.
        """
        userGesture: Optional[bool] = None
        """
        Whether execution should be treated as initiated by user in the UI.
        """
        awaitPromise: Optional[bool] = None
        """
        Whether execution should `await` for resulting value and return once awaited promise is
resolved.
        """
        throwOnSideEffect: Optional[bool] = None
        """
        Whether to throw an exception if side effect cannot be ruled out during evaluation.
This implies `disableBreaks` below.
        """
        timeout: Optional["types.Runtime.TypeTimeDelta"] = None
        """
        Terminate execution after timing out (number of milliseconds).
        """
        disableBreaks: Optional[bool] = None
        """
        Disable breakpoints during execution.
        """
        replMode: Optional[bool] = None
        """
        Setting this flag to true enables `let` re-declaration and top-level `await`.
Note that `let` variables can only be re-declared if they originate from
`replMode` themselves.
        """
        allowUnsafeEvalBlockedByCSP: Optional[bool] = None
        """
        The Content Security Policy (CSP) for the target might block 'unsafe-eval'
which includes eval(), Function(), setTimeout() and setInterval()
when called with non-callable arguments. This flag bypasses CSP for this
evaluation and allows unsafe-eval. Defaults to true.
        """
        uniqueContextId: Optional[str] = None
        """
        An alternative way to specify the execution context to evaluate in.
Compared to contextId that may be reused across processes, this is guaranteed to be
system-unique, so it can be used to prevent accidental evaluation of the expression
in context different than intended (e.g. as a result of navigation across process
boundaries).
This is mutually exclusive with `contextId`.
        """
        serializationOptions: Optional["types.Runtime.TypeSerializationOptions"] = None
        """
        Specifies the result serialization. If provided, overrides
`generatePreview` and `returnByValue`.
        """

    class getIsolateId(ICommand):
        """
        Returns the isolate id.
        """

        _domain: str = PrivateAttr("Runtime")

    class getHeapUsage(ICommand):
        """
                Returns the JavaScript heap usage.
        It is the total usage of the corresponding isolate not scoped to a particular Runtime.
        """

        _domain: str = PrivateAttr("Runtime")

    class getProperties(ICommand):
        """
                Returns properties of a given object. Object group of the result is inherited from the target
        object.
        """

        _domain: str = PrivateAttr("Runtime")
        objectId: "types.Runtime.TypeRemoteObjectId"
        """
        Identifier of the object to return properties for.
        """
        ownProperties: Optional[bool] = None
        """
        If true, returns properties belonging only to the element itself, not to its prototype
chain.
        """
        accessorPropertiesOnly: Optional[bool] = None
        """
        If true, returns accessor properties (with getter/setter) only; internal properties are not
returned either.
        """
        generatePreview: Optional[bool] = None
        """
        Whether preview should be generated for the results.
        """
        nonIndexedPropertiesOnly: Optional[bool] = None
        """
        If true, returns non-indexed properties only.
        """

    class globalLexicalScopeNames(ICommand):
        """
        Returns all let, const and class variables from global scope.
        """

        _domain: str = PrivateAttr("Runtime")
        executionContextId: Optional["types.Runtime.TypeExecutionContextId"] = None
        """
        Specifies in which execution context to lookup global scope variables.
        """

    class queryObjects(ICommand):
        _domain: str = PrivateAttr("Runtime")
        prototypeObjectId: "types.Runtime.TypeRemoteObjectId"
        """
        Identifier of the prototype to return objects for.
        """
        objectGroup: Optional[str] = None
        """
        Symbolic group name that can be used to release the results.
        """

    class releaseObject(ICommand):
        """
        Releases remote object with given id.
        """

        _domain: str = PrivateAttr("Runtime")
        objectId: "types.Runtime.TypeRemoteObjectId"
        """
        Identifier of the object to release.
        """

    class releaseObjectGroup(ICommand):
        """
        Releases all remote objects that belong to a given group.
        """

        _domain: str = PrivateAttr("Runtime")
        objectGroup: str
        """
        Symbolic object group name.
        """

    class runIfWaitingForDebugger(ICommand):
        """
        Tells inspected instance to run if it was waiting for debugger to attach.
        """

        _domain: str = PrivateAttr("Runtime")

    class runScript(ICommand):
        """
        Runs script with given id in a given context.
        """

        _domain: str = PrivateAttr("Runtime")
        scriptId: "types.Runtime.TypeScriptId"
        """
        Id of the script to run.
        """
        executionContextId: Optional["types.Runtime.TypeExecutionContextId"] = None
        """
        Specifies in which execution context to perform script run. If the parameter is omitted the
evaluation will be performed in the context of the inspected page.
        """
        objectGroup: Optional[str] = None
        """
        Symbolic group name that can be used to release multiple objects.
        """
        silent: Optional[bool] = None
        """
        In silent mode exceptions thrown during evaluation are not reported and do not pause
execution. Overrides `setPauseOnException` state.
        """
        includeCommandLineAPI: Optional[bool] = None
        """
        Determines whether Command Line API should be available during the evaluation.
        """
        returnByValue: Optional[bool] = None
        """
        Whether the result is expected to be a JSON object which should be sent by value.
        """
        generatePreview: Optional[bool] = None
        """
        Whether preview should be generated for the result.
        """
        awaitPromise: Optional[bool] = None
        """
        Whether execution should `await` for resulting value and return once awaited promise is
resolved.
        """

    class setAsyncCallStackDepth(ICommand):
        """
        Enables or disables async call stacks tracking.
        """

        _domain: str = PrivateAttr("Runtime")
        maxDepth: Union[float, int]
        """
        Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async
call stacks (default).
        """

    class setCustomObjectFormatterEnabled(ICommand):
        _domain: str = PrivateAttr("Runtime")
        enabled: bool

    class setMaxCallStackSizeToCapture(ICommand):
        _domain: str = PrivateAttr("Runtime")
        size: Union[float, int]

    class terminateExecution(ICommand):
        """
                Terminate current or next JavaScript execution.
        Will cancel the termination when the outer-most script execution ends.
        """

        _domain: str = PrivateAttr("Runtime")

    class addBinding(ICommand):
        """
                If executionContextId is empty, adds binding with the given name on the
        global objects of all inspected contexts, including those created later,
        bindings survive reloads.
        Binding function takes exactly one argument, this argument should be string,
        in case of any other input, function throws an exception.
        Each binding function call produces Runtime.bindingCalled notification.
        """

        _domain: str = PrivateAttr("Runtime")
        name: str
        executionContextId: Optional["types.Runtime.TypeExecutionContextId"] = None
        """
        If specified, the binding would only be exposed to the specified
execution context. If omitted and `executionContextName` is not set,
the binding is exposed to all execution contexts of the target.
This parameter is mutually exclusive with `executionContextName`.
Deprecated in favor of `executionContextName` due to an unclear use case
and bugs in implementation (crbug.com/1169639). `executionContextId` will be
removed in the future.
        """
        executionContextName: Optional[str] = None
        """
        If specified, the binding is exposed to the executionContext with
matching name, even for contexts created after the binding is added.
See also `ExecutionContext.name` and `worldName` parameter to
`Page.addScriptToEvaluateOnNewDocument`.
This parameter is mutually exclusive with `executionContextId`.
        """

    class removeBinding(ICommand):
        """
                This method does not remove binding function from global object but
        unsubscribes current runtime agent from Runtime.bindingCalled notifications.
        """

        _domain: str = PrivateAttr("Runtime")
        name: str

    class getExceptionDetails(ICommand):
        """
                This method tries to lookup and populate exception details for a
        JavaScript Error object.
        Note that the stackTrace portion of the resulting exceptionDetails will
        only be populated if the Runtime domain was enabled at the time when the
        Error was thrown.
        """

        _domain: str = PrivateAttr("Runtime")
        errorObjectId: "types.Runtime.TypeRemoteObjectId"
        """
        The error object for which to resolve the exception details.
        """


class Schema:
    """
    This domain is deprecated.
    """

    class getDomains(ICommand):
        """
        Returns supported domains.
        """

        _domain: str = PrivateAttr("Schema")


class Accessibility:
    class disable(ICommand):
        """
        Disables the accessibility domain.
        """

        _domain: str = PrivateAttr("Accessibility")

    class enable(ICommand):
        """
                Enables the accessibility domain which causes `AXNodeId`s to remain consistent between method calls.
        This turns on accessibility for the page, which can impact performance until accessibility is disabled.
        """

        _domain: str = PrivateAttr("Accessibility")

    class getPartialAXTree(ICommand):
        """
        Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.
        """

        _domain: str = PrivateAttr("Accessibility")
        nodeId: Optional["types.DOM.TypeNodeId"] = None
        """
        Identifier of the node to get the partial accessibility tree for.
        """
        backendNodeId: Optional["types.DOM.TypeBackendNodeId"] = None
        """
        Identifier of the backend node to get the partial accessibility tree for.
        """
        objectId: Optional["types.Runtime.TypeRemoteObjectId"] = None
        """
        JavaScript object id of the node wrapper to get the partial accessibility tree for.
        """
        fetchRelatives: Optional[bool] = None
        """
        Whether to fetch this node's ancestors, siblings and children. Defaults to true.
        """

    class getFullAXTree(ICommand):
        """
        Fetches the entire accessibility tree for the root Document
        """

        _domain: str = PrivateAttr("Accessibility")
        depth: Optional[Union[float, int]] = None
        """
        The maximum depth at which descendants of the root node should be retrieved.
If omitted, the full tree is returned.
        """
        frameId: Optional["types.Page.TypeFrameId"] = None
        """
        The frame for whose document the AX tree should be retrieved.
If omitted, the root frame is used.
        """

    class getRootAXNode(ICommand):
        """
                Fetches the root node.
        Requires `enable()` to have been called previously.
        """

        _domain: str = PrivateAttr("Accessibility")
        frameId: Optional["types.Page.TypeFrameId"] = None
        """
        The frame in whose document the node resides.
If omitted, the root frame is used.
        """

    class getAXNodeAndAncestors(ICommand):
        """
                Fetches a node and all ancestors up to and including the root.
        Requires `enable()` to have been called previously.
        """

        _domain: str = PrivateAttr("Accessibility")
        nodeId: Optional["types.DOM.TypeNodeId"] = None
        """
        Identifier of the node to get.
        """
        backendNodeId: Optional["types.DOM.TypeBackendNodeId"] = None
        """
        Identifier of the backend node to get.
        """
        objectId: Optional["types.Runtime.TypeRemoteObjectId"] = None
        """
        JavaScript object id of the node wrapper to get.
        """

    class getChildAXNodes(ICommand):
        """
                Fetches a particular accessibility node by AXNodeId.
        Requires `enable()` to have been called previously.
        """

        _domain: str = PrivateAttr("Accessibility")
        id: "types.Accessibility.TypeAXNodeId"
        frameId: Optional["types.Page.TypeFrameId"] = None
        """
        The frame in whose document the node resides.
If omitted, the root frame is used.
        """

    class queryAXTree(ICommand):
        """
                Query a DOM node's accessibility subtree for accessible name and role.
        This command computes the name and role for all nodes in the subtree, including those that are
        ignored for accessibility, and returns those that match the specified name and role. If no DOM
        node is specified, or the DOM node does not exist, the command returns an error. If neither
        `accessibleName` or `role` is specified, it returns all the accessibility nodes in the subtree.
        """

        _domain: str = PrivateAttr("Accessibility")
        nodeId: Optional["types.DOM.TypeNodeId"] = None
        """
        Identifier of the node for the root to query.
        """
        backendNodeId: Optional["types.DOM.TypeBackendNodeId"] = None
        """
        Identifier of the backend node for the root to query.
        """
        objectId: Optional["types.Runtime.TypeRemoteObjectId"] = None
        """
        JavaScript object id of the node wrapper for the root to query.
        """
        accessibleName: Optional[str] = None
        """
        Find nodes with this computed name.
        """
        role: Optional[str] = None
        """
        Find nodes with this computed role.
        """


class Animation:
    class disable(ICommand):
        """
        Disables animation domain notifications.
        """

        _domain: str = PrivateAttr("Animation")

    class enable(ICommand):
        """
        Enables animation domain notifications.
        """

        _domain: str = PrivateAttr("Animation")

    class getCurrentTime(ICommand):
        """
        Returns the current time of the an animation.
        """

        _domain: str = PrivateAttr("Animation")
        id: str
        """
        Id of animation.
        """

    class getPlaybackRate(ICommand):
        """
        Gets the playback rate of the document timeline.
        """

        _domain: str = PrivateAttr("Animation")

    class releaseAnimations(ICommand):
        """
        Releases a set of animations to no longer be manipulated.
        """

        _domain: str = PrivateAttr("Animation")
        animations: list[Any]
        """
        List of animation ids to seek.
        """

    class resolveAnimation(ICommand):
        """
        Gets the remote object of the Animation.
        """

        _domain: str = PrivateAttr("Animation")
        animationId: str
        """
        Animation id.
        """

    class seekAnimations(ICommand):
        """
        Seek a set of animations to a particular time within each animation.
        """

        _domain: str = PrivateAttr("Animation")
        animations: list[Any]
        """
        List of animation ids to seek.
        """
        currentTime: Union[float, int]
        """
        Set the current time of each animation.
        """

    class setPaused(ICommand):
        """
        Sets the paused state of a set of animations.
        """

        _domain: str = PrivateAttr("Animation")
        animations: list[Any]
        """
        Animations to set the pause state of.
        """
        paused: bool
        """
        Paused state to set to.
        """

    class setPlaybackRate(ICommand):
        """
        Sets the playback rate of the document timeline.
        """

        _domain: str = PrivateAttr("Animation")
        playbackRate: Union[float, int]
        """
        Playback rate for animations on page
        """

    class setTiming(ICommand):
        """
        Sets the timing of an animation node.
        """

        _domain: str = PrivateAttr("Animation")
        animationId: str
        """
        Animation id.
        """
        duration: Union[float, int]
        """
        Duration of the animation.
        """
        delay: Union[float, int]
        """
        Delay of the animation.
        """


class Audits:
    """
    Audits domain allows investigation of page violations and possible improvements.
    """

    class getEncodedResponse(ICommand):
        """
                Returns the response body and size if it were re-encoded with the specified settings. Only
        applies to images.
        """

        _domain: str = PrivateAttr("Audits")
        requestId: "types.Network.TypeRequestId"
        """
        Identifier of the network request to get content for.
        """
        encoding: Literal["webp", "jpeg", "png"]
        """
        The encoding to use.
        """
        quality: Optional[Union[float, int]] = None
        """
        The quality of the encoding (0-1). (defaults to 1)
        """
        sizeOnly: Optional[bool] = None
        """
        Whether to only return the size information (defaults to false).
        """

    class disable(ICommand):
        """
        Disables issues domain, prevents further issues from being reported to the client.
        """

        _domain: str = PrivateAttr("Audits")

    class enable(ICommand):
        """
                Enables issues domain, sends the issues collected so far to the client by means of the
        `issueAdded` event.
        """

        _domain: str = PrivateAttr("Audits")

    class checkContrast(ICommand):
        """
                Runs the contrast check for the target page. Found issues are reported
        using Audits.issueAdded event.
        """

        _domain: str = PrivateAttr("Audits")
        reportAAA: Optional[bool] = None
        """
        Whether to report WCAG AAA level issues. Default is false.
        """

    class checkFormsIssues(ICommand):
        """
                Runs the form issues check for the target page. Found issues are reported
        using Audits.issueAdded event.
        """

        _domain: str = PrivateAttr("Audits")


class Extensions:
    """
        Defines commands and events for browser extensions. Available if the client
    is connected using the --remote-debugging-pipe flag and
    the --enable-unsafe-extension-debugging flag is set.
    """

    class loadUnpacked(ICommand):
        """
                Installs an unpacked extension from the filesystem similar to
        --load-extension CLI flags. Returns extension ID once the extension
        has been installed.
        """

        _domain: str = PrivateAttr("Extensions")
        path: str
        """
        Absolute file path.
        """


class Autofill:
    """
    Defines commands and events for Autofill.
    """

    class trigger(ICommand):
        """
                Trigger autofill on a form identified by the fieldId.
        If the field and related form cannot be autofilled, returns an error.
        """

        _domain: str = PrivateAttr("Autofill")
        fieldId: "types.DOM.TypeBackendNodeId"
        """
        Identifies a field that serves as an anchor for autofill.
        """
        frameId: Optional["types.Page.TypeFrameId"] = None
        """
        Identifies the frame that field belongs to.
        """
        card: "types.Autofill.TypeCreditCard"
        """
        Credit card information to fill out the form. Credit card data is not saved.
        """

    class setAddresses(ICommand):
        """
        Set addresses so that developers can verify their forms implementation.
        """

        _domain: str = PrivateAttr("Autofill")
        addresses: list[Any]

    class disable(ICommand):
        """
        Disables autofill domain notifications.
        """

        _domain: str = PrivateAttr("Autofill")

    class enable(ICommand):
        """
        Enables autofill domain notifications.
        """

        _domain: str = PrivateAttr("Autofill")


class BackgroundService:
    """
    Defines events for background web platform features.
    """

    class startObserving(ICommand):
        """
        Enables event updates for the service.
        """

        _domain: str = PrivateAttr("BackgroundService")
        service: "types.BackgroundService.TypeServiceName"

    class stopObserving(ICommand):
        """
        Disables event updates for the service.
        """

        _domain: str = PrivateAttr("BackgroundService")
        service: "types.BackgroundService.TypeServiceName"

    class setRecording(ICommand):
        """
        Set the recording state for the service.
        """

        _domain: str = PrivateAttr("BackgroundService")
        shouldRecord: bool
        service: "types.BackgroundService.TypeServiceName"

    class clearEvents(ICommand):
        """
        Clears all stored data for the service.
        """

        _domain: str = PrivateAttr("BackgroundService")
        service: "types.BackgroundService.TypeServiceName"


class Browser:
    """
    The Browser domain defines methods and events for browser managing.
    """

    class setPermission(ICommand):
        """
        Set permission settings for given origin.
        """

        _domain: str = PrivateAttr("Browser")
        permission: "types.Browser.TypePermissionDescriptor"
        """
        Descriptor of permission to override.
        """
        setting: "types.Browser.TypePermissionSetting"
        """
        Setting of the permission.
        """
        origin: Optional[str] = None
        """
        Origin the permission applies to, all origins if not specified.
        """
        browserContextId: Optional["types.Browser.TypeBrowserContextID"] = None
        """
        Context to override. When omitted, default browser context is used.
        """

    class grantPermissions(ICommand):
        """
        Grant specific permissions to the given origin and reject all others.
        """

        _domain: str = PrivateAttr("Browser")
        permissions: list[Any]
        origin: Optional[str] = None
        """
        Origin the permission applies to, all origins if not specified.
        """
        browserContextId: Optional["types.Browser.TypeBrowserContextID"] = None
        """
        BrowserContext to override permissions. When omitted, default browser context is used.
        """

    class resetPermissions(ICommand):
        """
        Reset all permission management for all origins.
        """

        _domain: str = PrivateAttr("Browser")
        browserContextId: Optional["types.Browser.TypeBrowserContextID"] = None
        """
        BrowserContext to reset permissions. When omitted, default browser context is used.
        """

    class setDownloadBehavior(ICommand):
        """
        Set the behavior when downloading a file.
        """

        _domain: str = PrivateAttr("Browser")
        behavior: Literal["deny", "allow", "allowAndName", "default"]
        """
        Whether to allow all or deny all download requests, or use default Chrome behavior if
available (otherwise deny). |allowAndName| allows download and names files according to
their download guids.
        """
        browserContextId: Optional["types.Browser.TypeBrowserContextID"] = None
        """
        BrowserContext to set download behavior. When omitted, default browser context is used.
        """
        downloadPath: Optional[str] = None
        """
        The default path to save downloaded files to. This is required if behavior is set to 'allow'
or 'allowAndName'.
        """
        eventsEnabled: Optional[bool] = None
        """
        Whether to emit download events (defaults to false).
        """

    class cancelDownload(ICommand):
        """
        Cancel a download if in progress
        """

        _domain: str = PrivateAttr("Browser")
        guid: str
        """
        Global unique identifier of the download.
        """
        browserContextId: Optional["types.Browser.TypeBrowserContextID"] = None
        """
        BrowserContext to perform the action in. When omitted, default browser context is used.
        """

    class close(ICommand):
        """
        Close browser gracefully.
        """

        _domain: str = PrivateAttr("Browser")

    class crash(ICommand):
        """
        Crashes browser on the main thread.
        """

        _domain: str = PrivateAttr("Browser")

    class crashGpuProcess(ICommand):
        """
        Crashes GPU process.
        """

        _domain: str = PrivateAttr("Browser")

    class getVersion(ICommand):
        """
        Returns version information.
        """

        _domain: str = PrivateAttr("Browser")

    class getBrowserCommandLine(ICommand):
        """
                Returns the command line switches for the browser process if, and only if
        --enable-automation is on the commandline.
        """

        _domain: str = PrivateAttr("Browser")

    class getHistograms(ICommand):
        """
        Get Chrome histograms.
        """

        _domain: str = PrivateAttr("Browser")
        query: Optional[str] = None
        """
        Requested substring in name. Only histograms which have query as a
substring in their name are extracted. An empty or absent query returns
all histograms.
        """
        delta: Optional[bool] = None
        """
        If true, retrieve delta since last delta call.
        """

    class getHistogram(ICommand):
        """
        Get a Chrome histogram by name.
        """

        _domain: str = PrivateAttr("Browser")
        name: str
        """
        Requested histogram name.
        """
        delta: Optional[bool] = None
        """
        If true, retrieve delta since last delta call.
        """

    class getWindowBounds(ICommand):
        """
        Get position and size of the browser window.
        """

        _domain: str = PrivateAttr("Browser")
        windowId: "types.Browser.TypeWindowID"
        """
        Browser window id.
        """

    class getWindowForTarget(ICommand):
        """
        Get the browser window that contains the devtools target.
        """

        _domain: str = PrivateAttr("Browser")
        targetId: Optional["types.Target.TypeTargetID"] = None
        """
        Devtools agent host id. If called as a part of the session, associated targetId is used.
        """

    class setWindowBounds(ICommand):
        """
        Set position and/or size of the browser window.
        """

        _domain: str = PrivateAttr("Browser")
        windowId: "types.Browser.TypeWindowID"
        """
        Browser window id.
        """
        bounds: "types.Browser.TypeBounds"
        """
        New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined
with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged.
        """

    class setDockTile(ICommand):
        """
        Set dock tile details, platform-specific.
        """

        _domain: str = PrivateAttr("Browser")
        badgeLabel: Optional[str] = None
        image: Optional[str] = None
        """
        Png encoded image. (Encoded as a base64 string when passed over JSON)
        """

    class executeBrowserCommand(ICommand):
        """
        Invoke custom browser commands used by telemetry.
        """

        _domain: str = PrivateAttr("Browser")
        commandId: "types.Browser.TypeBrowserCommandId"

    class addPrivacySandboxEnrollmentOverride(ICommand):
        """
                Allows a site to use privacy sandbox features that require enrollment
        without the site actually being enrolled. Only supported on page targets.
        """

        _domain: str = PrivateAttr("Browser")
        url: str


class CSS:
    """
        This domain exposes CSS read/write operations. All CSS objects (stylesheets, rules, and styles)
    have an associated `id` used in subsequent operations on the related object. Each object type has
    a specific `id` structure, and those are not interchangeable between objects of different kinds.
    CSS objects can be loaded using the `get*ForNode()` calls (which accept a DOM node id). A client
    can also keep track of stylesheets via the `styleSheetAdded`/`styleSheetRemoved` events and
    subsequently load the required stylesheet contents using the `getStyleSheet[Text]()` methods.
    """

    class addRule(ICommand):
        """
                Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the
        position specified by `location`.
        """

        _domain: str = PrivateAttr("CSS")
        styleSheetId: "types.CSS.TypeStyleSheetId"
        """
        The css style sheet identifier where a new rule should be inserted.
        """
        ruleText: str
        """
        The text of a new rule.
        """
        location: "types.CSS.TypeSourceRange"
        """
        Text position of a new rule in the target style sheet.
        """
        nodeForPropertySyntaxValidation: Optional["types.DOM.TypeNodeId"] = None
        """
        NodeId for the DOM node in whose context custom property declarations for registered properties should be
validated. If omitted, declarations in the new rule text can only be validated statically, which may produce
incorrect results if the declaration contains a var() for example.
        """

    class collectClassNames(ICommand):
        """
        Returns all class names from specified stylesheet.
        """

        _domain: str = PrivateAttr("CSS")
        styleSheetId: "types.CSS.TypeStyleSheetId"

    class createStyleSheet(ICommand):
        """
        Creates a new special "via-inspector" stylesheet in the frame with given `frameId`.
        """

        _domain: str = PrivateAttr("CSS")
        frameId: "types.Page.TypeFrameId"
        """
        Identifier of the frame where "via-inspector" stylesheet should be created.
        """

    class disable(ICommand):
        """
        Disables the CSS agent for the given page.
        """

        _domain: str = PrivateAttr("CSS")

    class enable(ICommand):
        """
                Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been
        enabled until the result of this command is received.
        """

        _domain: str = PrivateAttr("CSS")

    class forcePseudoState(ICommand):
        """
                Ensures that the given node will have specified pseudo-classes whenever its style is computed by
        the browser.
        """

        _domain: str = PrivateAttr("CSS")
        nodeId: "types.DOM.TypeNodeId"
        """
        The element id for which to force the pseudo state.
        """
        forcedPseudoClasses: list[Any]
        """
        Element pseudo classes to force when computing the element's style.
        """

    class getBackgroundColors(ICommand):
        _domain: str = PrivateAttr("CSS")
        nodeId: "types.DOM.TypeNodeId"
        """
        Id of the node to get background colors for.
        """

    class getComputedStyleForNode(ICommand):
        """
        Returns the computed style for a DOM node identified by `nodeId`.
        """

        _domain: str = PrivateAttr("CSS")
        nodeId: "types.DOM.TypeNodeId"

    class getInlineStylesForNode(ICommand):
        """
                Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM
        attributes) for a DOM node identified by `nodeId`.
        """

        _domain: str = PrivateAttr("CSS")
        nodeId: "types.DOM.TypeNodeId"

    class getMatchedStylesForNode(ICommand):
        """
        Returns requested styles for a DOM node identified by `nodeId`.
        """

        _domain: str = PrivateAttr("CSS")
        nodeId: "types.DOM.TypeNodeId"

    class getMediaQueries(ICommand):
        """
        Returns all media queries parsed by the rendering engine.
        """

        _domain: str = PrivateAttr("CSS")

    class getPlatformFontsForNode(ICommand):
        """
                Requests information about platform fonts which we used to render child TextNodes in the given
        node.
        """

        _domain: str = PrivateAttr("CSS")
        nodeId: "types.DOM.TypeNodeId"

    class getStyleSheetText(ICommand):
        """
        Returns the current textual content for a stylesheet.
        """

        _domain: str = PrivateAttr("CSS")
        styleSheetId: "types.CSS.TypeStyleSheetId"

    class getLayersForNode(ICommand):
        """
                Returns all layers parsed by the rendering engine for the tree scope of a node.
        Given a DOM element identified by nodeId, getLayersForNode returns the root
        layer for the nearest ancestor document or shadow root. The layer root contains
        the full layer tree for the tree scope and their ordering.
        """

        _domain: str = PrivateAttr("CSS")
        nodeId: "types.DOM.TypeNodeId"

    class getLocationForSelector(ICommand):
        """
                Given a CSS selector text and a style sheet ID, getLocationForSelector
        returns an array of locations of the CSS selector in the style sheet.
        """

        _domain: str = PrivateAttr("CSS")
        styleSheetId: "types.CSS.TypeStyleSheetId"
        selectorText: str

    class trackComputedStyleUpdates(ICommand):
        """
                Starts tracking the given computed styles for updates. The specified array of properties
        replaces the one previously specified. Pass empty array to disable tracking.
        Use takeComputedStyleUpdates to retrieve the list of nodes that had properties modified.
        The changes to computed style properties are only tracked for nodes pushed to the front-end
        by the DOM agent. If no changes to the tracked properties occur after the node has been pushed
        to the front-end, no updates will be issued for the node.
        """

        _domain: str = PrivateAttr("CSS")
        propertiesToTrack: list[Any]

    class takeComputedStyleUpdates(ICommand):
        """
        Polls the next batch of computed style updates.
        """

        _domain: str = PrivateAttr("CSS")

    class setEffectivePropertyValueForNode(ICommand):
        """
                Find a rule with the given active property for the given node and set the new value for this
        property
        """

        _domain: str = PrivateAttr("CSS")
        nodeId: "types.DOM.TypeNodeId"
        """
        The element id for which to set property.
        """
        propertyName: str
        value: str

    class setPropertyRulePropertyName(ICommand):
        """
        Modifies the property rule property name.
        """

        _domain: str = PrivateAttr("CSS")
        styleSheetId: "types.CSS.TypeStyleSheetId"
        range: "types.CSS.TypeSourceRange"
        propertyName: str

    class setKeyframeKey(ICommand):
        """
        Modifies the keyframe rule key text.
        """

        _domain: str = PrivateAttr("CSS")
        styleSheetId: "types.CSS.TypeStyleSheetId"
        range: "types.CSS.TypeSourceRange"
        keyText: str

    class setMediaText(ICommand):
        """
        Modifies the rule selector.
        """

        _domain: str = PrivateAttr("CSS")
        styleSheetId: "types.CSS.TypeStyleSheetId"
        range: "types.CSS.TypeSourceRange"
        text: str

    class setContainerQueryText(ICommand):
        """
        Modifies the expression of a container query.
        """

        _domain: str = PrivateAttr("CSS")
        styleSheetId: "types.CSS.TypeStyleSheetId"
        range: "types.CSS.TypeSourceRange"
        text: str

    class setSupportsText(ICommand):
        """
        Modifies the expression of a supports at-rule.
        """

        _domain: str = PrivateAttr("CSS")
        styleSheetId: "types.CSS.TypeStyleSheetId"
        range: "types.CSS.TypeSourceRange"
        text: str

    class setScopeText(ICommand):
        """
        Modifies the expression of a scope at-rule.
        """

        _domain: str = PrivateAttr("CSS")
        styleSheetId: "types.CSS.TypeStyleSheetId"
        range: "types.CSS.TypeSourceRange"
        text: str

    class setRuleSelector(ICommand):
        """
        Modifies the rule selector.
        """

        _domain: str = PrivateAttr("CSS")
        styleSheetId: "types.CSS.TypeStyleSheetId"
        range: "types.CSS.TypeSourceRange"
        selector: str

    class setStyleSheetText(ICommand):
        """
        Sets the new stylesheet text.
        """

        _domain: str = PrivateAttr("CSS")
        styleSheetId: "types.CSS.TypeStyleSheetId"
        text: str

    class setStyleTexts(ICommand):
        """
        Applies specified style edits one after another in the given order.
        """

        _domain: str = PrivateAttr("CSS")
        edits: list[Any]
        nodeForPropertySyntaxValidation: Optional["types.DOM.TypeNodeId"] = None
        """
        NodeId for the DOM node in whose context custom property declarations for registered properties should be
validated. If omitted, declarations in the new rule text can only be validated statically, which may produce
incorrect results if the declaration contains a var() for example.
        """

    class startRuleUsageTracking(ICommand):
        """
        Enables the selector recording.
        """

        _domain: str = PrivateAttr("CSS")

    class stopRuleUsageTracking(ICommand):
        """
                Stop tracking rule usage and return the list of rules that were used since last call to
        `takeCoverageDelta` (or since start of coverage instrumentation).
        """

        _domain: str = PrivateAttr("CSS")

    class takeCoverageDelta(ICommand):
        """
                Obtain list of rules that became used since last call to this method (or since start of coverage
        instrumentation).
        """

        _domain: str = PrivateAttr("CSS")

    class setLocalFontsEnabled(ICommand):
        """
        Enables/disables rendering of local CSS fonts (enabled by default).
        """

        _domain: str = PrivateAttr("CSS")
        enabled: bool
        """
        Whether rendering of local fonts is enabled.
        """


class CacheStorage:
    class deleteCache(ICommand):
        """
        Deletes a cache.
        """

        _domain: str = PrivateAttr("CacheStorage")
        cacheId: "types.CacheStorage.TypeCacheId"
        """
        Id of cache for deletion.
        """

    class deleteEntry(ICommand):
        """
        Deletes a cache entry.
        """

        _domain: str = PrivateAttr("CacheStorage")
        cacheId: "types.CacheStorage.TypeCacheId"
        """
        Id of cache where the entry will be deleted.
        """
        request: str
        """
        URL spec of the request.
        """

    class requestCacheNames(ICommand):
        """
        Requests cache names.
        """

        _domain: str = PrivateAttr("CacheStorage")
        securityOrigin: Optional[str] = None
        """
        At least and at most one of securityOrigin, storageKey, storageBucket must be specified.
Security origin.
        """
        storageKey: Optional[str] = None
        """
        Storage key.
        """
        storageBucket: Optional["types.Storage.TypeStorageBucket"] = None
        """
        Storage bucket. If not specified, it uses the default bucket.
        """

    class requestCachedResponse(ICommand):
        """
        Fetches cache entry.
        """

        _domain: str = PrivateAttr("CacheStorage")
        cacheId: "types.CacheStorage.TypeCacheId"
        """
        Id of cache that contains the entry.
        """
        requestURL: str
        """
        URL spec of the request.
        """
        requestHeaders: list[Any]
        """
        headers of the request.
        """

    class requestEntries(ICommand):
        """
        Requests data from cache.
        """

        _domain: str = PrivateAttr("CacheStorage")
        cacheId: "types.CacheStorage.TypeCacheId"
        """
        ID of cache to get entries from.
        """
        skipCount: Optional[Union[float, int]] = None
        """
        Number of records to skip.
        """
        pageSize: Optional[Union[float, int]] = None
        """
        Number of records to fetch.
        """
        pathFilter: Optional[str] = None
        """
        If present, only return the entries containing this substring in the path
        """


class Cast:
    """
        A domain for interacting with Cast, Presentation API, and Remote Playback API
    functionalities.
    """

    class enable(ICommand):
        """
                Starts observing for sinks that can be used for tab mirroring, and if set,
        sinks compatible with |presentationUrl| as well. When sinks are found, a
        |sinksUpdated| event is fired.
        Also starts observing for issue messages. When an issue is added or removed,
        an |issueUpdated| event is fired.
        """

        _domain: str = PrivateAttr("Cast")
        presentationUrl: Optional[str] = None

    class disable(ICommand):
        """
        Stops observing for sinks and issues.
        """

        _domain: str = PrivateAttr("Cast")

    class setSinkToUse(ICommand):
        """
                Sets a sink to be used when the web page requests the browser to choose a
        sink via Presentation API, Remote Playback API, or Cast SDK.
        """

        _domain: str = PrivateAttr("Cast")
        sinkName: str

    class startDesktopMirroring(ICommand):
        """
        Starts mirroring the desktop to the sink.
        """

        _domain: str = PrivateAttr("Cast")
        sinkName: str

    class startTabMirroring(ICommand):
        """
        Starts mirroring the tab to the sink.
        """

        _domain: str = PrivateAttr("Cast")
        sinkName: str

    class stopCasting(ICommand):
        """
        Stops the active Cast session on the sink.
        """

        _domain: str = PrivateAttr("Cast")
        sinkName: str


class DOM:
    """
        This domain exposes DOM read/write operations. Each DOM Node is represented with its mirror object
    that has an `id`. This `id` can be used to get additional information on the Node, resolve it into
    the JavaScript object wrapper, etc. It is important that client receives DOM events only for the
    nodes that are known to the client. Backend keeps track of the nodes that were sent to the client
    and never sends the same node twice. It is client's responsibility to collect information about
    the nodes that were sent to the client. Note that `iframe` owner elements will return
    corresponding document elements as their child nodes.
    """

    class collectClassNamesFromSubtree(ICommand):
        """
        Collects class names for the node with given id and all of it's child nodes.
        """

        _domain: str = PrivateAttr("DOM")
        nodeId: "types.DOM.TypeNodeId"
        """
        Id of the node to collect class names.
        """

    class copyTo(ICommand):
        """
                Creates a deep copy of the specified node and places it into the target container before the
        given anchor.
        """

        _domain: str = PrivateAttr("DOM")
        nodeId: "types.DOM.TypeNodeId"
        """
        Id of the node to copy.
        """
        targetNodeId: "types.DOM.TypeNodeId"
        """
        Id of the element to drop the copy into.
        """
        insertBeforeNodeId: Optional["types.DOM.TypeNodeId"] = None
        """
        Drop the copy before this node (if absent, the copy becomes the last child of
`targetNodeId`).
        """

    class describeNode(ICommand):
        """
                Describes node given its id, does not require domain to be enabled. Does not start tracking any
        objects, can be used for automation.
        """

        _domain: str = PrivateAttr("DOM")
        nodeId: Optional["types.DOM.TypeNodeId"] = None
        """
        Identifier of the node.
        """
        backendNodeId: Optional["types.DOM.TypeBackendNodeId"] = None
        """
        Identifier of the backend node.
        """
        objectId: Optional["types.Runtime.TypeRemoteObjectId"] = None
        """
        JavaScript object id of the node wrapper.
        """
        depth: Optional[Union[float, int]] = None
        """
        The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the
entire subtree or provide an integer larger than 0.
        """
        pierce: Optional[bool] = None
        """
        Whether or not iframes and shadow roots should be traversed when returning the subtree
(default is false).
        """

    class scrollIntoViewIfNeeded(ICommand):
        """
                Scrolls the specified rect of the given node into view if not already visible.
        Note: exactly one between nodeId, backendNodeId and objectId should be passed
        to identify the node.
        """

        _domain: str = PrivateAttr("DOM")
        nodeId: Optional["types.DOM.TypeNodeId"] = None
        """
        Identifier of the node.
        """
        backendNodeId: Optional["types.DOM.TypeBackendNodeId"] = None
        """
        Identifier of the backend node.
        """
        objectId: Optional["types.Runtime.TypeRemoteObjectId"] = None
        """
        JavaScript object id of the node wrapper.
        """
        rect: Optional["types.DOM.TypeRect"] = None
        """
        The rect to be scrolled into view, relative to the node's border box, in CSS pixels.
When omitted, center of the node will be used, similar to Element.scrollIntoView.
        """

    class disable(ICommand):
        """
        Disables DOM agent for the given page.
        """

        _domain: str = PrivateAttr("DOM")

    class discardSearchResults(ICommand):
        """
                Discards search results from the session with the given id. `getSearchResults` should no longer
        be called for that search.
        """

        _domain: str = PrivateAttr("DOM")
        searchId: str
        """
        Unique search session identifier.
        """

    class enable(ICommand):
        """
        Enables DOM agent for the given page.
        """

        _domain: str = PrivateAttr("DOM")
        includeWhitespace: Optional[Literal["none", "all"]] = None
        """
        Whether to include whitespaces in the children array of returned Nodes.
        """

    class focus(ICommand):
        """
        Focuses the given element.
        """

        _domain: str = PrivateAttr("DOM")
        nodeId: Optional["types.DOM.TypeNodeId"] = None
        """
        Identifier of the node.
        """
        backendNodeId: Optional["types.DOM.TypeBackendNodeId"] = None
        """
        Identifier of the backend node.
        """
        objectId: Optional["types.Runtime.TypeRemoteObjectId"] = None
        """
        JavaScript object id of the node wrapper.
        """

    class getAttributes(ICommand):
        """
        Returns attributes for the specified node.
        """

        _domain: str = PrivateAttr("DOM")
        nodeId: "types.DOM.TypeNodeId"
        """
        Id of the node to retrieve attributes for.
        """

    class getBoxModel(ICommand):
        """
        Returns boxes for the given node.
        """

        _domain: str = PrivateAttr("DOM")
        nodeId: Optional["types.DOM.TypeNodeId"] = None
        """
        Identifier of the node.
        """
        backendNodeId: Optional["types.DOM.TypeBackendNodeId"] = None
        """
        Identifier of the backend node.
        """
        objectId: Optional["types.Runtime.TypeRemoteObjectId"] = None
        """
        JavaScript object id of the node wrapper.
        """

    class getContentQuads(ICommand):
        """
                Returns quads that describe node position on the page. This method
        might return multiple quads for inline nodes.
        """

        _domain: str = PrivateAttr("DOM")
        nodeId: Optional["types.DOM.TypeNodeId"] = None
        """
        Identifier of the node.
        """
        backendNodeId: Optional["types.DOM.TypeBackendNodeId"] = None
        """
        Identifier of the backend node.
        """
        objectId: Optional["types.Runtime.TypeRemoteObjectId"] = None
        """
        JavaScript object id of the node wrapper.
        """

    class getDocument(ICommand):
        """
                Returns the root DOM node (and optionally the subtree) to the caller.
        Implicitly enables the DOM domain events for the current target.
        """

        _domain: str = PrivateAttr("DOM")
        depth: Optional[Union[float, int]] = None
        """
        The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the
entire subtree or provide an integer larger than 0.
        """
        pierce: Optional[bool] = None
        """
        Whether or not iframes and shadow roots should be traversed when returning the subtree
(default is false).
        """

    class getFlattenedDocument(ICommand):
        """
                Returns the root DOM node (and optionally the subtree) to the caller.
        Deprecated, as it is not designed to work well with the rest of the DOM agent.
        Use DOMSnapshot.captureSnapshot instead.
        """

        _domain: str = PrivateAttr("DOM")
        depth: Optional[Union[float, int]] = None
        """
        The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the
entire subtree or provide an integer larger than 0.
        """
        pierce: Optional[bool] = None
        """
        Whether or not iframes and shadow roots should be traversed when returning the subtree
(default is false).
        """

    class getNodesForSubtreeByStyle(ICommand):
        """
        Finds nodes with a given computed style in a subtree.
        """

        _domain: str = PrivateAttr("DOM")
        nodeId: "types.DOM.TypeNodeId"
        """
        Node ID pointing to the root of a subtree.
        """
        computedStyles: list[Any]
        """
        The style to filter nodes by (includes nodes if any of properties matches).
        """
        pierce: Optional[bool] = None
        """
        Whether or not iframes and shadow roots in the same target should be traversed when returning the
results (default is false).
        """

    class getNodeForLocation(ICommand):
        """
                Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is
        either returned or not.
        """

        _domain: str = PrivateAttr("DOM")
        x: Union[float, int]
        """
        X coordinate.
        """
        y: Union[float, int]
        """
        Y coordinate.
        """
        includeUserAgentShadowDOM: Optional[bool] = None
        """
        False to skip to the nearest non-UA shadow root ancestor (default: false).
        """
        ignorePointerEventsNone: Optional[bool] = None
        """
        Whether to ignore pointer-events: none on elements and hit test them.
        """

    class getOuterHTML(ICommand):
        """
        Returns node's HTML markup.
        """

        _domain: str = PrivateAttr("DOM")
        nodeId: Optional["types.DOM.TypeNodeId"] = None
        """
        Identifier of the node.
        """
        backendNodeId: Optional["types.DOM.TypeBackendNodeId"] = None
        """
        Identifier of the backend node.
        """
        objectId: Optional["types.Runtime.TypeRemoteObjectId"] = None
        """
        JavaScript object id of the node wrapper.
        """

    class getRelayoutBoundary(ICommand):
        """
        Returns the id of the nearest ancestor that is a relayout boundary.
        """

        _domain: str = PrivateAttr("DOM")
        nodeId: "types.DOM.TypeNodeId"
        """
        Id of the node.
        """

    class getSearchResults(ICommand):
        """
                Returns search results from given `fromIndex` to given `toIndex` from the search with the given
        identifier.
        """

        _domain: str = PrivateAttr("DOM")
        searchId: str
        """
        Unique search session identifier.
        """
        fromIndex: Union[float, int]
        """
        Start index of the search result to be returned.
        """
        toIndex: Union[float, int]
        """
        End index of the search result to be returned.
        """

    class hideHighlight(ICommand):
        """
        Hides any highlight.
        """

        _domain: str = PrivateAttr("DOM")

    class highlightNode(ICommand):
        """
        Highlights DOM node.
        """

        _domain: str = PrivateAttr("DOM")

    class highlightRect(ICommand):
        """
        Highlights given rectangle.
        """

        _domain: str = PrivateAttr("DOM")

    class markUndoableState(ICommand):
        """
        Marks last undoable state.
        """

        _domain: str = PrivateAttr("DOM")

    class moveTo(ICommand):
        """
        Moves node into the new container, places it before the given anchor.
        """

        _domain: str = PrivateAttr("DOM")
        nodeId: "types.DOM.TypeNodeId"
        """
        Id of the node to move.
        """
        targetNodeId: "types.DOM.TypeNodeId"
        """
        Id of the element to drop the moved node into.
        """
        insertBeforeNodeId: Optional["types.DOM.TypeNodeId"] = None
        """
        Drop node before this one (if absent, the moved node becomes the last child of
`targetNodeId`).
        """

    class performSearch(ICommand):
        """
                Searches for a given string in the DOM tree. Use `getSearchResults` to access search results or
        `cancelSearch` to end this search session.
        """

        _domain: str = PrivateAttr("DOM")
        query: str
        """
        Plain text or query selector or XPath search query.
        """
        includeUserAgentShadowDOM: Optional[bool] = None
        """
        True to search in user agent shadow DOM.
        """

    class pushNodeByPathToFrontend(ICommand):
        """
        Requests that the node is sent to the caller given its path. // FIXME, use XPath
        """

        _domain: str = PrivateAttr("DOM")
        path: str
        """
        Path to node in the proprietary format.
        """

    class pushNodesByBackendIdsToFrontend(ICommand):
        """
        Requests that a batch of nodes is sent to the caller given their backend node ids.
        """

        _domain: str = PrivateAttr("DOM")
        backendNodeIds: list[Any]
        """
        The array of backend node ids.
        """

    class querySelector(ICommand):
        """
        Executes `querySelector` on a given node.
        """

        _domain: str = PrivateAttr("DOM")
        nodeId: "types.DOM.TypeNodeId"
        """
        Id of the node to query upon.
        """
        selector: str
        """
        Selector string.
        """

    class querySelectorAll(ICommand):
        """
        Executes `querySelectorAll` on a given node.
        """

        _domain: str = PrivateAttr("DOM")
        nodeId: "types.DOM.TypeNodeId"
        """
        Id of the node to query upon.
        """
        selector: str
        """
        Selector string.
        """

    class getTopLayerElements(ICommand):
        """
                Returns NodeIds of current top layer elements.
        Top layer is rendered closest to the user within a viewport, therefore its elements always
        appear on top of all other content.
        """

        _domain: str = PrivateAttr("DOM")

    class getElementByRelation(ICommand):
        """
        Returns the NodeId of the matched element according to certain relations.
        """

        _domain: str = PrivateAttr("DOM")
        nodeId: "types.DOM.TypeNodeId"
        """
        Id of the node from which to query the relation.
        """
        relation: Literal["PopoverTarget"]
        """
        Type of relation to get.
        """

    class redo(ICommand):
        """
        Re-does the last undone action.
        """

        _domain: str = PrivateAttr("DOM")

    class removeAttribute(ICommand):
        """
        Removes attribute with given name from an element with given id.
        """

        _domain: str = PrivateAttr("DOM")
        nodeId: "types.DOM.TypeNodeId"
        """
        Id of the element to remove attribute from.
        """
        name: str
        """
        Name of the attribute to remove.
        """

    class removeNode(ICommand):
        """
        Removes node with given id.
        """

        _domain: str = PrivateAttr("DOM")
        nodeId: "types.DOM.TypeNodeId"
        """
        Id of the node to remove.
        """

    class requestChildNodes(ICommand):
        """
                Requests that children of the node with given id are returned to the caller in form of
        `setChildNodes` events where not only immediate children are retrieved, but all children down to
        the specified depth.
        """

        _domain: str = PrivateAttr("DOM")
        nodeId: "types.DOM.TypeNodeId"
        """
        Id of the node to get children for.
        """
        depth: Optional[Union[float, int]] = None
        """
        The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the
entire subtree or provide an integer larger than 0.
        """
        pierce: Optional[bool] = None
        """
        Whether or not iframes and shadow roots should be traversed when returning the sub-tree
(default is false).
        """

    class requestNode(ICommand):
        """
                Requests that the node is sent to the caller given the JavaScript node object reference. All
        nodes that form the path from the node to the root are also sent to the client as a series of
        `setChildNodes` notifications.
        """

        _domain: str = PrivateAttr("DOM")
        objectId: "types.Runtime.TypeRemoteObjectId"
        """
        JavaScript object id to convert into node.
        """

    class resolveNode(ICommand):
        """
        Resolves the JavaScript node object for a given NodeId or BackendNodeId.
        """

        _domain: str = PrivateAttr("DOM")
        nodeId: Optional["types.DOM.TypeNodeId"] = None
        """
        Id of the node to resolve.
        """
        backendNodeId: Optional["types.DOM.TypeBackendNodeId"] = None
        """
        Backend identifier of the node to resolve.
        """
        objectGroup: Optional[str] = None
        """
        Symbolic group name that can be used to release multiple objects.
        """
        executionContextId: Optional["types.Runtime.TypeExecutionContextId"] = None
        """
        Execution context in which to resolve the node.
        """

    class setAttributeValue(ICommand):
        """
        Sets attribute for an element with given id.
        """

        _domain: str = PrivateAttr("DOM")
        nodeId: "types.DOM.TypeNodeId"
        """
        Id of the element to set attribute for.
        """
        name: str
        """
        Attribute name.
        """
        value: str
        """
        Attribute value.
        """

    class setAttributesAsText(ICommand):
        """
                Sets attributes on element with given id. This method is useful when user edits some existing
        attribute value and types in several attribute name/value pairs.
        """

        _domain: str = PrivateAttr("DOM")
        nodeId: "types.DOM.TypeNodeId"
        """
        Id of the element to set attributes for.
        """
        text: str
        """
        Text with a number of attributes. Will parse this text using HTML parser.
        """
        name: Optional[str] = None
        """
        Attribute name to replace with new attributes derived from text in case text parsed
successfully.
        """

    class setFileInputFiles(ICommand):
        """
        Sets files for the given file input element.
        """

        _domain: str = PrivateAttr("DOM")
        files: list[Any]
        """
        Array of file paths to set.
        """
        nodeId: Optional["types.DOM.TypeNodeId"] = None
        """
        Identifier of the node.
        """
        backendNodeId: Optional["types.DOM.TypeBackendNodeId"] = None
        """
        Identifier of the backend node.
        """
        objectId: Optional["types.Runtime.TypeRemoteObjectId"] = None
        """
        JavaScript object id of the node wrapper.
        """

    class setNodeStackTracesEnabled(ICommand):
        """
        Sets if stack traces should be captured for Nodes. See `Node.getNodeStackTraces`. Default is disabled.
        """

        _domain: str = PrivateAttr("DOM")
        enable: bool
        """
        Enable or disable.
        """

    class getNodeStackTraces(ICommand):
        """
        Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation.
        """

        _domain: str = PrivateAttr("DOM")
        nodeId: "types.DOM.TypeNodeId"
        """
        Id of the node to get stack traces for.
        """

    class getFileInfo(ICommand):
        """
                Returns file information for the given
        File wrapper.
        """

        _domain: str = PrivateAttr("DOM")
        objectId: "types.Runtime.TypeRemoteObjectId"
        """
        JavaScript object id of the node wrapper.
        """

    class setInspectedNode(ICommand):
        """
                Enables console to refer to the node with given id via $x (see Command Line API for more details
        $x functions).
        """

        _domain: str = PrivateAttr("DOM")
        nodeId: "types.DOM.TypeNodeId"
        """
        DOM node id to be accessible by means of $x command line API.
        """

    class setNodeName(ICommand):
        """
        Sets node name for a node with given id.
        """

        _domain: str = PrivateAttr("DOM")
        nodeId: "types.DOM.TypeNodeId"
        """
        Id of the node to set name for.
        """
        name: str
        """
        New node's name.
        """

    class setNodeValue(ICommand):
        """
        Sets node value for a node with given id.
        """

        _domain: str = PrivateAttr("DOM")
        nodeId: "types.DOM.TypeNodeId"
        """
        Id of the node to set value for.
        """
        value: str
        """
        New node's value.
        """

    class setOuterHTML(ICommand):
        """
        Sets node HTML markup, returns new node id.
        """

        _domain: str = PrivateAttr("DOM")
        nodeId: "types.DOM.TypeNodeId"
        """
        Id of the node to set markup for.
        """
        outerHTML: str
        """
        Outer HTML markup to set.
        """

    class undo(ICommand):
        """
        Undoes the last performed action.
        """

        _domain: str = PrivateAttr("DOM")

    class getFrameOwner(ICommand):
        """
        Returns iframe node that owns iframe with the given domain.
        """

        _domain: str = PrivateAttr("DOM")
        frameId: "types.Page.TypeFrameId"

    class getContainerForNode(ICommand):
        """
                Returns the query container of the given node based on container query
        conditions: containerName, physical, and logical axes. If no axes are
        provided, the style container is returned, which is the direct parent or the
        closest element with a matching container-name.
        """

        _domain: str = PrivateAttr("DOM")
        nodeId: "types.DOM.TypeNodeId"
        containerName: Optional[str] = None
        physicalAxes: Optional["types.DOM.TypePhysicalAxes"] = None
        logicalAxes: Optional["types.DOM.TypeLogicalAxes"] = None

    class getQueryingDescendantsForContainer(ICommand):
        """
                Returns the descendants of a container query container that have
        container queries against this container.
        """

        _domain: str = PrivateAttr("DOM")
        nodeId: "types.DOM.TypeNodeId"
        """
        Id of the container node to find querying descendants from.
        """

    class getAnchorElement(ICommand):
        """
                Returns the target anchor element of the given anchor query according to
        https://www.w3.org/TR/css-anchor-position-1/#target.
        """

        _domain: str = PrivateAttr("DOM")
        nodeId: "types.DOM.TypeNodeId"
        """
        Id of the positioned element from which to find the anchor.
        """
        anchorSpecifier: Optional[str] = None
        """
        An optional anchor specifier, as defined in
https://www.w3.org/TR/css-anchor-position-1/#anchor-specifier.
If not provided, it will return the implicit anchor element for
the given positioned element.
        """


class DOMDebugger:
    """
        DOM debugging allows setting breakpoints on particular DOM operations and events. JavaScript
    execution will stop on these operations as if there was a regular breakpoint set.
    """

    class getEventListeners(ICommand):
        """
        Returns event listeners of the given object.
        """

        _domain: str = PrivateAttr("DOMDebugger")
        objectId: "types.Runtime.TypeRemoteObjectId"
        """
        Identifier of the object to return listeners for.
        """
        depth: Optional[Union[float, int]] = None
        """
        The maximum depth at which Node children should be retrieved, defaults to 1. Use -1 for the
entire subtree or provide an integer larger than 0.
        """
        pierce: Optional[bool] = None
        """
        Whether or not iframes and shadow roots should be traversed when returning the subtree
(default is false). Reports listeners for all contexts if pierce is enabled.
        """

    class removeDOMBreakpoint(ICommand):
        """
        Removes DOM breakpoint that was set using `setDOMBreakpoint`.
        """

        _domain: str = PrivateAttr("DOMDebugger")
        nodeId: "types.DOM.TypeNodeId"
        """
        Identifier of the node to remove breakpoint from.
        """
        type: "types.DOMDebugger.TypeDOMBreakpointType"
        """
        Type of the breakpoint to remove.
        """

    class removeEventListenerBreakpoint(ICommand):
        """
        Removes breakpoint on particular DOM event.
        """

        _domain: str = PrivateAttr("DOMDebugger")
        eventName: str
        """
        Event name.
        """
        targetName: Optional[str] = None
        """
        EventTarget interface name.
        """

    class removeInstrumentationBreakpoint(ICommand):
        """
        Removes breakpoint on particular native event.
        """

        _domain: str = PrivateAttr("DOMDebugger")
        eventName: str
        """
        Instrumentation name to stop on.
        """

    class removeXHRBreakpoint(ICommand):
        """
        Removes breakpoint from XMLHttpRequest.
        """

        _domain: str = PrivateAttr("DOMDebugger")
        url: str
        """
        Resource URL substring.
        """

    class setBreakOnCSPViolation(ICommand):
        """
        Sets breakpoint on particular CSP violations.
        """

        _domain: str = PrivateAttr("DOMDebugger")
        violationTypes: list[Any]
        """
        CSP Violations to stop upon.
        """

    class setDOMBreakpoint(ICommand):
        """
        Sets breakpoint on particular operation with DOM.
        """

        _domain: str = PrivateAttr("DOMDebugger")
        nodeId: "types.DOM.TypeNodeId"
        """
        Identifier of the node to set breakpoint on.
        """
        type: "types.DOMDebugger.TypeDOMBreakpointType"
        """
        Type of the operation to stop upon.
        """

    class setEventListenerBreakpoint(ICommand):
        """
        Sets breakpoint on particular DOM event.
        """

        _domain: str = PrivateAttr("DOMDebugger")
        eventName: str
        """
        DOM Event name to stop on (any DOM event will do).
        """
        targetName: Optional[str] = None
        """
        EventTarget interface name to stop on. If equal to `"*"` or not provided, will stop on any
EventTarget.
        """

    class setInstrumentationBreakpoint(ICommand):
        """
        Sets breakpoint on particular native event.
        """

        _domain: str = PrivateAttr("DOMDebugger")
        eventName: str
        """
        Instrumentation name to stop on.
        """

    class setXHRBreakpoint(ICommand):
        """
        Sets breakpoint on XMLHttpRequest.
        """

        _domain: str = PrivateAttr("DOMDebugger")
        url: str
        """
        Resource URL substring. All XHRs having this substring in the URL will get stopped upon.
        """


class EventBreakpoints:
    """
        EventBreakpoints permits setting JavaScript breakpoints on operations and events
    occurring in native code invoked from JavaScript. Once breakpoint is hit, it is
    reported through Debugger domain, similarly to regular breakpoints being hit.
    """

    class setInstrumentationBreakpoint(ICommand):
        """
        Sets breakpoint on particular native event.
        """

        _domain: str = PrivateAttr("EventBreakpoints")
        eventName: str
        """
        Instrumentation name to stop on.
        """

    class removeInstrumentationBreakpoint(ICommand):
        """
        Removes breakpoint on particular native event.
        """

        _domain: str = PrivateAttr("EventBreakpoints")
        eventName: str
        """
        Instrumentation name to stop on.
        """

    class disable(ICommand):
        """
        Removes all breakpoints
        """

        _domain: str = PrivateAttr("EventBreakpoints")


class DOMSnapshot:
    """
    This domain facilitates obtaining document snapshots with DOM, layout, and style information.
    """

    class disable(ICommand):
        """
        Disables DOM snapshot agent for the given page.
        """

        _domain: str = PrivateAttr("DOMSnapshot")

    class enable(ICommand):
        """
        Enables DOM snapshot agent for the given page.
        """

        _domain: str = PrivateAttr("DOMSnapshot")

    class getSnapshot(ICommand):
        """
                Returns a document snapshot, including the full DOM tree of the root node (including iframes,
        template contents, and imported documents) in a flattened array, as well as layout and
        white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is
        flattened.
        """

        _domain: str = PrivateAttr("DOMSnapshot")
        computedStyleWhitelist: list[Any]
        """
        Whitelist of computed styles to return.
        """
        includeEventListeners: Optional[bool] = None
        """
        Whether or not to retrieve details of DOM listeners (default false).
        """
        includePaintOrder: Optional[bool] = None
        """
        Whether to determine and include the paint order index of LayoutTreeNodes (default false).
        """
        includeUserAgentShadowTree: Optional[bool] = None
        """
        Whether to include UA shadow tree in the snapshot (default false).
        """

    class captureSnapshot(ICommand):
        """
                Returns a document snapshot, including the full DOM tree of the root node (including iframes,
        template contents, and imported documents) in a flattened array, as well as layout and
        white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is
        flattened.
        """

        _domain: str = PrivateAttr("DOMSnapshot")
        computedStyles: list[Any]
        """
        Whitelist of computed styles to return.
        """
        includePaintOrder: Optional[bool] = None
        """
        Whether to include layout object paint orders into the snapshot.
        """
        includeDOMRects: Optional[bool] = None
        """
        Whether to include DOM rectangles (offsetRects, clientRects, scrollRects) into the snapshot
        """
        includeBlendedBackgroundColors: Optional[bool] = None
        """
        Whether to include blended background colors in the snapshot (default: false).
Blended background color is achieved by blending background colors of all elements
that overlap with the current element.
        """
        includeTextColorOpacities: Optional[bool] = None
        """
        Whether to include text color opacity in the snapshot (default: false).
An element might have the opacity property set that affects the text color of the element.
The final text color opacity is computed based on the opacity of all overlapping elements.
        """


class DOMStorage:
    """
    Query and modify DOM storage.
    """

    class clear(ICommand):
        _domain: str = PrivateAttr("DOMStorage")
        storageId: "types.DOMStorage.TypeStorageId"

    class disable(ICommand):
        """
        Disables storage tracking, prevents storage events from being sent to the client.
        """

        _domain: str = PrivateAttr("DOMStorage")

    class enable(ICommand):
        """
        Enables storage tracking, storage events will now be delivered to the client.
        """

        _domain: str = PrivateAttr("DOMStorage")

    class getDOMStorageItems(ICommand):
        _domain: str = PrivateAttr("DOMStorage")
        storageId: "types.DOMStorage.TypeStorageId"

    class removeDOMStorageItem(ICommand):
        _domain: str = PrivateAttr("DOMStorage")
        storageId: "types.DOMStorage.TypeStorageId"
        key: str

    class setDOMStorageItem(ICommand):
        _domain: str = PrivateAttr("DOMStorage")
        storageId: "types.DOMStorage.TypeStorageId"
        key: str
        value: str


class Database:
    class disable(ICommand):
        """
        Disables database tracking, prevents database events from being sent to the client.
        """

        _domain: str = PrivateAttr("Database")

    class enable(ICommand):
        """
        Enables database tracking, database events will now be delivered to the client.
        """

        _domain: str = PrivateAttr("Database")

    class executeSQL(ICommand):
        _domain: str = PrivateAttr("Database")
        databaseId: "types.Database.TypeDatabaseId"
        query: str

    class getDatabaseTableNames(ICommand):
        _domain: str = PrivateAttr("Database")
        databaseId: "types.Database.TypeDatabaseId"


class DeviceOrientation:
    class clearDeviceOrientationOverride(ICommand):
        """
        Clears the overridden Device Orientation.
        """

        _domain: str = PrivateAttr("DeviceOrientation")

    class setDeviceOrientationOverride(ICommand):
        """
        Overrides the Device Orientation.
        """

        _domain: str = PrivateAttr("DeviceOrientation")
        alpha: Union[float, int]
        """
        Mock alpha
        """
        beta: Union[float, int]
        """
        Mock beta
        """
        gamma: Union[float, int]
        """
        Mock gamma
        """


class Emulation:
    """
    This domain emulates different environments for the page.
    """

    class canEmulate(ICommand):
        """
        Tells whether emulation is supported.
        """

        _domain: str = PrivateAttr("Emulation")

    class clearDeviceMetricsOverride(ICommand):
        """
        Clears the overridden device metrics.
        """

        _domain: str = PrivateAttr("Emulation")

    class clearGeolocationOverride(ICommand):
        """
        Clears the overridden Geolocation Position and Error.
        """

        _domain: str = PrivateAttr("Emulation")

    class resetPageScaleFactor(ICommand):
        """
        Requests that page scale factor is reset to initial values.
        """

        _domain: str = PrivateAttr("Emulation")

    class setFocusEmulationEnabled(ICommand):
        """
        Enables or disables simulating a focused and active page.
        """

        _domain: str = PrivateAttr("Emulation")
        enabled: bool
        """
        Whether to enable to disable focus emulation.
        """

    class setAutoDarkModeOverride(ICommand):
        """
        Automatically render all web contents using a dark theme.
        """

        _domain: str = PrivateAttr("Emulation")
        enabled: Optional[bool] = None
        """
        Whether to enable or disable automatic dark mode.
If not specified, any existing override will be cleared.
        """

    class setCPUThrottlingRate(ICommand):
        """
        Enables CPU throttling to emulate slow CPUs.
        """

        _domain: str = PrivateAttr("Emulation")
        rate: Union[float, int]
        """
        Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc).
        """

    class setDefaultBackgroundColorOverride(ICommand):
        """
                Sets or clears an override of the default background color of the frame. This override is used
        if the content does not specify one.
        """

        _domain: str = PrivateAttr("Emulation")
        color: Optional["types.DOM.TypeRGBA"] = None
        """
        RGBA of the default background color. If not specified, any existing override will be
cleared.
        """

    class setDeviceMetricsOverride(ICommand):
        """
                Overrides the values of device screen dimensions (window.screen.width, window.screen.height,
        window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media
        query results).
        """

        _domain: str = PrivateAttr("Emulation")
        width: Union[float, int]
        """
        Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.
        """
        height: Union[float, int]
        """
        Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.
        """
        deviceScaleFactor: Union[float, int]
        """
        Overriding device scale factor value. 0 disables the override.
        """
        mobile: bool
        """
        Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text
autosizing and more.
        """
        scale: Optional[Union[float, int]] = None
        """
        Scale to apply to resulting view image.
        """
        screenWidth: Optional[Union[float, int]] = None
        """
        Overriding screen width value in pixels (minimum 0, maximum 10000000).
        """
        screenHeight: Optional[Union[float, int]] = None
        """
        Overriding screen height value in pixels (minimum 0, maximum 10000000).
        """
        positionX: Optional[Union[float, int]] = None
        """
        Overriding view X position on screen in pixels (minimum 0, maximum 10000000).
        """
        positionY: Optional[Union[float, int]] = None
        """
        Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).
        """
        dontSetVisibleSize: Optional[bool] = None
        """
        Do not set visible view size, rely upon explicit setVisibleSize call.
        """
        screenOrientation: Optional["types.Emulation.TypeScreenOrientation"] = None
        """
        Screen orientation override.
        """
        viewport: Optional["types.Page.TypeViewport"] = None
        """
        If set, the visible area of the page will be overridden to this viewport. This viewport
change is not observed by the page, e.g. viewport-relative elements do not change positions.
        """
        displayFeature: Optional["types.Emulation.TypeDisplayFeature"] = None
        """
        If set, the display feature of a multi-segment screen. If not set, multi-segment support
is turned-off.
        """
        devicePosture: Optional["types.Emulation.TypeDevicePosture"] = None
        """
        If set, the posture of a foldable device. If not set the posture is set
to continuous.
Deprecated, use Emulation.setDevicePostureOverride.
        """

    class setDevicePostureOverride(ICommand):
        """
                Start reporting the given posture value to the Device Posture API.
        This override can also be set in setDeviceMetricsOverride().
        """

        _domain: str = PrivateAttr("Emulation")
        posture: "types.Emulation.TypeDevicePosture"

    class clearDevicePostureOverride(ICommand):
        """
                Clears a device posture override set with either setDeviceMetricsOverride()
        or setDevicePostureOverride() and starts using posture information from the
        platform again.
        Does nothing if no override is set.
        """

        _domain: str = PrivateAttr("Emulation")

    class setScrollbarsHidden(ICommand):
        _domain: str = PrivateAttr("Emulation")
        hidden: bool
        """
        Whether scrollbars should be always hidden.
        """

    class setDocumentCookieDisabled(ICommand):
        _domain: str = PrivateAttr("Emulation")
        disabled: bool
        """
        Whether document.coookie API should be disabled.
        """

    class setEmitTouchEventsForMouse(ICommand):
        _domain: str = PrivateAttr("Emulation")
        enabled: bool
        """
        Whether touch emulation based on mouse input should be enabled.
        """
        configuration: Optional[Literal["mobile", "desktop"]] = None
        """
        Touch/gesture events configuration. Default: current platform.
        """

    class setEmulatedMedia(ICommand):
        """
        Emulates the given media type or media feature for CSS media queries.
        """

        _domain: str = PrivateAttr("Emulation")
        media: Optional[str] = None
        """
        Media type to emulate. Empty string disables the override.
        """
        features: Optional[list[Any]] = None
        """
        Media features to emulate.
        """

    class setEmulatedVisionDeficiency(ICommand):
        """
        Emulates the given vision deficiency.
        """

        _domain: str = PrivateAttr("Emulation")
        type: Literal[
            "none",
            "blurredVision",
            "reducedContrast",
            "achromatopsia",
            "deuteranopia",
            "protanopia",
            "tritanopia",
        ]
        """
        Vision deficiency to emulate. Order: best-effort emulations come first, followed by any
physiologically accurate emulations for medically recognized color vision deficiencies.
        """

    class setGeolocationOverride(ICommand):
        """
                Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position
        unavailable.
        """

        _domain: str = PrivateAttr("Emulation")
        latitude: Optional[Union[float, int]] = None
        """
        Mock latitude
        """
        longitude: Optional[Union[float, int]] = None
        """
        Mock longitude
        """
        accuracy: Optional[Union[float, int]] = None
        """
        Mock accuracy
        """

    class getOverriddenSensorInformation(ICommand):
        _domain: str = PrivateAttr("Emulation")
        type: "types.Emulation.TypeSensorType"

    class setSensorOverrideEnabled(ICommand):
        """
                Overrides a platform sensor of a given type. If |enabled| is true, calls to
        Sensor.start() will use a virtual sensor as backend rather than fetching
        data from a real hardware sensor. Otherwise, existing virtual
        sensor-backend Sensor objects will fire an error event and new calls to
        Sensor.start() will attempt to use a real sensor instead.
        """

        _domain: str = PrivateAttr("Emulation")
        enabled: bool
        type: "types.Emulation.TypeSensorType"
        metadata: Optional["types.Emulation.TypeSensorMetadata"] = None

    class setSensorOverrideReadings(ICommand):
        """
                Updates the sensor readings reported by a sensor type previously overridden
        by setSensorOverrideEnabled.
        """

        _domain: str = PrivateAttr("Emulation")
        type: "types.Emulation.TypeSensorType"
        reading: "types.Emulation.TypeSensorReading"

    class setIdleOverride(ICommand):
        """
        Overrides the Idle state.
        """

        _domain: str = PrivateAttr("Emulation")
        isUserActive: bool
        """
        Mock isUserActive
        """
        isScreenUnlocked: bool
        """
        Mock isScreenUnlocked
        """

    class clearIdleOverride(ICommand):
        """
        Clears Idle state overrides.
        """

        _domain: str = PrivateAttr("Emulation")

    class setNavigatorOverrides(ICommand):
        """
        Overrides value returned by the javascript navigator object.
        """

        _domain: str = PrivateAttr("Emulation")
        platform: str
        """
        The platform navigator.platform should return.
        """

    class setPageScaleFactor(ICommand):
        """
        Sets a specified page scale factor.
        """

        _domain: str = PrivateAttr("Emulation")
        pageScaleFactor: Union[float, int]
        """
        Page scale factor.
        """

    class setScriptExecutionDisabled(ICommand):
        """
        Switches script execution in the page.
        """

        _domain: str = PrivateAttr("Emulation")
        value: bool
        """
        Whether script execution should be disabled in the page.
        """

    class setTouchEmulationEnabled(ICommand):
        """
        Enables touch on platforms which do not support them.
        """

        _domain: str = PrivateAttr("Emulation")
        enabled: bool
        """
        Whether the touch event emulation should be enabled.
        """
        maxTouchPoints: Optional[Union[float, int]] = None
        """
        Maximum touch points supported. Defaults to one.
        """

    class setVirtualTimePolicy(ICommand):
        """
                Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets
        the current virtual time policy.  Note this supersedes any previous time budget.
        """

        _domain: str = PrivateAttr("Emulation")
        policy: "types.Emulation.TypeVirtualTimePolicy"
        budget: Optional[Union[float, int]] = None
        """
        If set, after this many virtual milliseconds have elapsed virtual time will be paused and a
virtualTimeBudgetExpired event is sent.
        """
        maxVirtualTimeTaskStarvationCount: Optional[Union[float, int]] = None
        """
        If set this specifies the maximum number of tasks that can be run before virtual is forced
forwards to prevent deadlock.
        """
        initialVirtualTime: Optional["types.Network.TypeTimeSinceEpoch"] = None
        """
        If set, base::Time::Now will be overridden to initially return this value.
        """

    class setLocaleOverride(ICommand):
        """
        Overrides default host system locale with the specified one.
        """

        _domain: str = PrivateAttr("Emulation")
        locale: Optional[str] = None
        """
        ICU style C locale (e.g. "en_US"). If not specified or empty, disables the override and
restores default host system locale.
        """

    class setTimezoneOverride(ICommand):
        """
        Overrides default host system timezone with the specified one.
        """

        _domain: str = PrivateAttr("Emulation")
        timezoneId: str
        """
        The timezone identifier. List of supported timezones:
https://source.chromium.org/chromium/chromium/deps/icu.git/+/faee8bc70570192d82d2978a71e2a615788597d1:source/data/misc/metaZones.txt
If empty, disables the override and restores default host system timezone.
        """

    class setVisibleSize(ICommand):
        """
                Resizes the frame/viewport of the page. Note that this does not affect the frame's container
        (e.g. browser window). Can be used to produce screenshots of the specified size. Not supported
        on Android.
        """

        _domain: str = PrivateAttr("Emulation")
        width: Union[float, int]
        """
        Frame width (DIP).
        """
        height: Union[float, int]
        """
        Frame height (DIP).
        """

    class setDisabledImageTypes(ICommand):
        _domain: str = PrivateAttr("Emulation")
        imageTypes: list[Any]
        """
        Image types to disable.
        """

    class setHardwareConcurrencyOverride(ICommand):
        _domain: str = PrivateAttr("Emulation")
        hardwareConcurrency: Union[float, int]
        """
        Hardware concurrency to report
        """

    class setUserAgentOverride(ICommand):
        """
                Allows overriding user agent with the given string.
        `userAgentMetadata` must be set for Client Hint headers to be sent.
        """

        _domain: str = PrivateAttr("Emulation")
        userAgent: str
        """
        User agent to use.
        """
        acceptLanguage: Optional[str] = None
        """
        Browser language to emulate.
        """
        platform: Optional[str] = None
        """
        The platform navigator.platform should return.
        """
        userAgentMetadata: Optional["types.Emulation.TypeUserAgentMetadata"] = None
        """
        To be sent in Sec-CH-UA-* headers and returned in navigator.userAgentData
        """

    class setAutomationOverride(ICommand):
        """
        Allows overriding the automation flag.
        """

        _domain: str = PrivateAttr("Emulation")
        enabled: bool
        """
        Whether the override should be enabled.
        """


class HeadlessExperimental:
    """
    This domain provides experimental commands only supported in headless mode.
    """

    class beginFrame(ICommand):
        """
                Sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a
        screenshot from the resulting frame. Requires that the target was created with enabled
        BeginFrameControl. Designed for use with --run-all-compositor-stages-before-draw, see also
        https://goo.gle/chrome-headless-rendering for more background.
        """

        _domain: str = PrivateAttr("HeadlessExperimental")
        frameTimeTicks: Optional[Union[float, int]] = None
        """
        Timestamp of this BeginFrame in Renderer TimeTicks (milliseconds of uptime). If not set,
the current time will be used.
        """
        interval: Optional[Union[float, int]] = None
        """
        The interval between BeginFrames that is reported to the compositor, in milliseconds.
Defaults to a 60 frames/second interval, i.e. about 16.666 milliseconds.
        """
        noDisplayUpdates: Optional[bool] = None
        """
        Whether updates should not be committed and drawn onto the display. False by default. If
true, only side effects of the BeginFrame will be run, such as layout and animations, but
any visual updates may not be visible on the display or in screenshots.
        """
        screenshot: Optional["types.HeadlessExperimental.TypeScreenshotParams"] = None
        """
        If set, a screenshot of the frame will be captured and returned in the response. Otherwise,
no screenshot will be captured. Note that capturing a screenshot can fail, for example,
during renderer initialization. In such a case, no screenshot data will be returned.
        """

    class disable(ICommand):
        """
        Disables headless events for the target.
        """

        _domain: str = PrivateAttr("HeadlessExperimental")

    class enable(ICommand):
        """
        Enables headless events for the target.
        """

        _domain: str = PrivateAttr("HeadlessExperimental")


class IO:
    """
    Input/Output operations for streams produced by DevTools.
    """

    class close(ICommand):
        """
        Close the stream, discard any temporary backing storage.
        """

        _domain: str = PrivateAttr("IO")
        handle: "types.IO.TypeStreamHandle"
        """
        Handle of the stream to close.
        """

    class read(ICommand):
        """
        Read a chunk of the stream
        """

        _domain: str = PrivateAttr("IO")
        handle: "types.IO.TypeStreamHandle"
        """
        Handle of the stream to read.
        """
        offset: Optional[Union[float, int]] = None
        """
        Seek to the specified offset before reading (if not specified, proceed with offset
following the last read). Some types of streams may only support sequential reads.
        """
        size: Optional[Union[float, int]] = None
        """
        Maximum number of bytes to read (left upon the agent discretion if not specified).
        """

    class resolveBlob(ICommand):
        """
        Return UUID of Blob object specified by a remote object id.
        """

        _domain: str = PrivateAttr("IO")
        objectId: "types.Runtime.TypeRemoteObjectId"
        """
        Object id of a Blob object wrapper.
        """


class IndexedDB:
    class clearObjectStore(ICommand):
        """
        Clears all entries from an object store.
        """

        _domain: str = PrivateAttr("IndexedDB")
        securityOrigin: Optional[str] = None
        """
        At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.
Security origin.
        """
        storageKey: Optional[str] = None
        """
        Storage key.
        """
        storageBucket: Optional["types.Storage.TypeStorageBucket"] = None
        """
        Storage bucket. If not specified, it uses the default bucket.
        """
        databaseName: str
        """
        Database name.
        """
        objectStoreName: str
        """
        Object store name.
        """

    class deleteDatabase(ICommand):
        """
        Deletes a database.
        """

        _domain: str = PrivateAttr("IndexedDB")
        securityOrigin: Optional[str] = None
        """
        At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.
Security origin.
        """
        storageKey: Optional[str] = None
        """
        Storage key.
        """
        storageBucket: Optional["types.Storage.TypeStorageBucket"] = None
        """
        Storage bucket. If not specified, it uses the default bucket.
        """
        databaseName: str
        """
        Database name.
        """

    class deleteObjectStoreEntries(ICommand):
        """
        Delete a range of entries from an object store
        """

        _domain: str = PrivateAttr("IndexedDB")
        securityOrigin: Optional[str] = None
        """
        At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.
Security origin.
        """
        storageKey: Optional[str] = None
        """
        Storage key.
        """
        storageBucket: Optional["types.Storage.TypeStorageBucket"] = None
        """
        Storage bucket. If not specified, it uses the default bucket.
        """
        databaseName: str
        objectStoreName: str
        keyRange: "types.IndexedDB.TypeKeyRange"
        """
        Range of entry keys to delete
        """

    class disable(ICommand):
        """
        Disables events from backend.
        """

        _domain: str = PrivateAttr("IndexedDB")

    class enable(ICommand):
        """
        Enables events from backend.
        """

        _domain: str = PrivateAttr("IndexedDB")

    class requestData(ICommand):
        """
        Requests data from object store or index.
        """

        _domain: str = PrivateAttr("IndexedDB")
        securityOrigin: Optional[str] = None
        """
        At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.
Security origin.
        """
        storageKey: Optional[str] = None
        """
        Storage key.
        """
        storageBucket: Optional["types.Storage.TypeStorageBucket"] = None
        """
        Storage bucket. If not specified, it uses the default bucket.
        """
        databaseName: str
        """
        Database name.
        """
        objectStoreName: str
        """
        Object store name.
        """
        indexName: str
        """
        Index name, empty string for object store data requests.
        """
        skipCount: Union[float, int]
        """
        Number of records to skip.
        """
        pageSize: Union[float, int]
        """
        Number of records to fetch.
        """
        keyRange: Optional["types.IndexedDB.TypeKeyRange"] = None
        """
        Key range.
        """

    class getMetadata(ICommand):
        """
        Gets metadata of an object store.
        """

        _domain: str = PrivateAttr("IndexedDB")
        securityOrigin: Optional[str] = None
        """
        At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.
Security origin.
        """
        storageKey: Optional[str] = None
        """
        Storage key.
        """
        storageBucket: Optional["types.Storage.TypeStorageBucket"] = None
        """
        Storage bucket. If not specified, it uses the default bucket.
        """
        databaseName: str
        """
        Database name.
        """
        objectStoreName: str
        """
        Object store name.
        """

    class requestDatabase(ICommand):
        """
        Requests database with given name in given frame.
        """

        _domain: str = PrivateAttr("IndexedDB")
        securityOrigin: Optional[str] = None
        """
        At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.
Security origin.
        """
        storageKey: Optional[str] = None
        """
        Storage key.
        """
        storageBucket: Optional["types.Storage.TypeStorageBucket"] = None
        """
        Storage bucket. If not specified, it uses the default bucket.
        """
        databaseName: str
        """
        Database name.
        """

    class requestDatabaseNames(ICommand):
        """
        Requests database names for given security origin.
        """

        _domain: str = PrivateAttr("IndexedDB")
        securityOrigin: Optional[str] = None
        """
        At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.
Security origin.
        """
        storageKey: Optional[str] = None
        """
        Storage key.
        """
        storageBucket: Optional["types.Storage.TypeStorageBucket"] = None
        """
        Storage bucket. If not specified, it uses the default bucket.
        """


class Input:
    class dispatchDragEvent(ICommand):
        """
        Dispatches a drag event into the page.
        """

        _domain: str = PrivateAttr("Input")
        type: Literal["dragEnter", "dragOver", "drop", "dragCancel"]
        """
        Type of the drag event.
        """
        x: Union[float, int]
        """
        X coordinate of the event relative to the main frame's viewport in CSS pixels.
        """
        y: Union[float, int]
        """
        Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to
the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
        """
        data: "types.Input.TypeDragData"
        modifiers: Optional[Union[float, int]] = None
        """
        Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8
(default: 0).
        """

    class dispatchKeyEvent(ICommand):
        """
        Dispatches a key event to the page.
        """

        _domain: str = PrivateAttr("Input")
        type: Literal["keyDown", "keyUp", "rawKeyDown", "char"]
        """
        Type of the key event.
        """
        modifiers: Optional[Union[float, int]] = None
        """
        Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8
(default: 0).
        """
        timestamp: Optional["types.Input.TypeTimeSinceEpoch"] = None
        """
        Time at which the event occurred.
        """
        text: Optional[str] = None
        """
        Text as generated by processing a virtual key code with a keyboard layout. Not needed for
for `keyUp` and `rawKeyDown` events (default: "")
        """
        unmodifiedText: Optional[str] = None
        """
        Text that would have been generated by the keyboard if no modifiers were pressed (except for
shift). Useful for shortcut (accelerator) key handling (default: "").
        """
        keyIdentifier: Optional[str] = None
        """
        Unique key identifier (e.g., 'U+0041') (default: "").
        """
        code: Optional[str] = None
        """
        Unique DOM defined string value for each physical key (e.g., 'KeyA') (default: "").
        """
        key: Optional[str] = None
        """
        Unique DOM defined string value describing the meaning of the key in the context of active
modifiers, keyboard layout, etc (e.g., 'AltGr') (default: "").
        """
        windowsVirtualKeyCode: Optional[Union[float, int]] = None
        """
        Windows virtual key code (default: 0).
        """
        nativeVirtualKeyCode: Optional[Union[float, int]] = None
        """
        Native virtual key code (default: 0).
        """
        autoRepeat: Optional[bool] = None
        """
        Whether the event was generated from auto repeat (default: false).
        """
        isKeypad: Optional[bool] = None
        """
        Whether the event was generated from the keypad (default: false).
        """
        isSystemKey: Optional[bool] = None
        """
        Whether the event was a system key event (default: false).
        """
        location: Optional[Union[float, int]] = None
        """
        Whether the event was from the left or right side of the keyboard. 1=Left, 2=Right (default:
0).
        """
        commands: Optional[list[Any]] = None
        """
        Editing commands to send with the key event (e.g., 'selectAll') (default: []).
These are related to but not equal the command names used in `document.execCommand` and NSStandardKeyBindingResponding.
See https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/editing/commands/editor_command_names.h for valid command names.
        """

    class insertText(ICommand):
        """
                This method emulates inserting text that doesn't come from a key press,
        for example an emoji keyboard or an IME.
        """

        _domain: str = PrivateAttr("Input")
        text: str
        """
        The text to insert.
        """

    class imeSetComposition(ICommand):
        """
                This method sets the current candidate text for IME.
        Use imeCommitComposition to commit the final text.
        Use imeSetComposition with empty string as text to cancel composition.
        """

        _domain: str = PrivateAttr("Input")
        text: str
        """
        The text to insert
        """
        selectionStart: Union[float, int]
        """
        selection start
        """
        selectionEnd: Union[float, int]
        """
        selection end
        """
        replacementStart: Optional[Union[float, int]] = None
        """
        replacement start
        """
        replacementEnd: Optional[Union[float, int]] = None
        """
        replacement end
        """

    class dispatchMouseEvent(ICommand):
        """
        Dispatches a mouse event to the page.
        """

        _domain: str = PrivateAttr("Input")
        type: Literal["mousePressed", "mouseReleased", "mouseMoved", "mouseWheel"]
        """
        Type of the mouse event.
        """
        x: Union[float, int]
        """
        X coordinate of the event relative to the main frame's viewport in CSS pixels.
        """
        y: Union[float, int]
        """
        Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to
the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
        """
        modifiers: Optional[Union[float, int]] = None
        """
        Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8
(default: 0).
        """
        timestamp: Optional["types.Input.TypeTimeSinceEpoch"] = None
        """
        Time at which the event occurred.
        """
        button: Optional["types.Input.TypeMouseButton"] = None
        """
        Mouse button (default: "none").
        """
        buttons: Optional[Union[float, int]] = None
        """
        A number indicating which buttons are pressed on the mouse when a mouse event is triggered.
Left=1, Right=2, Middle=4, Back=8, Forward=16, None=0.
        """
        clickCount: Optional[Union[float, int]] = None
        """
        Number of times the mouse button was clicked (default: 0).
        """
        force: Optional[Union[float, int]] = None
        """
        The normalized pressure, which has a range of [0,1] (default: 0).
        """
        tangentialPressure: Optional[Union[float, int]] = None
        """
        The normalized tangential pressure, which has a range of [-1,1] (default: 0).
        """
        tiltX: Optional[Union[float, int]] = None
        """
        The plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0).
        """
        tiltY: Optional[Union[float, int]] = None
        """
        The plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0).
        """
        twist: Optional[Union[float, int]] = None
        """
        The clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359] (default: 0).
        """
        deltaX: Optional[Union[float, int]] = None
        """
        X delta in CSS pixels for mouse wheel event (default: 0).
        """
        deltaY: Optional[Union[float, int]] = None
        """
        Y delta in CSS pixels for mouse wheel event (default: 0).
        """
        pointerType: Optional[Literal["mouse", "pen"]] = None
        """
        Pointer type (default: "mouse").
        """

    class dispatchTouchEvent(ICommand):
        """
        Dispatches a touch event to the page.
        """

        _domain: str = PrivateAttr("Input")
        type: Literal["touchStart", "touchEnd", "touchMove", "touchCancel"]
        """
        Type of the touch event. TouchEnd and TouchCancel must not contain any touch points, while
TouchStart and TouchMove must contains at least one.
        """
        touchPoints: list[Any]
        """
        Active touch points on the touch device. One event per any changed point (compared to
previous touch event in a sequence) is generated, emulating pressing/moving/releasing points
one by one.
        """
        modifiers: Optional[Union[float, int]] = None
        """
        Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8
(default: 0).
        """
        timestamp: Optional["types.Input.TypeTimeSinceEpoch"] = None
        """
        Time at which the event occurred.
        """

    class cancelDragging(ICommand):
        """
        Cancels any active dragging in the page.
        """

        _domain: str = PrivateAttr("Input")

    class emulateTouchFromMouseEvent(ICommand):
        """
        Emulates touch event from the mouse event parameters.
        """

        _domain: str = PrivateAttr("Input")
        type: Literal["mousePressed", "mouseReleased", "mouseMoved", "mouseWheel"]
        """
        Type of the mouse event.
        """
        x: Union[float, int]
        """
        X coordinate of the mouse pointer in DIP.
        """
        y: Union[float, int]
        """
        Y coordinate of the mouse pointer in DIP.
        """
        button: "types.Input.TypeMouseButton"
        """
        Mouse button. Only "none", "left", "right" are supported.
        """
        timestamp: Optional["types.Input.TypeTimeSinceEpoch"] = None
        """
        Time at which the event occurred (default: current time).
        """
        deltaX: Optional[Union[float, int]] = None
        """
        X delta in DIP for mouse wheel event (default: 0).
        """
        deltaY: Optional[Union[float, int]] = None
        """
        Y delta in DIP for mouse wheel event (default: 0).
        """
        modifiers: Optional[Union[float, int]] = None
        """
        Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8
(default: 0).
        """
        clickCount: Optional[Union[float, int]] = None
        """
        Number of times the mouse button was clicked (default: 0).
        """

    class setIgnoreInputEvents(ICommand):
        """
        Ignores input events (useful while auditing page).
        """

        _domain: str = PrivateAttr("Input")
        ignore: bool
        """
        Ignores input events processing when set to true.
        """

    class setInterceptDrags(ICommand):
        """
                Prevents default drag and drop behavior and instead emits `Input.dragIntercepted` events.
        Drag and drop behavior can be directly controlled via `Input.dispatchDragEvent`.
        """

        _domain: str = PrivateAttr("Input")
        enabled: bool

    class synthesizePinchGesture(ICommand):
        """
        Synthesizes a pinch gesture over a time period by issuing appropriate touch events.
        """

        _domain: str = PrivateAttr("Input")
        x: Union[float, int]
        """
        X coordinate of the start of the gesture in CSS pixels.
        """
        y: Union[float, int]
        """
        Y coordinate of the start of the gesture in CSS pixels.
        """
        scaleFactor: Union[float, int]
        """
        Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out).
        """
        relativeSpeed: Optional[Union[float, int]] = None
        """
        Relative pointer speed in pixels per second (default: 800).
        """
        gestureSourceType: Optional["types.Input.TypeGestureSourceType"] = None
        """
        Which type of input events to be generated (default: 'default', which queries the platform
for the preferred input type).
        """

    class synthesizeScrollGesture(ICommand):
        """
        Synthesizes a scroll gesture over a time period by issuing appropriate touch events.
        """

        _domain: str = PrivateAttr("Input")
        x: Union[float, int]
        """
        X coordinate of the start of the gesture in CSS pixels.
        """
        y: Union[float, int]
        """
        Y coordinate of the start of the gesture in CSS pixels.
        """
        xDistance: Optional[Union[float, int]] = None
        """
        The distance to scroll along the X axis (positive to scroll left).
        """
        yDistance: Optional[Union[float, int]] = None
        """
        The distance to scroll along the Y axis (positive to scroll up).
        """
        xOverscroll: Optional[Union[float, int]] = None
        """
        The number of additional pixels to scroll back along the X axis, in addition to the given
distance.
        """
        yOverscroll: Optional[Union[float, int]] = None
        """
        The number of additional pixels to scroll back along the Y axis, in addition to the given
distance.
        """
        preventFling: Optional[bool] = None
        """
        Prevent fling (default: true).
        """
        speed: Optional[Union[float, int]] = None
        """
        Swipe speed in pixels per second (default: 800).
        """
        gestureSourceType: Optional["types.Input.TypeGestureSourceType"] = None
        """
        Which type of input events to be generated (default: 'default', which queries the platform
for the preferred input type).
        """
        repeatCount: Optional[Union[float, int]] = None
        """
        The number of times to repeat the gesture (default: 0).
        """
        repeatDelayMs: Optional[Union[float, int]] = None
        """
        The number of milliseconds delay between each repeat. (default: 250).
        """
        interactionMarkerName: Optional[str] = None
        """
        The name of the interaction markers to generate, if not empty (default: "").
        """

    class synthesizeTapGesture(ICommand):
        """
        Synthesizes a tap gesture over a time period by issuing appropriate touch events.
        """

        _domain: str = PrivateAttr("Input")
        x: Union[float, int]
        """
        X coordinate of the start of the gesture in CSS pixels.
        """
        y: Union[float, int]
        """
        Y coordinate of the start of the gesture in CSS pixels.
        """
        duration: Optional[Union[float, int]] = None
        """
        Duration between touchdown and touchup events in ms (default: 50).
        """
        tapCount: Optional[Union[float, int]] = None
        """
        Number of times to perform the tap (e.g. 2 for double tap, default: 1).
        """
        gestureSourceType: Optional["types.Input.TypeGestureSourceType"] = None
        """
        Which type of input events to be generated (default: 'default', which queries the platform
for the preferred input type).
        """


class Inspector:
    class disable(ICommand):
        """
        Disables inspector domain notifications.
        """

        _domain: str = PrivateAttr("Inspector")

    class enable(ICommand):
        """
        Enables inspector domain notifications.
        """

        _domain: str = PrivateAttr("Inspector")


class LayerTree:
    class compositingReasons(ICommand):
        """
        Provides the reasons why the given layer was composited.
        """

        _domain: str = PrivateAttr("LayerTree")
        layerId: "types.LayerTree.TypeLayerId"
        """
        The id of the layer for which we want to get the reasons it was composited.
        """

    class disable(ICommand):
        """
        Disables compositing tree inspection.
        """

        _domain: str = PrivateAttr("LayerTree")

    class enable(ICommand):
        """
        Enables compositing tree inspection.
        """

        _domain: str = PrivateAttr("LayerTree")

    class loadSnapshot(ICommand):
        """
        Returns the snapshot identifier.
        """

        _domain: str = PrivateAttr("LayerTree")
        tiles: list[Any]
        """
        An array of tiles composing the snapshot.
        """

    class makeSnapshot(ICommand):
        """
        Returns the layer snapshot identifier.
        """

        _domain: str = PrivateAttr("LayerTree")
        layerId: "types.LayerTree.TypeLayerId"
        """
        The id of the layer.
        """

    class profileSnapshot(ICommand):
        _domain: str = PrivateAttr("LayerTree")
        snapshotId: "types.LayerTree.TypeSnapshotId"
        """
        The id of the layer snapshot.
        """
        minRepeatCount: Optional[Union[float, int]] = None
        """
        The maximum number of times to replay the snapshot (1, if not specified).
        """
        minDuration: Optional[Union[float, int]] = None
        """
        The minimum duration (in seconds) to replay the snapshot.
        """
        clipRect: Optional["types.DOM.TypeRect"] = None
        """
        The clip rectangle to apply when replaying the snapshot.
        """

    class releaseSnapshot(ICommand):
        """
        Releases layer snapshot captured by the back-end.
        """

        _domain: str = PrivateAttr("LayerTree")
        snapshotId: "types.LayerTree.TypeSnapshotId"
        """
        The id of the layer snapshot.
        """

    class replaySnapshot(ICommand):
        """
        Replays the layer snapshot and returns the resulting bitmap.
        """

        _domain: str = PrivateAttr("LayerTree")
        snapshotId: "types.LayerTree.TypeSnapshotId"
        """
        The id of the layer snapshot.
        """
        fromStep: Optional[Union[float, int]] = None
        """
        The first step to replay from (replay from the very start if not specified).
        """
        toStep: Optional[Union[float, int]] = None
        """
        The last step to replay to (replay till the end if not specified).
        """
        scale: Optional[Union[float, int]] = None
        """
        The scale to apply while replaying (defaults to 1).
        """

    class snapshotCommandLog(ICommand):
        """
        Replays the layer snapshot and returns canvas log.
        """

        _domain: str = PrivateAttr("LayerTree")
        snapshotId: "types.LayerTree.TypeSnapshotId"
        """
        The id of the layer snapshot.
        """


class Log:
    """
    Provides access to log entries.
    """

    class clear(ICommand):
        """
        Clears the log.
        """

        _domain: str = PrivateAttr("Log")

    class disable(ICommand):
        """
        Disables log domain, prevents further log entries from being reported to the client.
        """

        _domain: str = PrivateAttr("Log")

    class enable(ICommand):
        """
                Enables log domain, sends the entries collected so far to the client by means of the
        `entryAdded` notification.
        """

        _domain: str = PrivateAttr("Log")

    class startViolationsReport(ICommand):
        """
        start violation reporting.
        """

        _domain: str = PrivateAttr("Log")
        config: list[Any]
        """
        Configuration for violations.
        """

    class stopViolationsReport(ICommand):
        """
        Stop violation reporting.
        """

        _domain: str = PrivateAttr("Log")


class Memory:
    class getDOMCounters(ICommand):
        _domain: str = PrivateAttr("Memory")

    class prepareForLeakDetection(ICommand):
        _domain: str = PrivateAttr("Memory")

    class forciblyPurgeJavaScriptMemory(ICommand):
        """
        Simulate OomIntervention by purging V8 memory.
        """

        _domain: str = PrivateAttr("Memory")

    class setPressureNotificationsSuppressed(ICommand):
        """
        Enable/disable suppressing memory pressure notifications in all processes.
        """

        _domain: str = PrivateAttr("Memory")
        suppressed: bool
        """
        If true, memory pressure notifications will be suppressed.
        """

    class simulatePressureNotification(ICommand):
        """
        Simulate a memory pressure notification in all processes.
        """

        _domain: str = PrivateAttr("Memory")
        level: "types.Memory.TypePressureLevel"
        """
        Memory pressure level of the notification.
        """

    class startSampling(ICommand):
        """
        Start collecting native memory profile.
        """

        _domain: str = PrivateAttr("Memory")
        samplingInterval: Optional[Union[float, int]] = None
        """
        Average number of bytes between samples.
        """
        suppressRandomness: Optional[bool] = None
        """
        Do not randomize intervals between samples.
        """

    class stopSampling(ICommand):
        """
        Stop collecting native memory profile.
        """

        _domain: str = PrivateAttr("Memory")

    class getAllTimeSamplingProfile(ICommand):
        """
                Retrieve native memory allocations profile
        collected since renderer process startup.
        """

        _domain: str = PrivateAttr("Memory")

    class getBrowserSamplingProfile(ICommand):
        """
                Retrieve native memory allocations profile
        collected since browser process startup.
        """

        _domain: str = PrivateAttr("Memory")

    class getSamplingProfile(ICommand):
        """
                Retrieve native memory allocations profile collected since last
        `startSampling` call.
        """

        _domain: str = PrivateAttr("Memory")


class Network:
    """
        Network domain allows tracking network activities of the page. It exposes information about http,
    file, data and other requests and responses, their headers, bodies, timing, etc.
    """

    class setAcceptedEncodings(ICommand):
        """
        Sets a list of content encodings that will be accepted. Empty list means no encoding is accepted.
        """

        _domain: str = PrivateAttr("Network")
        encodings: list[Any]
        """
        List of accepted content encodings.
        """

    class clearAcceptedEncodingsOverride(ICommand):
        """
        Clears accepted encodings set by setAcceptedEncodings
        """

        _domain: str = PrivateAttr("Network")

    class canClearBrowserCache(ICommand):
        """
        Tells whether clearing browser cache is supported.
        """

        _domain: str = PrivateAttr("Network")

    class canClearBrowserCookies(ICommand):
        """
        Tells whether clearing browser cookies is supported.
        """

        _domain: str = PrivateAttr("Network")

    class canEmulateNetworkConditions(ICommand):
        """
        Tells whether emulation of network conditions is supported.
        """

        _domain: str = PrivateAttr("Network")

    class clearBrowserCache(ICommand):
        """
        Clears browser cache.
        """

        _domain: str = PrivateAttr("Network")

    class clearBrowserCookies(ICommand):
        """
        Clears browser cookies.
        """

        _domain: str = PrivateAttr("Network")

    class continueInterceptedRequest(ICommand):
        """
                Response to Network.requestIntercepted which either modifies the request to continue with any
        modifications, or blocks it, or completes it with the provided response bytes. If a network
        fetch occurs as a result which encounters a redirect an additional Network.requestIntercepted
        event will be sent with the same InterceptionId.
        Deprecated, use Fetch.continueRequest, Fetch.fulfillRequest and Fetch.failRequest instead.
        """

        _domain: str = PrivateAttr("Network")
        interceptionId: "types.Network.TypeInterceptionId"
        errorReason: Optional["types.Network.TypeErrorReason"] = None
        """
        If set this causes the request to fail with the given reason. Passing `Aborted` for requests
marked with `isNavigationRequest` also cancels the navigation. Must not be set in response
to an authChallenge.
        """
        rawResponse: Optional[str] = None
        """
        If set the requests completes using with the provided base64 encoded raw response, including
HTTP status line and headers etc... Must not be set in response to an authChallenge. (Encoded as a base64 string when passed over JSON)
        """
        url: Optional[str] = None
        """
        If set the request url will be modified in a way that's not observable by page. Must not be
set in response to an authChallenge.
        """
        method: Optional[str] = None
        """
        If set this allows the request method to be overridden. Must not be set in response to an
authChallenge.
        """
        postData: Optional[str] = None
        """
        If set this allows postData to be set. Must not be set in response to an authChallenge.
        """
        headers: Optional["types.Network.TypeHeaders"] = None
        """
        If set this allows the request headers to be changed. Must not be set in response to an
authChallenge.
        """
        authChallengeResponse: Optional["types.Network.TypeAuthChallengeResponse"] = (
            None
        )
        """
        Response to a requestIntercepted with an authChallenge. Must not be set otherwise.
        """

    class deleteCookies(ICommand):
        """
        Deletes browser cookies with matching name and url or domain/path/partitionKey pair.
        """

        _domain: str = PrivateAttr("Network")
        name: str
        """
        Name of the cookies to remove.
        """
        url: Optional[str] = None
        """
        If specified, deletes all the cookies with the given name where domain and path match
provided URL.
        """
        domain: Optional[str] = None
        """
        If specified, deletes only cookies with the exact domain.
        """
        path: Optional[str] = None
        """
        If specified, deletes only cookies with the exact path.
        """
        partitionKey: Optional["types.Network.TypeCookiePartitionKey"] = None
        """
        If specified, deletes only cookies with the the given name and partitionKey where
all partition key attributes match the cookie partition key attribute.
        """

    class disable(ICommand):
        """
        Disables network tracking, prevents network events from being sent to the client.
        """

        _domain: str = PrivateAttr("Network")

    class emulateNetworkConditions(ICommand):
        """
        Activates emulation of network conditions.
        """

        _domain: str = PrivateAttr("Network")
        offline: bool
        """
        True to emulate internet disconnection.
        """
        latency: Union[float, int]
        """
        Minimum latency from request sent to response headers received (ms).
        """
        downloadThroughput: Union[float, int]
        """
        Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
        """
        uploadThroughput: Union[float, int]
        """
        Maximal aggregated upload throughput (bytes/sec).  -1 disables upload throttling.
        """
        connectionType: Optional["types.Network.TypeConnectionType"] = None
        """
        Connection type if known.
        """
        packetLoss: Optional[Union[float, int]] = None
        """
        WebRTC packet loss (percent, 0-100). 0 disables packet loss emulation, 100 drops all the packets.
        """
        packetQueueLength: Optional[Union[float, int]] = None
        """
        WebRTC packet queue length (packet). 0 removes any queue length limitations.
        """
        packetReordering: Optional[bool] = None
        """
        WebRTC packetReordering feature.
        """

    class enable(ICommand):
        """
        Enables network tracking, network events will now be delivered to the client.
        """

        _domain: str = PrivateAttr("Network")
        maxTotalBufferSize: Optional[Union[float, int]] = None
        """
        Buffer size in bytes to use when preserving network payloads (XHRs, etc).
        """
        maxResourceBufferSize: Optional[Union[float, int]] = None
        """
        Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc).
        """
        maxPostDataSize: Optional[Union[float, int]] = None
        """
        Longest post body size (in bytes) that would be included in requestWillBeSent notification
        """

    class getAllCookies(ICommand):
        """
                Returns all browser cookies. Depending on the backend support, will return detailed cookie
        information in the `cookies` field.
        Deprecated. Use Storage.getCookies instead.
        """

        _domain: str = PrivateAttr("Network")

    class getCertificate(ICommand):
        """
        Returns the DER-encoded certificate.
        """

        _domain: str = PrivateAttr("Network")
        origin: str
        """
        Origin to get certificate for.
        """

    class getCookies(ICommand):
        """
                Returns all browser cookies for the current URL. Depending on the backend support, will return
        detailed cookie information in the `cookies` field.
        """

        _domain: str = PrivateAttr("Network")
        urls: Optional[list[Any]] = None
        """
        The list of URLs for which applicable cookies will be fetched.
If not specified, it's assumed to be set to the list containing
the URLs of the page and all of its subframes.
        """

    class getResponseBody(ICommand):
        """
        Returns content served for the given request.
        """

        _domain: str = PrivateAttr("Network")
        requestId: "types.Network.TypeRequestId"
        """
        Identifier of the network request to get content for.
        """

    class getRequestPostData(ICommand):
        """
        Returns post data sent with the request. Returns an error when no data was sent with the request.
        """

        _domain: str = PrivateAttr("Network")
        requestId: "types.Network.TypeRequestId"
        """
        Identifier of the network request to get content for.
        """

    class getResponseBodyForInterception(ICommand):
        """
        Returns content served for the given currently intercepted request.
        """

        _domain: str = PrivateAttr("Network")
        interceptionId: "types.Network.TypeInterceptionId"
        """
        Identifier for the intercepted request to get body for.
        """

    class takeResponseBodyForInterceptionAsStream(ICommand):
        """
                Returns a handle to the stream representing the response body. Note that after this command,
        the intercepted request can't be continued as is -- you either need to cancel it or to provide
        the response body. The stream only supports sequential read, IO.read will fail if the position
        is specified.
        """

        _domain: str = PrivateAttr("Network")
        interceptionId: "types.Network.TypeInterceptionId"

    class replayXHR(ICommand):
        """
                This method sends a new XMLHttpRequest which is identical to the original one. The following
        parameters should be identical: method, url, async, request body, extra headers, withCredentials
        attribute, user, password.
        """

        _domain: str = PrivateAttr("Network")
        requestId: "types.Network.TypeRequestId"
        """
        Identifier of XHR to replay.
        """

    class searchInResponseBody(ICommand):
        """
        Searches for given string in response content.
        """

        _domain: str = PrivateAttr("Network")
        requestId: "types.Network.TypeRequestId"
        """
        Identifier of the network response to search.
        """
        query: str
        """
        String to search for.
        """
        caseSensitive: Optional[bool] = None
        """
        If true, search is case sensitive.
        """
        isRegex: Optional[bool] = None
        """
        If true, treats string parameter as regex.
        """

    class setBlockedURLs(ICommand):
        """
        Blocks URLs from loading.
        """

        _domain: str = PrivateAttr("Network")
        urls: list[Any]
        """
        URL patterns to block. Wildcards ('*') are allowed.
        """

    class setBypassServiceWorker(ICommand):
        """
        Toggles ignoring of service worker for each request.
        """

        _domain: str = PrivateAttr("Network")
        bypass: bool
        """
        Bypass service worker and load from network.
        """

    class setCacheDisabled(ICommand):
        """
        Toggles ignoring cache for each request. If `true`, cache will not be used.
        """

        _domain: str = PrivateAttr("Network")
        cacheDisabled: bool
        """
        Cache disabled state.
        """

    class setCookie(ICommand):
        """
        Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.
        """

        _domain: str = PrivateAttr("Network")
        name: str
        """
        Cookie name.
        """
        value: str
        """
        Cookie value.
        """
        url: Optional[str] = None
        """
        The request-URI to associate with the setting of the cookie. This value can affect the
default domain, path, source port, and source scheme values of the created cookie.
        """
        domain: Optional[str] = None
        """
        Cookie domain.
        """
        path: Optional[str] = None
        """
        Cookie path.
        """
        secure: Optional[bool] = None
        """
        True if cookie is secure.
        """
        httpOnly: Optional[bool] = None
        """
        True if cookie is http-only.
        """
        sameSite: Optional["types.Network.TypeCookieSameSite"] = None
        """
        Cookie SameSite type.
        """
        expires: Optional["types.Network.TypeTimeSinceEpoch"] = None
        """
        Cookie expiration date, session cookie if not set
        """
        priority: Optional["types.Network.TypeCookiePriority"] = None
        """
        Cookie Priority type.
        """
        sameParty: Optional[bool] = None
        """
        True if cookie is SameParty.
        """
        sourceScheme: Optional["types.Network.TypeCookieSourceScheme"] = None
        """
        Cookie source scheme type.
        """
        sourcePort: Optional[Union[float, int]] = None
        """
        Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port.
An unspecified port value allows protocol clients to emulate legacy cookie scope for the port.
This is a temporary ability and it will be removed in the future.
        """
        partitionKey: Optional["types.Network.TypeCookiePartitionKey"] = None
        """
        Cookie partition key. If not set, the cookie will be set as not partitioned.
        """

    class setCookies(ICommand):
        """
        Sets given cookies.
        """

        _domain: str = PrivateAttr("Network")
        cookies: list[Any]
        """
        Cookies to be set.
        """

    class setExtraHTTPHeaders(ICommand):
        """
        Specifies whether to always send extra HTTP headers with the requests from this page.
        """

        _domain: str = PrivateAttr("Network")
        headers: "types.Network.TypeHeaders"
        """
        Map with extra HTTP headers.
        """

    class setAttachDebugStack(ICommand):
        """
        Specifies whether to attach a page script stack id in requests
        """

        _domain: str = PrivateAttr("Network")
        enabled: bool
        """
        Whether to attach a page script stack for debugging purpose.
        """

    class setRequestInterception(ICommand):
        """
                Sets the requests to intercept that match the provided patterns and optionally resource types.
        Deprecated, please use Fetch.enable instead.
        """

        _domain: str = PrivateAttr("Network")
        patterns: list[Any]
        """
        Requests matching any of these patterns will be forwarded and wait for the corresponding
continueInterceptedRequest call.
        """

    class setUserAgentOverride(ICommand):
        """
        Allows overriding user agent with the given string.
        """

        _domain: str = PrivateAttr("Network")
        userAgent: str
        """
        User agent to use.
        """
        acceptLanguage: Optional[str] = None
        """
        Browser language to emulate.
        """
        platform: Optional[str] = None
        """
        The platform navigator.platform should return.
        """
        userAgentMetadata: Optional["types.Emulation.TypeUserAgentMetadata"] = None
        """
        To be sent in Sec-CH-UA-* headers and returned in navigator.userAgentData
        """

    class streamResourceContent(ICommand):
        """
                Enables streaming of the response for the given requestId.
        If enabled, the dataReceived event contains the data that was received during streaming.
        """

        _domain: str = PrivateAttr("Network")
        requestId: "types.Network.TypeRequestId"
        """
        Identifier of the request to stream.
        """

    class getSecurityIsolationStatus(ICommand):
        """
        Returns information about the COEP/COOP isolation status.
        """

        _domain: str = PrivateAttr("Network")
        frameId: Optional["types.Page.TypeFrameId"] = None
        """
        If no frameId is provided, the status of the target is provided.
        """

    class enableReportingApi(ICommand):
        """
                Enables tracking for the Reporting API, events generated by the Reporting API will now be delivered to the client.
        Enabling triggers 'reportingApiReportAdded' for all existing reports.
        """

        _domain: str = PrivateAttr("Network")
        enable: bool
        """
        Whether to enable or disable events for the Reporting API
        """

    class loadNetworkResource(ICommand):
        """
        Fetches the resource and returns the content.
        """

        _domain: str = PrivateAttr("Network")
        frameId: Optional["types.Page.TypeFrameId"] = None
        """
        Frame id to get the resource for. Mandatory for frame targets, and
should be omitted for worker targets.
        """
        url: str
        """
        URL of the resource to get content for.
        """
        options: "types.Network.TypeLoadNetworkResourceOptions"
        """
        Options for the request.
        """


class Overlay:
    """
    This domain provides various functionality related to drawing atop the inspected page.
    """

    class disable(ICommand):
        """
        Disables domain notifications.
        """

        _domain: str = PrivateAttr("Overlay")

    class enable(ICommand):
        """
        Enables domain notifications.
        """

        _domain: str = PrivateAttr("Overlay")

    class getHighlightObjectForTest(ICommand):
        """
        For testing.
        """

        _domain: str = PrivateAttr("Overlay")
        nodeId: "types.DOM.TypeNodeId"
        """
        Id of the node to get highlight object for.
        """
        includeDistance: Optional[bool] = None
        """
        Whether to include distance info.
        """
        includeStyle: Optional[bool] = None
        """
        Whether to include style info.
        """
        colorFormat: Optional["types.Overlay.TypeColorFormat"] = None
        """
        The color format to get config with (default: hex).
        """
        showAccessibilityInfo: Optional[bool] = None
        """
        Whether to show accessibility info (default: true).
        """

    class getGridHighlightObjectsForTest(ICommand):
        """
        For Persistent Grid testing.
        """

        _domain: str = PrivateAttr("Overlay")
        nodeIds: list[Any]
        """
        Ids of the node to get highlight object for.
        """

    class getSourceOrderHighlightObjectForTest(ICommand):
        """
        For Source Order Viewer testing.
        """

        _domain: str = PrivateAttr("Overlay")
        nodeId: "types.DOM.TypeNodeId"
        """
        Id of the node to highlight.
        """

    class hideHighlight(ICommand):
        """
        Hides any highlight.
        """

        _domain: str = PrivateAttr("Overlay")

    class highlightFrame(ICommand):
        """
                Highlights owner element of the frame with given id.
        Deprecated: Doesn't work reliably and cannot be fixed due to process
        separation (the owner node might be in a different process). Determine
        the owner node in the client and use highlightNode.
        """

        _domain: str = PrivateAttr("Overlay")
        frameId: "types.Page.TypeFrameId"
        """
        Identifier of the frame to highlight.
        """
        contentColor: Optional["types.DOM.TypeRGBA"] = None
        """
        The content box highlight fill color (default: transparent).
        """
        contentOutlineColor: Optional["types.DOM.TypeRGBA"] = None
        """
        The content box highlight outline color (default: transparent).
        """

    class highlightNode(ICommand):
        """
                Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or
        objectId must be specified.
        """

        _domain: str = PrivateAttr("Overlay")
        highlightConfig: "types.Overlay.TypeHighlightConfig"
        """
        A descriptor for the highlight appearance.
        """
        nodeId: Optional["types.DOM.TypeNodeId"] = None
        """
        Identifier of the node to highlight.
        """
        backendNodeId: Optional["types.DOM.TypeBackendNodeId"] = None
        """
        Identifier of the backend node to highlight.
        """
        objectId: Optional["types.Runtime.TypeRemoteObjectId"] = None
        """
        JavaScript object id of the node to be highlighted.
        """
        selector: Optional[str] = None
        """
        Selectors to highlight relevant nodes.
        """

    class highlightQuad(ICommand):
        """
        Highlights given quad. Coordinates are absolute with respect to the main frame viewport.
        """

        _domain: str = PrivateAttr("Overlay")
        quad: "types.DOM.TypeQuad"
        """
        Quad to highlight
        """
        color: Optional["types.DOM.TypeRGBA"] = None
        """
        The highlight fill color (default: transparent).
        """
        outlineColor: Optional["types.DOM.TypeRGBA"] = None
        """
        The highlight outline color (default: transparent).
        """

    class highlightRect(ICommand):
        """
        Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.
        """

        _domain: str = PrivateAttr("Overlay")
        x: Union[float, int]
        """
        X coordinate
        """
        y: Union[float, int]
        """
        Y coordinate
        """
        width: Union[float, int]
        """
        Rectangle width
        """
        height: Union[float, int]
        """
        Rectangle height
        """
        color: Optional["types.DOM.TypeRGBA"] = None
        """
        The highlight fill color (default: transparent).
        """
        outlineColor: Optional["types.DOM.TypeRGBA"] = None
        """
        The highlight outline color (default: transparent).
        """

    class highlightSourceOrder(ICommand):
        """
                Highlights the source order of the children of the DOM node with given id or with the given
        JavaScript object wrapper. Either nodeId or objectId must be specified.
        """

        _domain: str = PrivateAttr("Overlay")
        sourceOrderConfig: "types.Overlay.TypeSourceOrderConfig"
        """
        A descriptor for the appearance of the overlay drawing.
        """
        nodeId: Optional["types.DOM.TypeNodeId"] = None
        """
        Identifier of the node to highlight.
        """
        backendNodeId: Optional["types.DOM.TypeBackendNodeId"] = None
        """
        Identifier of the backend node to highlight.
        """
        objectId: Optional["types.Runtime.TypeRemoteObjectId"] = None
        """
        JavaScript object id of the node to be highlighted.
        """

    class setInspectMode(ICommand):
        """
                Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted.
        Backend then generates 'inspectNodeRequested' event upon element selection.
        """

        _domain: str = PrivateAttr("Overlay")
        mode: "types.Overlay.TypeInspectMode"
        """
        Set an inspection mode.
        """
        highlightConfig: Optional["types.Overlay.TypeHighlightConfig"] = None
        """
        A descriptor for the highlight appearance of hovered-over nodes. May be omitted if `enabled
== false`.
        """

    class setShowAdHighlights(ICommand):
        """
        Highlights owner element of all frames detected to be ads.
        """

        _domain: str = PrivateAttr("Overlay")
        show: bool
        """
        True for showing ad highlights
        """

    class setPausedInDebuggerMessage(ICommand):
        _domain: str = PrivateAttr("Overlay")
        message: Optional[str] = None
        """
        The message to display, also triggers resume and step over controls.
        """

    class setShowDebugBorders(ICommand):
        """
        Requests that backend shows debug borders on layers
        """

        _domain: str = PrivateAttr("Overlay")
        show: bool
        """
        True for showing debug borders
        """

    class setShowFPSCounter(ICommand):
        """
        Requests that backend shows the FPS counter
        """

        _domain: str = PrivateAttr("Overlay")
        show: bool
        """
        True for showing the FPS counter
        """

    class setShowGridOverlays(ICommand):
        """
        Highlight multiple elements with the CSS Grid overlay.
        """

        _domain: str = PrivateAttr("Overlay")
        gridNodeHighlightConfigs: list[Any]
        """
        An array of node identifiers and descriptors for the highlight appearance.
        """

    class setShowFlexOverlays(ICommand):
        _domain: str = PrivateAttr("Overlay")
        flexNodeHighlightConfigs: list[Any]
        """
        An array of node identifiers and descriptors for the highlight appearance.
        """

    class setShowScrollSnapOverlays(ICommand):
        _domain: str = PrivateAttr("Overlay")
        scrollSnapHighlightConfigs: list[Any]
        """
        An array of node identifiers and descriptors for the highlight appearance.
        """

    class setShowContainerQueryOverlays(ICommand):
        _domain: str = PrivateAttr("Overlay")
        containerQueryHighlightConfigs: list[Any]
        """
        An array of node identifiers and descriptors for the highlight appearance.
        """

    class setShowPaintRects(ICommand):
        """
        Requests that backend shows paint rectangles
        """

        _domain: str = PrivateAttr("Overlay")
        result: bool
        """
        True for showing paint rectangles
        """

    class setShowLayoutShiftRegions(ICommand):
        """
        Requests that backend shows layout shift regions
        """

        _domain: str = PrivateAttr("Overlay")
        result: bool
        """
        True for showing layout shift regions
        """

    class setShowScrollBottleneckRects(ICommand):
        """
        Requests that backend shows scroll bottleneck rects
        """

        _domain: str = PrivateAttr("Overlay")
        show: bool
        """
        True for showing scroll bottleneck rects
        """

    class setShowHitTestBorders(ICommand):
        """
        Deprecated, no longer has any effect.
        """

        _domain: str = PrivateAttr("Overlay")
        show: bool
        """
        True for showing hit-test borders
        """

    class setShowWebVitals(ICommand):
        """
        Request that backend shows an overlay with web vital metrics.
        """

        _domain: str = PrivateAttr("Overlay")
        show: bool

    class setShowViewportSizeOnResize(ICommand):
        """
        Paints viewport size upon main frame resize.
        """

        _domain: str = PrivateAttr("Overlay")
        show: bool
        """
        Whether to paint size or not.
        """

    class setShowHinge(ICommand):
        """
        Add a dual screen device hinge
        """

        _domain: str = PrivateAttr("Overlay")
        hingeConfig: Optional["types.Overlay.TypeHingeConfig"] = None
        """
        hinge data, null means hideHinge
        """

    class setShowIsolatedElements(ICommand):
        """
        Show elements in isolation mode with overlays.
        """

        _domain: str = PrivateAttr("Overlay")
        isolatedElementHighlightConfigs: list[Any]
        """
        An array of node identifiers and descriptors for the highlight appearance.
        """

    class setShowWindowControlsOverlay(ICommand):
        """
        Show Window Controls Overlay for PWA
        """

        _domain: str = PrivateAttr("Overlay")
        windowControlsOverlayConfig: Optional[
            "types.Overlay.TypeWindowControlsOverlayConfig"
        ] = None
        """
        Window Controls Overlay data, null means hide Window Controls Overlay
        """


class Page:
    """
    Actions and events related to the inspected page belong to the page domain.
    """

    class addScriptToEvaluateOnLoad(ICommand):
        """
        Deprecated, please use addScriptToEvaluateOnNewDocument instead.
        """

        _domain: str = PrivateAttr("Page")
        scriptSource: str

    class addScriptToEvaluateOnNewDocument(ICommand):
        """
        Evaluates given script in every frame upon creation (before loading frame's scripts).
        """

        _domain: str = PrivateAttr("Page")
        source: str
        worldName: Optional[str] = None
        """
        If specified, creates an isolated world with the given name and evaluates given script in it.
This world name will be used as the ExecutionContextDescription::name when the corresponding
event is emitted.
        """
        includeCommandLineAPI: Optional[bool] = None
        """
        Specifies whether command line API should be available to the script, defaults
to false.
        """
        runImmediately: Optional[bool] = None
        """
        If true, runs the script immediately on existing execution contexts or worlds.
Default: false.
        """

    class bringToFront(ICommand):
        """
        Brings page to front (activates tab).
        """

        _domain: str = PrivateAttr("Page")

    class captureScreenshot(ICommand):
        """
        Capture page screenshot.
        """

        _domain: str = PrivateAttr("Page")
        format: Optional[Literal["jpeg", "png", "webp"]] = None
        """
        Image compression format (defaults to png).
        """
        quality: Optional[Union[float, int]] = None
        """
        Compression quality from range [0..100] (jpeg only).
        """
        clip: Optional["types.Page.TypeViewport"] = None
        """
        Capture the screenshot of a given region only.
        """
        fromSurface: Optional[bool] = None
        """
        Capture the screenshot from the surface, rather than the view. Defaults to true.
        """
        captureBeyondViewport: Optional[bool] = None
        """
        Capture the screenshot beyond the viewport. Defaults to false.
        """
        optimizeForSpeed: Optional[bool] = None
        """
        Optimize image encoding for speed, not for resulting size (defaults to false)
        """

    class captureSnapshot(ICommand):
        """
                Returns a snapshot of the page as a string. For MHTML format, the serialization includes
        iframes, shadow DOM, external resources, and element-inline styles.
        """

        _domain: str = PrivateAttr("Page")
        format: Optional[Literal["mhtml"]] = None
        """
        Format (defaults to mhtml).
        """

    class clearDeviceMetricsOverride(ICommand):
        """
        Clears the overridden device metrics.
        """

        _domain: str = PrivateAttr("Page")

    class clearDeviceOrientationOverride(ICommand):
        """
        Clears the overridden Device Orientation.
        """

        _domain: str = PrivateAttr("Page")

    class clearGeolocationOverride(ICommand):
        """
        Clears the overridden Geolocation Position and Error.
        """

        _domain: str = PrivateAttr("Page")

    class createIsolatedWorld(ICommand):
        """
        Creates an isolated world for the given frame.
        """

        _domain: str = PrivateAttr("Page")
        frameId: "types.Page.TypeFrameId"
        """
        Id of the frame in which the isolated world should be created.
        """
        worldName: Optional[str] = None
        """
        An optional name which is reported in the Execution Context.
        """
        grantUniveralAccess: Optional[bool] = None
        """
        Whether or not universal access should be granted to the isolated world. This is a powerful
option, use with caution.
        """

    class deleteCookie(ICommand):
        """
        Deletes browser cookie with given name, domain and path.
        """

        _domain: str = PrivateAttr("Page")
        cookieName: str
        """
        Name of the cookie to remove.
        """
        url: str
        """
        URL to match cooke domain and path.
        """

    class disable(ICommand):
        """
        Disables page domain notifications.
        """

        _domain: str = PrivateAttr("Page")

    class enable(ICommand):
        """
        Enables page domain notifications.
        """

        _domain: str = PrivateAttr("Page")

    class getAppManifest(ICommand):
        """
              Gets the processed manifest for this current document.
        This API always waits for the manifest to be loaded.
        If manifestId is provided, and it does not match the manifest of the
          current document, this API errors out.
        If there is not a loaded page, this API errors out immediately.
        """

        _domain: str = PrivateAttr("Page")
        manifestId: Optional[str] = None

    class getInstallabilityErrors(ICommand):
        _domain: str = PrivateAttr("Page")

    class getManifestIcons(ICommand):
        """
        Deprecated because it's not guaranteed that the returned icon is in fact the one used for PWA installation.
        """

        _domain: str = PrivateAttr("Page")

    class getAppId(ICommand):
        """
                Returns the unique (PWA) app id.
        Only returns values if the feature flag 'WebAppEnableManifestId' is enabled
        """

        _domain: str = PrivateAttr("Page")

    class getAdScriptId(ICommand):
        _domain: str = PrivateAttr("Page")
        frameId: "types.Page.TypeFrameId"

    class getFrameTree(ICommand):
        """
        Returns present frame tree structure.
        """

        _domain: str = PrivateAttr("Page")

    class getLayoutMetrics(ICommand):
        """
        Returns metrics relating to the layouting of the page, such as viewport bounds/scale.
        """

        _domain: str = PrivateAttr("Page")

    class getNavigationHistory(ICommand):
        """
        Returns navigation history for the current page.
        """

        _domain: str = PrivateAttr("Page")

    class resetNavigationHistory(ICommand):
        """
        Resets navigation history for the current page.
        """

        _domain: str = PrivateAttr("Page")

    class getResourceContent(ICommand):
        """
        Returns content of the given resource.
        """

        _domain: str = PrivateAttr("Page")
        frameId: "types.Page.TypeFrameId"
        """
        Frame id to get resource for.
        """
        url: str
        """
        URL of the resource to get content for.
        """

    class getResourceTree(ICommand):
        """
        Returns present frame / resource tree structure.
        """

        _domain: str = PrivateAttr("Page")

    class handleJavaScriptDialog(ICommand):
        """
        Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).
        """

        _domain: str = PrivateAttr("Page")
        accept: bool
        """
        Whether to accept or dismiss the dialog.
        """
        promptText: Optional[str] = None
        """
        The text to enter into the dialog prompt before accepting. Used only if this is a prompt
dialog.
        """

    class navigate(ICommand):
        """
        Navigates current page to the given URL.
        """

        _domain: str = PrivateAttr("Page")
        url: str
        """
        URL to navigate the page to.
        """
        referrer: Optional[str] = None
        """
        Referrer URL.
        """
        transitionType: Optional["types.Page.TypeTransitionType"] = None
        """
        Intended transition type.
        """
        frameId: Optional["types.Page.TypeFrameId"] = None
        """
        Frame id to navigate, if not specified navigates the top frame.
        """
        referrerPolicy: Optional["types.Page.TypeReferrerPolicy"] = None
        """
        Referrer-policy used for the navigation.
        """

    class navigateToHistoryEntry(ICommand):
        """
        Navigates current page to the given history entry.
        """

        _domain: str = PrivateAttr("Page")
        entryId: Union[float, int]
        """
        Unique id of the entry to navigate to.
        """

    class printToPDF(ICommand):
        """
        Print page as PDF.
        """

        _domain: str = PrivateAttr("Page")
        landscape: Optional[bool] = None
        """
        Paper orientation. Defaults to false.
        """
        displayHeaderFooter: Optional[bool] = None
        """
        Display header and footer. Defaults to false.
        """
        printBackground: Optional[bool] = None
        """
        Print background graphics. Defaults to false.
        """
        scale: Optional[Union[float, int]] = None
        """
        Scale of the webpage rendering. Defaults to 1.
        """
        paperWidth: Optional[Union[float, int]] = None
        """
        Paper width in inches. Defaults to 8.5 inches.
        """
        paperHeight: Optional[Union[float, int]] = None
        """
        Paper height in inches. Defaults to 11 inches.
        """
        marginTop: Optional[Union[float, int]] = None
        """
        Top margin in inches. Defaults to 1cm (~0.4 inches).
        """
        marginBottom: Optional[Union[float, int]] = None
        """
        Bottom margin in inches. Defaults to 1cm (~0.4 inches).
        """
        marginLeft: Optional[Union[float, int]] = None
        """
        Left margin in inches. Defaults to 1cm (~0.4 inches).
        """
        marginRight: Optional[Union[float, int]] = None
        """
        Right margin in inches. Defaults to 1cm (~0.4 inches).
        """
        pageRanges: Optional[str] = None
        """
        Paper ranges to print, one based, e.g., '1-5, 8, 11-13'. Pages are
printed in the document order, not in the order specified, and no
more than once.
Defaults to empty string, which implies the entire document is printed.
The page numbers are quietly capped to actual page count of the
document, and ranges beyond the end of the document are ignored.
If this results in no pages to print, an error is reported.
It is an error to specify a range with start greater than end.
        """
        headerTemplate: Optional[str] = None
        """
        HTML template for the print header. Should be valid HTML markup with following
classes used to inject printing values into them:
- `date`: formatted print date
- `title`: document title
- `url`: document location
- `pageNumber`: current page number
- `totalPages`: total pages in the document

For example, `<span class=title></span>` would generate span containing the title.
        """
        footerTemplate: Optional[str] = None
        """
        HTML template for the print footer. Should use the same format as the `headerTemplate`.
        """
        preferCSSPageSize: Optional[bool] = None
        """
        Whether or not to prefer page size as defined by css. Defaults to false,
in which case the content will be scaled to fit the paper size.
        """
        transferMode: Optional[Literal["ReturnAsBase64", "ReturnAsStream"]] = None
        """
        return as stream
        """
        generateTaggedPDF: Optional[bool] = None
        """
        Whether or not to generate tagged (accessible) PDF. Defaults to embedder choice.
        """
        generateDocumentOutline: Optional[bool] = None
        """
        Whether or not to embed the document outline into the PDF.
        """

    class reload(ICommand):
        """
        Reloads given page optionally ignoring the cache.
        """

        _domain: str = PrivateAttr("Page")
        ignoreCache: Optional[bool] = None
        """
        If true, browser cache is ignored (as if the user pressed Shift+refresh).
        """
        scriptToEvaluateOnLoad: Optional[str] = None
        """
        If set, the script will be injected into all frames of the inspected page after reload.
Argument will be ignored if reloading dataURL origin.
        """
        loaderId: Optional["types.Network.TypeLoaderId"] = None
        """
        If set, an error will be thrown if the target page's main frame's
loader id does not match the provided id. This prevents accidentally
reloading an unintended target in case there's a racing navigation.
        """

    class removeScriptToEvaluateOnLoad(ICommand):
        """
        Deprecated, please use removeScriptToEvaluateOnNewDocument instead.
        """

        _domain: str = PrivateAttr("Page")
        identifier: "types.Page.TypeScriptIdentifier"

    class removeScriptToEvaluateOnNewDocument(ICommand):
        """
        Removes given script from the list.
        """

        _domain: str = PrivateAttr("Page")
        identifier: "types.Page.TypeScriptIdentifier"

    class screencastFrameAck(ICommand):
        """
        Acknowledges that a screencast frame has been received by the frontend.
        """

        _domain: str = PrivateAttr("Page")
        sessionId: Union[float, int]
        """
        Frame number.
        """

    class searchInResource(ICommand):
        """
        Searches for given string in resource content.
        """

        _domain: str = PrivateAttr("Page")
        frameId: "types.Page.TypeFrameId"
        """
        Frame id for resource to search in.
        """
        url: str
        """
        URL of the resource to search in.
        """
        query: str
        """
        String to search for.
        """
        caseSensitive: Optional[bool] = None
        """
        If true, search is case sensitive.
        """
        isRegex: Optional[bool] = None
        """
        If true, treats string parameter as regex.
        """

    class setAdBlockingEnabled(ICommand):
        """
        Enable Chrome's experimental ad filter on all sites.
        """

        _domain: str = PrivateAttr("Page")
        enabled: bool
        """
        Whether to block ads.
        """

    class setBypassCSP(ICommand):
        """
        Enable page Content Security Policy by-passing.
        """

        _domain: str = PrivateAttr("Page")
        enabled: bool
        """
        Whether to bypass page CSP.
        """

    class getPermissionsPolicyState(ICommand):
        """
        Get Permissions Policy state on given frame.
        """

        _domain: str = PrivateAttr("Page")
        frameId: "types.Page.TypeFrameId"

    class getOriginTrials(ICommand):
        """
        Get Origin Trials on given frame.
        """

        _domain: str = PrivateAttr("Page")
        frameId: "types.Page.TypeFrameId"

    class setDeviceMetricsOverride(ICommand):
        """
                Overrides the values of device screen dimensions (window.screen.width, window.screen.height,
        window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media
        query results).
        """

        _domain: str = PrivateAttr("Page")
        width: Union[float, int]
        """
        Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.
        """
        height: Union[float, int]
        """
        Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.
        """
        deviceScaleFactor: Union[float, int]
        """
        Overriding device scale factor value. 0 disables the override.
        """
        mobile: bool
        """
        Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text
autosizing and more.
        """
        scale: Optional[Union[float, int]] = None
        """
        Scale to apply to resulting view image.
        """
        screenWidth: Optional[Union[float, int]] = None
        """
        Overriding screen width value in pixels (minimum 0, maximum 10000000).
        """
        screenHeight: Optional[Union[float, int]] = None
        """
        Overriding screen height value in pixels (minimum 0, maximum 10000000).
        """
        positionX: Optional[Union[float, int]] = None
        """
        Overriding view X position on screen in pixels (minimum 0, maximum 10000000).
        """
        positionY: Optional[Union[float, int]] = None
        """
        Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).
        """
        dontSetVisibleSize: Optional[bool] = None
        """
        Do not set visible view size, rely upon explicit setVisibleSize call.
        """
        screenOrientation: Optional["types.Emulation.TypeScreenOrientation"] = None
        """
        Screen orientation override.
        """
        viewport: Optional["types.Page.TypeViewport"] = None
        """
        The viewport dimensions and scale. If not set, the override is cleared.
        """

    class setDeviceOrientationOverride(ICommand):
        """
        Overrides the Device Orientation.
        """

        _domain: str = PrivateAttr("Page")
        alpha: Union[float, int]
        """
        Mock alpha
        """
        beta: Union[float, int]
        """
        Mock beta
        """
        gamma: Union[float, int]
        """
        Mock gamma
        """

    class setFontFamilies(ICommand):
        """
        Set generic font families.
        """

        _domain: str = PrivateAttr("Page")
        fontFamilies: "types.Page.TypeFontFamilies"
        """
        Specifies font families to set. If a font family is not specified, it won't be changed.
        """
        forScripts: Optional[list[Any]] = None
        """
        Specifies font families to set for individual scripts.
        """

    class setFontSizes(ICommand):
        """
        Set default font sizes.
        """

        _domain: str = PrivateAttr("Page")
        fontSizes: "types.Page.TypeFontSizes"
        """
        Specifies font sizes to set. If a font size is not specified, it won't be changed.
        """

    class setDocumentContent(ICommand):
        """
        Sets given markup as the document's HTML.
        """

        _domain: str = PrivateAttr("Page")
        frameId: "types.Page.TypeFrameId"
        """
        Frame id to set HTML for.
        """
        html: str
        """
        HTML content to set.
        """

    class setDownloadBehavior(ICommand):
        """
        Set the behavior when downloading a file.
        """

        _domain: str = PrivateAttr("Page")
        behavior: Literal["deny", "allow", "default"]
        """
        Whether to allow all or deny all download requests, or use default Chrome behavior if
available (otherwise deny).
        """
        downloadPath: Optional[str] = None
        """
        The default path to save downloaded files to. This is required if behavior is set to 'allow'
        """

    class setGeolocationOverride(ICommand):
        """
                Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position
        unavailable.
        """

        _domain: str = PrivateAttr("Page")
        latitude: Optional[Union[float, int]] = None
        """
        Mock latitude
        """
        longitude: Optional[Union[float, int]] = None
        """
        Mock longitude
        """
        accuracy: Optional[Union[float, int]] = None
        """
        Mock accuracy
        """

    class setLifecycleEventsEnabled(ICommand):
        """
        Controls whether page will emit lifecycle events.
        """

        _domain: str = PrivateAttr("Page")
        enabled: bool
        """
        If true, starts emitting lifecycle events.
        """

    class setTouchEmulationEnabled(ICommand):
        """
        Toggles mouse event-based touch event emulation.
        """

        _domain: str = PrivateAttr("Page")
        enabled: bool
        """
        Whether the touch event emulation should be enabled.
        """
        configuration: Optional[Literal["mobile", "desktop"]] = None
        """
        Touch/gesture events configuration. Default: current platform.
        """

    class startScreencast(ICommand):
        """
        Starts sending each frame using the `screencastFrame` event.
        """

        _domain: str = PrivateAttr("Page")
        format: Optional[Literal["jpeg", "png"]] = None
        """
        Image compression format.
        """
        quality: Optional[Union[float, int]] = None
        """
        Compression quality from range [0..100].
        """
        maxWidth: Optional[Union[float, int]] = None
        """
        Maximum screenshot width.
        """
        maxHeight: Optional[Union[float, int]] = None
        """
        Maximum screenshot height.
        """
        everyNthFrame: Optional[Union[float, int]] = None
        """
        Send every n-th frame.
        """

    class stopLoading(ICommand):
        """
        Force the page stop all navigations and pending resource fetches.
        """

        _domain: str = PrivateAttr("Page")

    class crash(ICommand):
        """
        Crashes renderer on the IO thread, generates minidumps.
        """

        _domain: str = PrivateAttr("Page")

    class close(ICommand):
        """
        Tries to close page, running its beforeunload hooks, if any.
        """

        _domain: str = PrivateAttr("Page")

    class setWebLifecycleState(ICommand):
        """
                Tries to update the web lifecycle state of the page.
        It will transition the page to the given state according to:
        https://github.com/WICG/web-lifecycle/
        """

        _domain: str = PrivateAttr("Page")
        state: Literal["frozen", "active"]
        """
        Target lifecycle state
        """

    class stopScreencast(ICommand):
        """
        Stops sending each frame in the `screencastFrame`.
        """

        _domain: str = PrivateAttr("Page")

    class produceCompilationCache(ICommand):
        """
                Requests backend to produce compilation cache for the specified scripts.
        `scripts` are appended to the list of scripts for which the cache
        would be produced. The list may be reset during page navigation.
        When script with a matching URL is encountered, the cache is optionally
        produced upon backend discretion, based on internal heuristics.
        See also: `Page.compilationCacheProduced`.
        """

        _domain: str = PrivateAttr("Page")
        scripts: list[Any]

    class addCompilationCache(ICommand):
        """
                Seeds compilation cache for given url. Compilation cache does not survive
        cross-process navigation.
        """

        _domain: str = PrivateAttr("Page")
        url: str
        data: str
        """
        Base64-encoded data (Encoded as a base64 string when passed over JSON)
        """

    class clearCompilationCache(ICommand):
        """
        Clears seeded compilation cache.
        """

        _domain: str = PrivateAttr("Page")

    class setSPCTransactionMode(ICommand):
        """
                Sets the Secure Payment Confirmation transaction mode.
        https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode
        """

        _domain: str = PrivateAttr("Page")
        mode: "types.Page.TypeAutoResponseMode"

    class setRPHRegistrationMode(ICommand):
        """
                Extensions for Custom Handlers API:
        https://html.spec.whatwg.org/multipage/system-state.html#rph-automation
        """

        _domain: str = PrivateAttr("Page")
        mode: "types.Page.TypeAutoResponseMode"

    class generateTestReport(ICommand):
        """
        Generates a report for testing.
        """

        _domain: str = PrivateAttr("Page")
        message: str
        """
        Message to be displayed in the report.
        """
        group: Optional[str] = None
        """
        Specifies the endpoint group to deliver the report to.
        """

    class waitForDebugger(ICommand):
        """
        Pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger.
        """

        _domain: str = PrivateAttr("Page")

    class setInterceptFileChooserDialog(ICommand):
        """
                Intercept file chooser requests and transfer control to protocol clients.
        When file chooser interception is enabled, native file chooser dialog is not shown.
        Instead, a protocol event `Page.fileChooserOpened` is emitted.
        """

        _domain: str = PrivateAttr("Page")
        enabled: bool

    class setPrerenderingAllowed(ICommand):
        """
                Enable/disable prerendering manually.

        This command is a short-term solution for https://crbug.com/1440085.
        See https://docs.google.com/document/d/12HVmFxYj5Jc-eJr5OmWsa2bqTJsbgGLKI6ZIyx0_wpA
        for more details.

        TODO(https://crbug.com/1440085): Remove this once Puppeteer supports tab targets.
        """

        _domain: str = PrivateAttr("Page")
        isAllowed: bool


class Performance:
    class disable(ICommand):
        """
        Disable collecting and reporting metrics.
        """

        _domain: str = PrivateAttr("Performance")

    class enable(ICommand):
        """
        Enable collecting and reporting metrics.
        """

        _domain: str = PrivateAttr("Performance")
        timeDomain: Optional[Literal["timeTicks", "threadTicks"]] = None
        """
        Time domain to use for collecting and reporting duration metrics.
        """

    class setTimeDomain(ICommand):
        """
                Sets time domain to use for collecting and reporting duration metrics.
        Note that this must be called before enabling metrics collection. Calling
        this method while metrics collection is enabled returns an error.
        """

        _domain: str = PrivateAttr("Performance")
        timeDomain: Literal["timeTicks", "threadTicks"]
        """
        Time domain
        """

    class getMetrics(ICommand):
        """
        Retrieve current values of run-time metrics.
        """

        _domain: str = PrivateAttr("Performance")


class PerformanceTimeline:
    """
        Reporting of performance timeline events, as specified in
    https://w3c.github.io/performance-timeline/#dom-performanceobserver.
    """

    class enable(ICommand):
        """
                Previously buffered events would be reported before method returns.
        See also: timelineEventAdded
        """

        _domain: str = PrivateAttr("PerformanceTimeline")
        eventTypes: list[Any]
        """
        The types of event to report, as specified in
https://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype
The specified filter overrides any previous filters, passing empty
filter disables recording.
Note that not all types exposed to the web platform are currently supported.
        """


class Security:
    """
    Security
    """

    class disable(ICommand):
        """
        Disables tracking security state changes.
        """

        _domain: str = PrivateAttr("Security")

    class enable(ICommand):
        """
        Enables tracking security state changes.
        """

        _domain: str = PrivateAttr("Security")

    class setIgnoreCertificateErrors(ICommand):
        """
        Enable/disable whether all certificate errors should be ignored.
        """

        _domain: str = PrivateAttr("Security")
        ignore: bool
        """
        If true, all certificate errors will be ignored.
        """

    class handleCertificateError(ICommand):
        """
        Handles a certificate error that fired a certificateError event.
        """

        _domain: str = PrivateAttr("Security")
        eventId: Union[float, int]
        """
        The ID of the event.
        """
        action: "types.Security.TypeCertificateErrorAction"
        """
        The action to take on the certificate error.
        """

    class setOverrideCertificateErrors(ICommand):
        """
                Enable/disable overriding certificate errors. If enabled, all certificate error events need to
        be handled by the DevTools client and should be answered with `handleCertificateError` commands.
        """

        _domain: str = PrivateAttr("Security")
        override: bool
        """
        If true, certificate errors will be overridden.
        """


class ServiceWorker:
    class deliverPushMessage(ICommand):
        _domain: str = PrivateAttr("ServiceWorker")
        origin: str
        registrationId: "types.ServiceWorker.TypeRegistrationID"
        data: str

    class disable(ICommand):
        _domain: str = PrivateAttr("ServiceWorker")

    class dispatchSyncEvent(ICommand):
        _domain: str = PrivateAttr("ServiceWorker")
        origin: str
        registrationId: "types.ServiceWorker.TypeRegistrationID"
        tag: str
        lastChance: bool

    class dispatchPeriodicSyncEvent(ICommand):
        _domain: str = PrivateAttr("ServiceWorker")
        origin: str
        registrationId: "types.ServiceWorker.TypeRegistrationID"
        tag: str

    class enable(ICommand):
        _domain: str = PrivateAttr("ServiceWorker")

    class inspectWorker(ICommand):
        _domain: str = PrivateAttr("ServiceWorker")
        versionId: str

    class setForceUpdateOnPageLoad(ICommand):
        _domain: str = PrivateAttr("ServiceWorker")
        forceUpdateOnPageLoad: bool

    class skipWaiting(ICommand):
        _domain: str = PrivateAttr("ServiceWorker")
        scopeURL: str

    class startWorker(ICommand):
        _domain: str = PrivateAttr("ServiceWorker")
        scopeURL: str

    class stopAllWorkers(ICommand):
        _domain: str = PrivateAttr("ServiceWorker")

    class stopWorker(ICommand):
        _domain: str = PrivateAttr("ServiceWorker")
        versionId: str

    class unregister(ICommand):
        _domain: str = PrivateAttr("ServiceWorker")
        scopeURL: str

    class updateRegistration(ICommand):
        _domain: str = PrivateAttr("ServiceWorker")
        scopeURL: str


class Storage:
    class getStorageKeyForFrame(ICommand):
        """
        Returns a storage key given a frame id.
        """

        _domain: str = PrivateAttr("Storage")
        frameId: "types.Page.TypeFrameId"

    class clearDataForOrigin(ICommand):
        """
        Clears storage for origin.
        """

        _domain: str = PrivateAttr("Storage")
        origin: str
        """
        Security origin.
        """
        storageTypes: str
        """
        Comma separated list of StorageType to clear.
        """

    class clearDataForStorageKey(ICommand):
        """
        Clears storage for storage key.
        """

        _domain: str = PrivateAttr("Storage")
        storageKey: str
        """
        Storage key.
        """
        storageTypes: str
        """
        Comma separated list of StorageType to clear.
        """

    class getCookies(ICommand):
        """
        Returns all browser cookies.
        """

        _domain: str = PrivateAttr("Storage")
        browserContextId: Optional["types.Browser.TypeBrowserContextID"] = None
        """
        Browser context to use when called on the browser endpoint.
        """

    class setCookies(ICommand):
        """
        Sets given cookies.
        """

        _domain: str = PrivateAttr("Storage")
        cookies: list[Any]
        """
        Cookies to be set.
        """
        browserContextId: Optional["types.Browser.TypeBrowserContextID"] = None
        """
        Browser context to use when called on the browser endpoint.
        """

    class clearCookies(ICommand):
        """
        Clears cookies.
        """

        _domain: str = PrivateAttr("Storage")
        browserContextId: Optional["types.Browser.TypeBrowserContextID"] = None
        """
        Browser context to use when called on the browser endpoint.
        """

    class getUsageAndQuota(ICommand):
        """
        Returns usage and quota in bytes.
        """

        _domain: str = PrivateAttr("Storage")
        origin: str
        """
        Security origin.
        """

    class overrideQuotaForOrigin(ICommand):
        """
        Override quota for the specified origin
        """

        _domain: str = PrivateAttr("Storage")
        origin: str
        """
        Security origin.
        """
        quotaSize: Optional[Union[float, int]] = None
        """
        The quota size (in bytes) to override the original quota with.
If this is called multiple times, the overridden quota will be equal to
the quotaSize provided in the final call. If this is called without
specifying a quotaSize, the quota will be reset to the default value for
the specified origin. If this is called multiple times with different
origins, the override will be maintained for each origin until it is
disabled (called without a quotaSize).
        """

    class trackCacheStorageForOrigin(ICommand):
        """
        Registers origin to be notified when an update occurs to its cache storage list.
        """

        _domain: str = PrivateAttr("Storage")
        origin: str
        """
        Security origin.
        """

    class trackCacheStorageForStorageKey(ICommand):
        """
        Registers storage key to be notified when an update occurs to its cache storage list.
        """

        _domain: str = PrivateAttr("Storage")
        storageKey: str
        """
        Storage key.
        """

    class trackIndexedDBForOrigin(ICommand):
        """
        Registers origin to be notified when an update occurs to its IndexedDB.
        """

        _domain: str = PrivateAttr("Storage")
        origin: str
        """
        Security origin.
        """

    class trackIndexedDBForStorageKey(ICommand):
        """
        Registers storage key to be notified when an update occurs to its IndexedDB.
        """

        _domain: str = PrivateAttr("Storage")
        storageKey: str
        """
        Storage key.
        """

    class untrackCacheStorageForOrigin(ICommand):
        """
        Unregisters origin from receiving notifications for cache storage.
        """

        _domain: str = PrivateAttr("Storage")
        origin: str
        """
        Security origin.
        """

    class untrackCacheStorageForStorageKey(ICommand):
        """
        Unregisters storage key from receiving notifications for cache storage.
        """

        _domain: str = PrivateAttr("Storage")
        storageKey: str
        """
        Storage key.
        """

    class untrackIndexedDBForOrigin(ICommand):
        """
        Unregisters origin from receiving notifications for IndexedDB.
        """

        _domain: str = PrivateAttr("Storage")
        origin: str
        """
        Security origin.
        """

    class untrackIndexedDBForStorageKey(ICommand):
        """
        Unregisters storage key from receiving notifications for IndexedDB.
        """

        _domain: str = PrivateAttr("Storage")
        storageKey: str
        """
        Storage key.
        """

    class getTrustTokens(ICommand):
        """
                Returns the number of stored Trust Tokens per issuer for the
        current browsing context.
        """

        _domain: str = PrivateAttr("Storage")

    class clearTrustTokens(ICommand):
        """
                Removes all Trust Tokens issued by the provided issuerOrigin.
        Leaves other stored data, including the issuer's Redemption Records, intact.
        """

        _domain: str = PrivateAttr("Storage")
        issuerOrigin: str

    class getInterestGroupDetails(ICommand):
        """
        Gets details for a named interest group.
        """

        _domain: str = PrivateAttr("Storage")
        ownerOrigin: str
        name: str

    class setInterestGroupTracking(ICommand):
        """
        Enables/Disables issuing of interestGroupAccessed events.
        """

        _domain: str = PrivateAttr("Storage")
        enable: bool

    class setInterestGroupAuctionTracking(ICommand):
        """
                Enables/Disables issuing of interestGroupAuctionEventOccurred and
        interestGroupAuctionNetworkRequestCreated.
        """

        _domain: str = PrivateAttr("Storage")
        enable: bool

    class getSharedStorageMetadata(ICommand):
        """
        Gets metadata for an origin's shared storage.
        """

        _domain: str = PrivateAttr("Storage")
        ownerOrigin: str

    class getSharedStorageEntries(ICommand):
        """
        Gets the entries in an given origin's shared storage.
        """

        _domain: str = PrivateAttr("Storage")
        ownerOrigin: str

    class setSharedStorageEntry(ICommand):
        """
        Sets entry with `key` and `value` for a given origin's shared storage.
        """

        _domain: str = PrivateAttr("Storage")
        ownerOrigin: str
        key: str
        value: str
        ignoreIfPresent: Optional[bool] = None
        """
        If `ignoreIfPresent` is included and true, then only sets the entry if
`key` doesn't already exist.
        """

    class deleteSharedStorageEntry(ICommand):
        """
        Deletes entry for `key` (if it exists) for a given origin's shared storage.
        """

        _domain: str = PrivateAttr("Storage")
        ownerOrigin: str
        key: str

    class clearSharedStorageEntries(ICommand):
        """
        Clears all entries for a given origin's shared storage.
        """

        _domain: str = PrivateAttr("Storage")
        ownerOrigin: str

    class resetSharedStorageBudget(ICommand):
        """
        Resets the budget for `ownerOrigin` by clearing all budget withdrawals.
        """

        _domain: str = PrivateAttr("Storage")
        ownerOrigin: str

    class setSharedStorageTracking(ICommand):
        """
        Enables/disables issuing of sharedStorageAccessed events.
        """

        _domain: str = PrivateAttr("Storage")
        enable: bool

    class setStorageBucketTracking(ICommand):
        """
        Set tracking for a storage key's buckets.
        """

        _domain: str = PrivateAttr("Storage")
        storageKey: str
        enable: bool

    class deleteStorageBucket(ICommand):
        """
        Deletes the Storage Bucket with the given storage key and bucket name.
        """

        _domain: str = PrivateAttr("Storage")
        bucket: "types.Storage.TypeStorageBucket"

    class runBounceTrackingMitigations(ICommand):
        """
        Deletes state for sites identified as potential bounce trackers, immediately.
        """

        _domain: str = PrivateAttr("Storage")

    class setAttributionReportingLocalTestingMode(ICommand):
        """
        https://wicg.github.io/attribution-reporting-api/
        """

        _domain: str = PrivateAttr("Storage")
        enabled: bool
        """
        If enabled, noise is suppressed and reports are sent immediately.
        """

    class setAttributionReportingTracking(ICommand):
        """
        Enables/disables issuing of Attribution Reporting events.
        """

        _domain: str = PrivateAttr("Storage")
        enable: bool

    class sendPendingAttributionReports(ICommand):
        """
                Sends all pending Attribution Reports immediately, regardless of their
        scheduled report time.
        """

        _domain: str = PrivateAttr("Storage")

    class getRelatedWebsiteSets(ICommand):
        """
                Returns the effective Related Website Sets in use by this profile for the browser
        session. The effective Related Website Sets will not change during a browser session.
        """

        _domain: str = PrivateAttr("Storage")


class SystemInfo:
    """
    The SystemInfo domain defines methods and events for querying low-level system information.
    """

    class getInfo(ICommand):
        """
        Returns information about the system.
        """

        _domain: str = PrivateAttr("SystemInfo")

    class getFeatureState(ICommand):
        """
        Returns information about the feature state.
        """

        _domain: str = PrivateAttr("SystemInfo")
        featureState: str

    class getProcessInfo(ICommand):
        """
        Returns information about all running processes.
        """

        _domain: str = PrivateAttr("SystemInfo")


class Target:
    """
    Supports additional targets discovery and allows to attach to them.
    """

    class activateTarget(ICommand):
        """
        Activates (focuses) the target.
        """

        _domain: str = PrivateAttr("Target")
        targetId: "types.Target.TypeTargetID"

    class attachToTarget(ICommand):
        """
        Attaches to the target with given id.
        """

        _domain: str = PrivateAttr("Target")
        targetId: "types.Target.TypeTargetID"
        flatten: Optional[bool] = None
        """
        Enables "flat" access to the session via specifying sessionId attribute in the commands.
We plan to make this the default, deprecate non-flattened mode,
and eventually retire it. See crbug.com/991325.
        """

    class attachToBrowserTarget(ICommand):
        """
        Attaches to the browser target, only uses flat sessionId mode.
        """

        _domain: str = PrivateAttr("Target")

    class closeTarget(ICommand):
        """
        Closes the target. If the target is a page that gets closed too.
        """

        _domain: str = PrivateAttr("Target")
        targetId: "types.Target.TypeTargetID"

    class exposeDevToolsProtocol(ICommand):
        """
                Inject object to the target's main frame that provides a communication
        channel with browser target.

        Injected object will be available as `window[bindingName]`.

        The object has the following API:
        - `binding.send(json)` - a method to send messages over the remote debugging protocol
        - `binding.onmessage = json => handleMessage(json)` - a callback that will be called for the protocol notifications and command responses.
        """

        _domain: str = PrivateAttr("Target")
        targetId: "types.Target.TypeTargetID"
        bindingName: Optional[str] = None
        """
        Binding name, 'cdp' if not specified.
        """

    class createBrowserContext(ICommand):
        """
                Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than
        one.
        """

        _domain: str = PrivateAttr("Target")
        disposeOnDetach: Optional[bool] = None
        """
        If specified, disposes this context when debugging session disconnects.
        """
        proxyServer: Optional[str] = None
        """
        Proxy server, similar to the one passed to --proxy-server
        """
        proxyBypassList: Optional[str] = None
        """
        Proxy bypass list, similar to the one passed to --proxy-bypass-list
        """
        originsWithUniversalNetworkAccess: Optional[list[Any]] = None
        """
        An optional list of origins to grant unlimited cross-origin access to.
Parts of the URL other than those constituting origin are ignored.
        """

    class getBrowserContexts(ICommand):
        """
        Returns all browser contexts created with `Target.createBrowserContext` method.
        """

        _domain: str = PrivateAttr("Target")

    class createTarget(ICommand):
        """
        Creates a new page.
        """

        _domain: str = PrivateAttr("Target")
        url: str
        """
        The initial URL the page will be navigated to. An empty string indicates about:blank.
        """
        width: Optional[Union[float, int]] = None
        """
        Frame width in DIP (headless chrome only).
        """
        height: Optional[Union[float, int]] = None
        """
        Frame height in DIP (headless chrome only).
        """
        browserContextId: Optional["types.Browser.TypeBrowserContextID"] = None
        """
        The browser context to create the page in.
        """
        enableBeginFrameControl: Optional[bool] = None
        """
        Whether BeginFrames for this target will be controlled via DevTools (headless chrome only,
not supported on MacOS yet, false by default).
        """
        newWindow: Optional[bool] = None
        """
        Whether to create a new Window or Tab (chrome-only, false by default).
        """
        background: Optional[bool] = None
        """
        Whether to create the target in background or foreground (chrome-only,
false by default).
        """
        forTab: Optional[bool] = None
        """
        Whether to create the target of type "tab".
        """

    class detachFromTarget(ICommand):
        """
        Detaches session with given id.
        """

        _domain: str = PrivateAttr("Target")
        sessionId: Optional["types.Target.TypeSessionID"] = None
        """
        Session to detach.
        """
        targetId: Optional["types.Target.TypeTargetID"] = None
        """
        Deprecated.
        """

    class disposeBrowserContext(ICommand):
        """
                Deletes a BrowserContext. All the belonging pages will be closed without calling their
        beforeunload hooks.
        """

        _domain: str = PrivateAttr("Target")
        browserContextId: "types.Browser.TypeBrowserContextID"

    class getTargetInfo(ICommand):
        """
        Returns information about a target.
        """

        _domain: str = PrivateAttr("Target")
        targetId: Optional["types.Target.TypeTargetID"] = None

    class getTargets(ICommand):
        """
        Retrieves a list of available targets.
        """

        _domain: str = PrivateAttr("Target")
        filter: Optional["types.Target.TypeTargetFilter"] = None
        """
        Only targets matching filter will be reported. If filter is not specified
and target discovery is currently enabled, a filter used for target discovery
is used for consistency.
        """

    class sendMessageToTarget(ICommand):
        """
                Sends protocol message over session with given id.
        Consider using flat mode instead; see commands attachToTarget, setAutoAttach,
        and crbug.com/991325.
        """

        _domain: str = PrivateAttr("Target")
        message: str
        sessionId: Optional["types.Target.TypeSessionID"] = None
        """
        Identifier of the session.
        """
        targetId: Optional["types.Target.TypeTargetID"] = None
        """
        Deprecated.
        """

    class setAutoAttach(ICommand):
        """
                Controls whether to automatically attach to new targets which are considered to be related to
        this one. When turned on, attaches to all existing related targets as well. When turned off,
        automatically detaches from all currently attached targets.
        This also clears all targets added by `autoAttachRelated` from the list of targets to watch
        for creation of related targets.
        """

        _domain: str = PrivateAttr("Target")
        autoAttach: bool
        """
        Whether to auto-attach to related targets.
        """
        waitForDebuggerOnStart: bool
        """
        Whether to pause new targets when attaching to them. Use `Runtime.runIfWaitingForDebugger`
to run paused targets.
        """
        flatten: Optional[bool] = None
        """
        Enables "flat" access to the session via specifying sessionId attribute in the commands.
We plan to make this the default, deprecate non-flattened mode,
and eventually retire it. See crbug.com/991325.
        """
        filter: Optional["types.Target.TypeTargetFilter"] = None
        """
        Only targets matching filter will be attached.
        """

    class autoAttachRelated(ICommand):
        """
                Adds the specified target to the list of targets that will be monitored for any related target
        creation (such as child frames, child workers and new versions of service worker) and reported
        through `attachedToTarget`. The specified target is also auto-attached.
        This cancels the effect of any previous `setAutoAttach` and is also cancelled by subsequent
        `setAutoAttach`. Only available at the Browser target.
        """

        _domain: str = PrivateAttr("Target")
        targetId: "types.Target.TypeTargetID"
        waitForDebuggerOnStart: bool
        """
        Whether to pause new targets when attaching to them. Use `Runtime.runIfWaitingForDebugger`
to run paused targets.
        """
        filter: Optional["types.Target.TypeTargetFilter"] = None
        """
        Only targets matching filter will be attached.
        """

    class setDiscoverTargets(ICommand):
        """
                Controls whether to discover available targets and notify via
        `targetCreated/targetInfoChanged/targetDestroyed` events.
        """

        _domain: str = PrivateAttr("Target")
        discover: bool
        """
        Whether to discover available targets.
        """
        filter: Optional["types.Target.TypeTargetFilter"] = None
        """
        Only targets matching filter will be attached. If `discover` is false,
`filter` must be omitted or empty.
        """

    class setRemoteLocations(ICommand):
        """
                Enables target discovery for the specified locations, when `setDiscoverTargets` was set to
        `true`.
        """

        _domain: str = PrivateAttr("Target")
        locations: list[Any]
        """
        List of remote locations.
        """


class Tethering:
    """
    The Tethering domain defines methods and events for browser port binding.
    """

    class bind(ICommand):
        """
        Request browser port binding.
        """

        _domain: str = PrivateAttr("Tethering")
        port: Union[float, int]
        """
        Port number to bind.
        """

    class unbind(ICommand):
        """
        Request browser port unbinding.
        """

        _domain: str = PrivateAttr("Tethering")
        port: Union[float, int]
        """
        Port number to unbind.
        """


class Tracing:
    class end(ICommand):
        """
        Stop trace events collection.
        """

        _domain: str = PrivateAttr("Tracing")

    class getCategories(ICommand):
        """
        Gets supported tracing categories.
        """

        _domain: str = PrivateAttr("Tracing")

    class recordClockSyncMarker(ICommand):
        """
        Record a clock sync marker in the trace.
        """

        _domain: str = PrivateAttr("Tracing")
        syncId: str
        """
        The ID of this clock sync marker
        """

    class requestMemoryDump(ICommand):
        """
        Request a global memory dump.
        """

        _domain: str = PrivateAttr("Tracing")
        deterministic: Optional[bool] = None
        """
        Enables more deterministic results by forcing garbage collection
        """
        levelOfDetail: Optional["types.Tracing.TypeMemoryDumpLevelOfDetail"] = None
        """
        Specifies level of details in memory dump. Defaults to "detailed".
        """

    class start(ICommand):
        """
        Start trace events collection.
        """

        _domain: str = PrivateAttr("Tracing")
        categories: Optional[str] = None
        """
        Category/tag filter
        """
        options: Optional[str] = None
        """
        Tracing options
        """
        bufferUsageReportingInterval: Optional[Union[float, int]] = None
        """
        If set, the agent will issue bufferUsage events at this interval, specified in milliseconds
        """
        transferMode: Optional[Literal["ReportEvents", "ReturnAsStream"]] = None
        """
        Whether to report trace events as series of dataCollected events or to save trace to a
stream (defaults to `ReportEvents`).
        """
        streamFormat: Optional["types.Tracing.TypeStreamFormat"] = None
        """
        Trace data format to use. This only applies when using `ReturnAsStream`
transfer mode (defaults to `json`).
        """
        streamCompression: Optional["types.Tracing.TypeStreamCompression"] = None
        """
        Compression format to use. This only applies when using `ReturnAsStream`
transfer mode (defaults to `none`)
        """
        traceConfig: Optional["types.Tracing.TypeTraceConfig"] = None
        perfettoConfig: Optional[str] = None
        """
        Base64-encoded serialized perfetto.protos.TraceConfig protobuf message
When specified, the parameters `categories`, `options`, `traceConfig`
are ignored. (Encoded as a base64 string when passed over JSON)
        """
        tracingBackend: Optional["types.Tracing.TypeTracingBackend"] = None
        """
        Backend type (defaults to `auto`)
        """


class Fetch:
    """
    A domain for letting clients substitute browser's network layer with client code.
    """

    class disable(ICommand):
        """
        Disables the fetch domain.
        """

        _domain: str = PrivateAttr("Fetch")

    class enable(ICommand):
        """
                Enables issuing of requestPaused events. A request will be paused until client
        calls one of failRequest, fulfillRequest or continueRequest/continueWithAuth.
        """

        _domain: str = PrivateAttr("Fetch")
        patterns: Optional[list[Any]] = None
        """
        If specified, only requests matching any of these patterns will produce
fetchRequested event and will be paused until clients response. If not set,
all requests will be affected.
        """
        handleAuthRequests: Optional[bool] = None
        """
        If true, authRequired events will be issued and requests will be paused
expecting a call to continueWithAuth.
        """

    class failRequest(ICommand):
        """
        Causes the request to fail with specified reason.
        """

        _domain: str = PrivateAttr("Fetch")
        requestId: "types.Fetch.TypeRequestId"
        """
        An id the client received in requestPaused event.
        """
        errorReason: "types.Network.TypeErrorReason"
        """
        Causes the request to fail with the given reason.
        """

    class fulfillRequest(ICommand):
        """
        Provides response to the request.
        """

        _domain: str = PrivateAttr("Fetch")
        requestId: "types.Fetch.TypeRequestId"
        """
        An id the client received in requestPaused event.
        """
        responseCode: Union[float, int]
        """
        An HTTP response code.
        """
        responseHeaders: Optional[list[Any]] = None
        """
        Response headers.
        """
        binaryResponseHeaders: Optional[str] = None
        """
        Alternative way of specifying response headers as a \0-separated
series of name: value pairs. Prefer the above method unless you
need to represent some non-UTF8 values that can't be transmitted
over the protocol as text. (Encoded as a base64 string when passed over JSON)
        """
        body: Optional[str] = None
        """
        A response body. If absent, original response body will be used if
the request is intercepted at the response stage and empty body
will be used if the request is intercepted at the request stage. (Encoded as a base64 string when passed over JSON)
        """
        responsePhrase: Optional[str] = None
        """
        A textual representation of responseCode.
If absent, a standard phrase matching responseCode is used.
        """

    class continueRequest(ICommand):
        """
        Continues the request, optionally modifying some of its parameters.
        """

        _domain: str = PrivateAttr("Fetch")
        requestId: "types.Fetch.TypeRequestId"
        """
        An id the client received in requestPaused event.
        """
        url: Optional[str] = None
        """
        If set, the request url will be modified in a way that's not observable by page.
        """
        method: Optional[str] = None
        """
        If set, the request method is overridden.
        """
        postData: Optional[str] = None
        """
        If set, overrides the post data in the request. (Encoded as a base64 string when passed over JSON)
        """
        headers: Optional[list[Any]] = None
        """
        If set, overrides the request headers. Note that the overrides do not
extend to subsequent redirect hops, if a redirect happens. Another override
may be applied to a different request produced by a redirect.
        """
        interceptResponse: Optional[bool] = None
        """
        If set, overrides response interception behavior for this request.
        """

    class continueWithAuth(ICommand):
        """
        Continues a request supplying authChallengeResponse following authRequired event.
        """

        _domain: str = PrivateAttr("Fetch")
        requestId: "types.Fetch.TypeRequestId"
        """
        An id the client received in authRequired event.
        """
        authChallengeResponse: "types.Fetch.TypeAuthChallengeResponse"
        """
        Response to  with an authChallenge.
        """

    class continueResponse(ICommand):
        """
                Continues loading of the paused response, optionally modifying the
        response headers. If either responseCode or headers are modified, all of them
        must be present.
        """

        _domain: str = PrivateAttr("Fetch")
        requestId: "types.Fetch.TypeRequestId"
        """
        An id the client received in requestPaused event.
        """
        responseCode: Optional[Union[float, int]] = None
        """
        An HTTP response code. If absent, original response code will be used.
        """
        responsePhrase: Optional[str] = None
        """
        A textual representation of responseCode.
If absent, a standard phrase matching responseCode is used.
        """
        responseHeaders: Optional[list[Any]] = None
        """
        Response headers. If absent, original response headers will be used.
        """
        binaryResponseHeaders: Optional[str] = None
        """
        Alternative way of specifying response headers as a \0-separated
series of name: value pairs. Prefer the above method unless you
need to represent some non-UTF8 values that can't be transmitted
over the protocol as text. (Encoded as a base64 string when passed over JSON)
        """

    class getResponseBody(ICommand):
        """
                Causes the body of the response to be received from the server and
        returned as a single string. May only be issued for a request that
        is paused in the Response stage and is mutually exclusive with
        takeResponseBodyForInterceptionAsStream. Calling other methods that
        affect the request or disabling fetch domain before body is received
        results in an undefined behavior.
        Note that the response body is not available for redirects. Requests
        paused in the _redirect received_ state may be differentiated by
        `responseCode` and presence of `location` response header, see
        comments to `requestPaused` for details.
        """

        _domain: str = PrivateAttr("Fetch")
        requestId: "types.Fetch.TypeRequestId"
        """
        Identifier for the intercepted request to get body for.
        """

    class takeResponseBodyAsStream(ICommand):
        """
                Returns a handle to the stream representing the response body.
        The request must be paused in the HeadersReceived stage.
        Note that after this command the request can't be continued
        as is -- client either needs to cancel it or to provide the
        response body.
        The stream only supports sequential read, IO.read will fail if the position
        is specified.
        This method is mutually exclusive with getResponseBody.
        Calling other methods that affect the request or disabling fetch
        domain before body is received results in an undefined behavior.
        """

        _domain: str = PrivateAttr("Fetch")
        requestId: "types.Fetch.TypeRequestId"


class WebAudio:
    """
        This domain allows inspection of Web Audio API.
    https://webaudio.github.io/web-audio-api/
    """

    class enable(ICommand):
        """
        Enables the WebAudio domain and starts sending context lifetime events.
        """

        _domain: str = PrivateAttr("WebAudio")

    class disable(ICommand):
        """
        Disables the WebAudio domain.
        """

        _domain: str = PrivateAttr("WebAudio")

    class getRealtimeData(ICommand):
        """
        Fetch the realtime data from the registered contexts.
        """

        _domain: str = PrivateAttr("WebAudio")
        contextId: "types.WebAudio.TypeGraphObjectId"


class WebAuthn:
    """
        This domain allows configuring virtual authenticators to test the WebAuthn
    API.
    """

    class enable(ICommand):
        """
                Enable the WebAuthn domain and start intercepting credential storage and
        retrieval with a virtual authenticator.
        """

        _domain: str = PrivateAttr("WebAuthn")
        enableUI: Optional[bool] = None
        """
        Whether to enable the WebAuthn user interface. Enabling the UI is
recommended for debugging and demo purposes, as it is closer to the real
experience. Disabling the UI is recommended for automated testing.
Supported at the embedder's discretion if UI is available.
Defaults to false.
        """

    class disable(ICommand):
        """
        Disable the WebAuthn domain.
        """

        _domain: str = PrivateAttr("WebAuthn")

    class addVirtualAuthenticator(ICommand):
        """
        Creates and adds a virtual authenticator.
        """

        _domain: str = PrivateAttr("WebAuthn")
        options: "types.WebAuthn.TypeVirtualAuthenticatorOptions"

    class setResponseOverrideBits(ICommand):
        """
        Resets parameters isBogusSignature, isBadUV, isBadUP to false if they are not present.
        """

        _domain: str = PrivateAttr("WebAuthn")
        authenticatorId: "types.WebAuthn.TypeAuthenticatorId"
        isBogusSignature: Optional[bool] = None
        """
        If isBogusSignature is set, overrides the signature in the authenticator response to be zero.
Defaults to false.
        """
        isBadUV: Optional[bool] = None
        """
        If isBadUV is set, overrides the UV bit in the flags in the authenticator response to
be zero. Defaults to false.
        """
        isBadUP: Optional[bool] = None
        """
        If isBadUP is set, overrides the UP bit in the flags in the authenticator response to
be zero. Defaults to false.
        """

    class removeVirtualAuthenticator(ICommand):
        """
        Removes the given authenticator.
        """

        _domain: str = PrivateAttr("WebAuthn")
        authenticatorId: "types.WebAuthn.TypeAuthenticatorId"

    class addCredential(ICommand):
        """
        Adds the credential to the specified authenticator.
        """

        _domain: str = PrivateAttr("WebAuthn")
        authenticatorId: "types.WebAuthn.TypeAuthenticatorId"
        credential: "types.WebAuthn.TypeCredential"

    class getCredential(ICommand):
        """
                Returns a single credential stored in the given virtual authenticator that
        matches the credential ID.
        """

        _domain: str = PrivateAttr("WebAuthn")
        authenticatorId: "types.WebAuthn.TypeAuthenticatorId"
        credentialId: str

    class getCredentials(ICommand):
        """
        Returns all the credentials stored in the given virtual authenticator.
        """

        _domain: str = PrivateAttr("WebAuthn")
        authenticatorId: "types.WebAuthn.TypeAuthenticatorId"

    class removeCredential(ICommand):
        """
        Removes a credential from the authenticator.
        """

        _domain: str = PrivateAttr("WebAuthn")
        authenticatorId: "types.WebAuthn.TypeAuthenticatorId"
        credentialId: str

    class clearCredentials(ICommand):
        """
        Clears all the credentials from the specified device.
        """

        _domain: str = PrivateAttr("WebAuthn")
        authenticatorId: "types.WebAuthn.TypeAuthenticatorId"

    class setUserVerified(ICommand):
        """
                Sets whether User Verification succeeds or fails for an authenticator.
        The default is true.
        """

        _domain: str = PrivateAttr("WebAuthn")
        authenticatorId: "types.WebAuthn.TypeAuthenticatorId"
        isUserVerified: bool

    class setAutomaticPresenceSimulation(ICommand):
        """
                Sets whether tests of user presence will succeed immediately (if true) or fail to resolve (if false) for an authenticator.
        The default is true.
        """

        _domain: str = PrivateAttr("WebAuthn")
        authenticatorId: "types.WebAuthn.TypeAuthenticatorId"
        enabled: bool

    class setCredentialProperties(ICommand):
        """
                Allows setting credential properties.
        https://w3c.github.io/webauthn/#sctn-automation-set-credential-properties
        """

        _domain: str = PrivateAttr("WebAuthn")
        authenticatorId: "types.WebAuthn.TypeAuthenticatorId"
        credentialId: str
        backupEligibility: Optional[bool] = None
        backupState: Optional[bool] = None


class Media:
    """
    This domain allows detailed inspection of media elements
    """

    class enable(ICommand):
        """
        Enables the Media domain
        """

        _domain: str = PrivateAttr("Media")

    class disable(ICommand):
        """
        Disables the Media domain.
        """

        _domain: str = PrivateAttr("Media")


class DeviceAccess:
    class enable(ICommand):
        """
        Enable events in this domain.
        """

        _domain: str = PrivateAttr("DeviceAccess")

    class disable(ICommand):
        """
        Disable events in this domain.
        """

        _domain: str = PrivateAttr("DeviceAccess")

    class selectPrompt(ICommand):
        """
        Select a device in response to a DeviceAccess.deviceRequestPrompted event.
        """

        _domain: str = PrivateAttr("DeviceAccess")
        id: "types.DeviceAccess.TypeRequestId"
        deviceId: "types.DeviceAccess.TypeDeviceId"

    class cancelPrompt(ICommand):
        """
        Cancel a prompt in response to a DeviceAccess.deviceRequestPrompted event.
        """

        _domain: str = PrivateAttr("DeviceAccess")
        id: "types.DeviceAccess.TypeRequestId"


class Preload:
    class enable(ICommand):
        _domain: str = PrivateAttr("Preload")

    class disable(ICommand):
        _domain: str = PrivateAttr("Preload")


class FedCm:
    """
    This domain allows interacting with the FedCM dialog.
    """

    class enable(ICommand):
        _domain: str = PrivateAttr("FedCm")
        disableRejectionDelay: Optional[bool] = None
        """
        Allows callers to disable the promise rejection delay that would
normally happen, if this is unimportant to what's being tested.
(step 4 of https://fedidcg.github.io/FedCM/#browser-api-rp-sign-in)
        """

    class disable(ICommand):
        _domain: str = PrivateAttr("FedCm")

    class selectAccount(ICommand):
        _domain: str = PrivateAttr("FedCm")
        dialogId: str
        accountIndex: Union[float, int]

    class clickDialogButton(ICommand):
        _domain: str = PrivateAttr("FedCm")
        dialogId: str
        dialogButton: "types.FedCm.TypeDialogButton"

    class openUrl(ICommand):
        _domain: str = PrivateAttr("FedCm")
        dialogId: str
        accountIndex: Union[float, int]
        accountUrlType: "types.FedCm.TypeAccountUrlType"

    class dismissDialog(ICommand):
        _domain: str = PrivateAttr("FedCm")
        dialogId: str
        triggerCooldown: Optional[bool] = None

    class resetCooldown(ICommand):
        """
                Resets the cooldown time, if any, to allow the next FedCM call to show
        a dialog even if one was recently dismissed by the user.
        """

        _domain: str = PrivateAttr("FedCm")


class PWA:
    """
    This domain allows interacting with the browser to control PWAs.
    """

    class getOsAppState(ICommand):
        """
        Returns the following OS state for the given manifest id.
        """

        _domain: str = PrivateAttr("PWA")
        manifestId: str
        """
        The id from the webapp's manifest file, commonly it's the url of the
site installing the webapp. See
https://web.dev/learn/pwa/web-app-manifest.
        """

    class install(ICommand):
        """
                Installs the given manifest identity, optionally using the given install_url
        or IWA bundle location.

        TODO(crbug.com/337872319) Support IWA to meet the following specific
        requirement.
        IWA-specific install description: If the manifest_id is isolated-app://,
        install_url_or_bundle_url is required, and can be either an http(s) URL or
        file:// URL pointing to a signed web bundle (.swbn). The .swbn file's
        signing key must correspond to manifest_id. If Chrome is not in IWA dev
        mode, the installation will fail, regardless of the state of the allowlist.
        """

        _domain: str = PrivateAttr("PWA")
        manifestId: str
        installUrlOrBundleUrl: Optional[str] = None
        """
        The location of the app or bundle overriding the one derived from the
manifestId.
        """

    class uninstall(ICommand):
        """
        Uninstals the given manifest_id and closes any opened app windows.
        """

        _domain: str = PrivateAttr("PWA")
        manifestId: str

    class launch(ICommand):
        """
                Launches the installed web app, or an url in the same web app instead of the
        default start url if it is provided. Returns a page Target.TargetID which
        can be used to attach to via Target.attachToTarget or similar APIs.
        """

        _domain: str = PrivateAttr("PWA")
        manifestId: str
        url: Optional[str] = None

    class launchFilesInApp(ICommand):
        """
                Opens one or more local files from an installed web app identified by its
        manifestId. The web app needs to have file handlers registered to process
        the files. The API returns one or more page Target.TargetIDs which can be
        used to attach to via Target.attachToTarget or similar APIs.
        If some files in the parameters cannot be handled by the web app, they will
        be ignored. If none of the files can be handled, this API returns an error.
        If no files provided as the parameter, this API also returns an error.

        According to the definition of the file handlers in the manifest file, one
        Target.TargetID may represent a page handling one or more files. The order
        of the returned Target.TargetIDs is not guaranteed.

        TODO(crbug.com/339454034): Check the existences of the input files.
        """

        _domain: str = PrivateAttr("PWA")
        manifestId: str
        files: list[Any]

    class openCurrentPageInApp(ICommand):
        """
                Opens the current page in its web app identified by the manifest id, needs
        to be called on a page target. This function returns immediately without
        waiting for the app finishing loading.
        """

        _domain: str = PrivateAttr("PWA")
        manifestId: str
