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

This domain provides various functionality related to drawing atop the inspected page.
https://chromedevtools.github.io/devtools-protocol/tot/Overlay/

***************************************************
                    Methods
***************************************************
"""
from __future__ import annotations

from cdpkit.protocol._types import (
    DOM,
    Overlay,
    Page,
    Runtime,
)
from cdpkit.protocol.base import JSON_DICT, CDPMethod, InputModel, OutputModel


class Disable(CDPMethod[None]):  # deprecated
    """ Disables domain notifications. """

    INPUT_VALIDATOR = None
    OUTPUT_VALIDATOR = None


class Enable(CDPMethod[None]):  # deprecated
    """ Enables domain notifications. """

    INPUT_VALIDATOR = None
    OUTPUT_VALIDATOR = None


class GetHighlightObjectForTestInput(InputModel):

    nodeId: DOM.NodeId  # deprecated
    includeDistance: bool | None = None  # deprecated
    includeStyle: bool | None = None  # deprecated
    colorFormat: Overlay.ColorFormat | None = None  # deprecated
    showAccessibilityInfo: bool | None = None  # deprecated


class GetHighlightObjectForTestOutput(OutputModel):

    highlight: JSON_DICT  # deprecated


class GetHighlightObjectForTest(CDPMethod[GetHighlightObjectForTestOutput]):  # deprecated
    """ For testing. """

    INPUT_VALIDATOR = GetHighlightObjectForTestInput
    OUTPUT_VALIDATOR = GetHighlightObjectForTestOutput

    def __init__(
        self,
        *,
        node_id: DOM.NodeId,
        include_distance: bool | None = None,
        include_style: bool | None = None,
        color_format: Overlay.ColorFormat | None = None,
        show_accessibility_info: bool | None = None
    ):
        super().__init__(
            nodeId=node_id,
            includeDistance=include_distance,
            includeStyle=include_style,
            colorFormat=color_format,
            showAccessibilityInfo=show_accessibility_info
        )


class GetGridHighlightObjectsForTestInput(InputModel):

    nodeIds: list[DOM.NodeId]  # deprecated


class GetGridHighlightObjectsForTestOutput(OutputModel):

    highlights: JSON_DICT  # deprecated


class GetGridHighlightObjectsForTest(CDPMethod[GetGridHighlightObjectsForTestOutput]):  # deprecated
    """ For Persistent Grid testing. """

    INPUT_VALIDATOR = GetGridHighlightObjectsForTestInput
    OUTPUT_VALIDATOR = GetGridHighlightObjectsForTestOutput

    def __init__(
        self,
        *,
        node_ids: list[DOM.NodeId]
    ):
        super().__init__(
            nodeIds=node_ids
        )


class GetSourceOrderHighlightObjectForTestInput(InputModel):

    nodeId: DOM.NodeId  # deprecated


class GetSourceOrderHighlightObjectForTestOutput(OutputModel):

    highlight: JSON_DICT  # deprecated


class GetSourceOrderHighlightObjectForTest(CDPMethod[GetSourceOrderHighlightObjectForTestOutput]):  # deprecated
    """ For Source Order Viewer testing. """

    INPUT_VALIDATOR = GetSourceOrderHighlightObjectForTestInput
    OUTPUT_VALIDATOR = GetSourceOrderHighlightObjectForTestOutput

    def __init__(
        self,
        *,
        node_id: DOM.NodeId
    ):
        super().__init__(
            nodeId=node_id
        )


class HideHighlight(CDPMethod[None]):  # deprecated
    """ Hides any highlight. """

    INPUT_VALIDATOR = None
    OUTPUT_VALIDATOR = None


class HighlightFrameInput(InputModel):

    frameId: Page.FrameId  # deprecated
    contentColor: DOM.RGBA | None = None  # deprecated
    contentOutlineColor: DOM.RGBA | None = None  # deprecated


class HighlightFrame(CDPMethod[None]):  # deprecated
    """ 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. """

    INPUT_VALIDATOR = HighlightFrameInput
    OUTPUT_VALIDATOR = None

    def __init__(
        self,
        *,
        frame_id: Page.FrameId,
        content_color: DOM.RGBA | None = None,
        content_outline_color: DOM.RGBA | None = None
    ):
        super().__init__(
            frameId=frame_id,
            contentColor=content_color,
            contentOutlineColor=content_outline_color
        )


class HighlightNodeInput(InputModel):

    highlightConfig: Overlay.HighlightConfig  # deprecated
    nodeId: DOM.NodeId | None = None  # deprecated
    backendNodeId: DOM.BackendNodeId | None = None  # deprecated
    objectId: Runtime.RemoteObjectId | None = None  # deprecated
    selector: str | None = None  # deprecated


class HighlightNode(CDPMethod[None]):  # deprecated
    """ Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or
    objectId must be specified. """

    INPUT_VALIDATOR = HighlightNodeInput
    OUTPUT_VALIDATOR = None

    def __init__(
        self,
        *,
        highlight_config: Overlay.HighlightConfig,
        node_id: DOM.NodeId | None = None,
        backend_node_id: DOM.BackendNodeId | None = None,
        object_id: Runtime.RemoteObjectId | None = None,
        selector: str | None = None
    ):
        super().__init__(
            highlightConfig=highlight_config,
            nodeId=node_id,
            backendNodeId=backend_node_id,
            objectId=object_id,
            selector=selector
        )


class HighlightQuadInput(InputModel):

    quad: DOM.Quad  # deprecated
    color: DOM.RGBA | None = None  # deprecated
    outlineColor: DOM.RGBA | None = None  # deprecated


class HighlightQuad(CDPMethod[None]):  # deprecated
    """ Highlights given quad. Coordinates are absolute with respect to the main frame viewport. """

    INPUT_VALIDATOR = HighlightQuadInput
    OUTPUT_VALIDATOR = None

    def __init__(
        self,
        *,
        quad: DOM.Quad,
        color: DOM.RGBA | None = None,
        outline_color: DOM.RGBA | None = None
    ):
        super().__init__(
            quad=quad,
            color=color,
            outlineColor=outline_color
        )


class HighlightRectInput(InputModel):

    x: int  # deprecated
    y: int  # deprecated
    width: int  # deprecated
    height: int  # deprecated
    color: DOM.RGBA | None = None  # deprecated
    outlineColor: DOM.RGBA | None = None  # deprecated


class HighlightRect(CDPMethod[None]):  # deprecated
    """ Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport. """

    INPUT_VALIDATOR = HighlightRectInput
    OUTPUT_VALIDATOR = None

    def __init__(
        self,
        *,
        x: int,
        y: int,
        width: int,
        height: int,
        color: DOM.RGBA | None = None,
        outline_color: DOM.RGBA | None = None
    ):
        super().__init__(
            x=x,
            y=y,
            width=width,
            height=height,
            color=color,
            outlineColor=outline_color
        )


class HighlightSourceOrderInput(InputModel):

    sourceOrderConfig: Overlay.SourceOrderConfig  # deprecated
    nodeId: DOM.NodeId | None = None  # deprecated
    backendNodeId: DOM.BackendNodeId | None = None  # deprecated
    objectId: Runtime.RemoteObjectId | None = None  # deprecated


class HighlightSourceOrder(CDPMethod[None]):  # deprecated
    """ 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. """

    INPUT_VALIDATOR = HighlightSourceOrderInput
    OUTPUT_VALIDATOR = None

    def __init__(
        self,
        *,
        source_order_config: Overlay.SourceOrderConfig,
        node_id: DOM.NodeId | None = None,
        backend_node_id: DOM.BackendNodeId | None = None,
        object_id: Runtime.RemoteObjectId | None = None
    ):
        super().__init__(
            sourceOrderConfig=source_order_config,
            nodeId=node_id,
            backendNodeId=backend_node_id,
            objectId=object_id
        )


class SetInspectModeInput(InputModel):

    mode: Overlay.InspectMode  # deprecated
    highlightConfig: Overlay.HighlightConfig | None = None  # deprecated


class SetInspectMode(CDPMethod[None]):  # deprecated
    """ Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted.
    Backend then generates 'inspectNodeRequested' event upon element selection. """

    INPUT_VALIDATOR = SetInspectModeInput
    OUTPUT_VALIDATOR = None

    def __init__(
        self,
        *,
        mode: Overlay.InspectMode,
        highlight_config: Overlay.HighlightConfig | None = None
    ):
        super().__init__(
            mode=mode,
            highlightConfig=highlight_config
        )


class SetShowAdHighlightsInput(InputModel):

    show: bool  # deprecated


class SetShowAdHighlights(CDPMethod[None]):  # deprecated
    """ Highlights owner element of all frames detected to be ads. """

    INPUT_VALIDATOR = SetShowAdHighlightsInput
    OUTPUT_VALIDATOR = None

    def __init__(
        self,
        *,
        show: bool
    ):
        super().__init__(
            show=show
        )


class SetPausedInDebuggerMessageInput(InputModel):

    message: str | None = None  # deprecated


class SetPausedInDebuggerMessage(CDPMethod[None]):

    INPUT_VALIDATOR = SetPausedInDebuggerMessageInput
    OUTPUT_VALIDATOR = None

    def __init__(
        self,
        *,
        message: str | None = None
    ):
        super().__init__(
            message=message
        )


class SetShowDebugBordersInput(InputModel):

    show: bool  # deprecated


class SetShowDebugBorders(CDPMethod[None]):  # deprecated
    """ Requests that backend shows debug borders on layers """

    INPUT_VALIDATOR = SetShowDebugBordersInput
    OUTPUT_VALIDATOR = None

    def __init__(
        self,
        *,
        show: bool
    ):
        super().__init__(
            show=show
        )


class SetShowFPSCounterInput(InputModel):

    show: bool  # deprecated


class SetShowFPSCounter(CDPMethod[None]):  # deprecated
    """ Requests that backend shows the FPS counter """

    INPUT_VALIDATOR = SetShowFPSCounterInput
    OUTPUT_VALIDATOR = None

    def __init__(
        self,
        *,
        show: bool
    ):
        super().__init__(
            show=show
        )


class SetShowGridOverlaysInput(InputModel):

    gridNodeHighlightConfigs: list[Overlay.GridNodeHighlightConfig]  # deprecated


class SetShowGridOverlays(CDPMethod[None]):  # deprecated
    """ Highlight multiple elements with the CSS Grid overlay. """

    INPUT_VALIDATOR = SetShowGridOverlaysInput
    OUTPUT_VALIDATOR = None

    def __init__(
        self,
        *,
        grid_node_highlight_configs: list[Overlay.GridNodeHighlightConfig]
    ):
        super().__init__(
            gridNodeHighlightConfigs=grid_node_highlight_configs
        )


class SetShowFlexOverlaysInput(InputModel):

    flexNodeHighlightConfigs: list[Overlay.FlexNodeHighlightConfig]  # deprecated


class SetShowFlexOverlays(CDPMethod[None]):

    INPUT_VALIDATOR = SetShowFlexOverlaysInput
    OUTPUT_VALIDATOR = None

    def __init__(
        self,
        *,
        flex_node_highlight_configs: list[Overlay.FlexNodeHighlightConfig]
    ):
        super().__init__(
            flexNodeHighlightConfigs=flex_node_highlight_configs
        )


class SetShowScrollSnapOverlaysInput(InputModel):

    scrollSnapHighlightConfigs: list[Overlay.ScrollSnapHighlightConfig]  # deprecated


class SetShowScrollSnapOverlays(CDPMethod[None]):

    INPUT_VALIDATOR = SetShowScrollSnapOverlaysInput
    OUTPUT_VALIDATOR = None

    def __init__(
        self,
        *,
        scroll_snap_highlight_configs: list[Overlay.ScrollSnapHighlightConfig]
    ):
        super().__init__(
            scrollSnapHighlightConfigs=scroll_snap_highlight_configs
        )


class SetShowContainerQueryOverlaysInput(InputModel):

    containerQueryHighlightConfigs: list[Overlay.ContainerQueryHighlightConfig]  # deprecated


class SetShowContainerQueryOverlays(CDPMethod[None]):

    INPUT_VALIDATOR = SetShowContainerQueryOverlaysInput
    OUTPUT_VALIDATOR = None

    def __init__(
        self,
        *,
        container_query_highlight_configs: list[Overlay.ContainerQueryHighlightConfig]
    ):
        super().__init__(
            containerQueryHighlightConfigs=container_query_highlight_configs
        )


class SetShowPaintRectsInput(InputModel):

    result: bool  # deprecated


class SetShowPaintRects(CDPMethod[None]):  # deprecated
    """ Requests that backend shows paint rectangles """

    INPUT_VALIDATOR = SetShowPaintRectsInput
    OUTPUT_VALIDATOR = None

    def __init__(
        self,
        *,
        result: bool
    ):
        super().__init__(
            result=result
        )


class SetShowLayoutShiftRegionsInput(InputModel):

    result: bool  # deprecated


class SetShowLayoutShiftRegions(CDPMethod[None]):  # deprecated
    """ Requests that backend shows layout shift regions """

    INPUT_VALIDATOR = SetShowLayoutShiftRegionsInput
    OUTPUT_VALIDATOR = None

    def __init__(
        self,
        *,
        result: bool
    ):
        super().__init__(
            result=result
        )


class SetShowScrollBottleneckRectsInput(InputModel):

    show: bool  # deprecated


class SetShowScrollBottleneckRects(CDPMethod[None]):  # deprecated
    """ Requests that backend shows scroll bottleneck rects """

    INPUT_VALIDATOR = SetShowScrollBottleneckRectsInput
    OUTPUT_VALIDATOR = None

    def __init__(
        self,
        *,
        show: bool
    ):
        super().__init__(
            show=show
        )


class SetShowHitTestBordersInput(InputModel):

    show: bool  # deprecated


class SetShowHitTestBorders(CDPMethod[None]):  # deprecated
    """ Deprecated, no longer has any effect. """

    INPUT_VALIDATOR = SetShowHitTestBordersInput
    OUTPUT_VALIDATOR = None

    def __init__(
        self,
        *,
        show: bool
    ):
        super().__init__(
            show=show
        )


class SetShowWebVitalsInput(InputModel):

    show: bool


class SetShowWebVitals(CDPMethod[None]):  # deprecated
    """ Deprecated, no longer has any effect. """

    INPUT_VALIDATOR = SetShowWebVitalsInput
    OUTPUT_VALIDATOR = None

    def __init__(
        self,
        *,
        show: bool
    ):
        super().__init__(
            show=show
        )


class SetShowViewportSizeOnResizeInput(InputModel):

    show: bool  # deprecated


class SetShowViewportSizeOnResize(CDPMethod[None]):  # deprecated
    """ Paints viewport size upon main frame resize. """

    INPUT_VALIDATOR = SetShowViewportSizeOnResizeInput
    OUTPUT_VALIDATOR = None

    def __init__(
        self,
        *,
        show: bool
    ):
        super().__init__(
            show=show
        )


class SetShowHingeInput(InputModel):

    hingeConfig: Overlay.HingeConfig | None = None  # deprecated


class SetShowHinge(CDPMethod[None]):  # deprecated
    """ Add a dual screen device hinge """

    INPUT_VALIDATOR = SetShowHingeInput
    OUTPUT_VALIDATOR = None

    def __init__(
        self,
        *,
        hinge_config: Overlay.HingeConfig | None = None
    ):
        super().__init__(
            hingeConfig=hinge_config
        )


class SetShowIsolatedElementsInput(InputModel):

    isolatedElementHighlightConfigs: list[Overlay.IsolatedElementHighlightConfig]  # deprecated


class SetShowIsolatedElements(CDPMethod[None]):  # deprecated
    """ Show elements in isolation mode with overlays. """

    INPUT_VALIDATOR = SetShowIsolatedElementsInput
    OUTPUT_VALIDATOR = None

    def __init__(
        self,
        *,
        isolated_element_highlight_configs: list[Overlay.IsolatedElementHighlightConfig]
    ):
        super().__init__(
            isolatedElementHighlightConfigs=isolated_element_highlight_configs
        )


class SetShowWindowControlsOverlayInput(InputModel):

    windowControlsOverlayConfig: Overlay.WindowControlsOverlayConfig | None = None  # deprecated


class SetShowWindowControlsOverlay(CDPMethod[None]):  # deprecated
    """ Show Window Controls Overlay for PWA """

    INPUT_VALIDATOR = SetShowWindowControlsOverlayInput
    OUTPUT_VALIDATOR = None

    def __init__(
        self,
        *,
        window_controls_overlay_config: Overlay.WindowControlsOverlayConfig | None = None
    ):
        super().__init__(
            windowControlsOverlayConfig=window_controls_overlay_config
        )
