# This file is auto-generated by the CDP protocol generator.
# Do not edit this file manually as your changes will be overwritten.
# Generated from Chrome DevTools Protocol specifications.

"""CDP EventBreakpoints Domain Library"""

from typing import Any, Dict, Optional, cast

from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from ...client import CDPClient
    from .commands import RemoveInstrumentationBreakpointParameters
    from .commands import SetInstrumentationBreakpointParameters


class EventBreakpointsClient:
    """Client for EventBreakpoints domain commands."""

    def __init__(self, client: "CDPClient"):
        self._client = client

    async def setInstrumentationBreakpoint(
        self,
        params: "SetInstrumentationBreakpointParameters",
        session_id: Optional[str] = None,
    ) -> "Dict[str, Any]":
        """Sets breakpoint on particular native event."""
        return cast(
            "Dict[str, Any]",
            await self._client.send_raw(
                method="EventBreakpoints.setInstrumentationBreakpoint",
                params=params,
                session_id=session_id,
            ),
        )

    async def removeInstrumentationBreakpoint(
        self,
        params: "RemoveInstrumentationBreakpointParameters",
        session_id: Optional[str] = None,
    ) -> "Dict[str, Any]":
        """Removes breakpoint on particular native event."""
        return cast(
            "Dict[str, Any]",
            await self._client.send_raw(
                method="EventBreakpoints.removeInstrumentationBreakpoint",
                params=params,
                session_id=session_id,
            ),
        )

    async def disable(
        self,
        params: None = None,
        session_id: Optional[str] = None,
    ) -> "Dict[str, Any]":
        """Removes all breakpoints"""
        return cast(
            "Dict[str, Any]",
            await self._client.send_raw(
                method="EventBreakpoints.disable",
                params=params,
                session_id=session_id,
            ),
        )
