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

A domain for interacting with Cast, Presentation API, and Remote Playback API
functionalities.
https://chromedevtools.github.io/devtools-protocol/tot/Cast/

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

from cdpkit.protocol.base import CDPMethod, InputModel


class EnableInput(InputModel):

    presentationUrl: str | None = None


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

    INPUT_VALIDATOR = EnableInput
    OUTPUT_VALIDATOR = None

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


class Disable(CDPMethod[None]):
    """ Stops observing for sinks and issues. """

    INPUT_VALIDATOR = None
    OUTPUT_VALIDATOR = None


class SetSinkToUseInput(InputModel):

    sinkName: str


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

    INPUT_VALIDATOR = SetSinkToUseInput
    OUTPUT_VALIDATOR = None

    def __init__(
        self,
        *,
        sink_name: str
    ):
        super().__init__(
            sinkName=sink_name
        )


class StartDesktopMirroringInput(InputModel):

    sinkName: str


class StartDesktopMirroring(CDPMethod[None]):
    """ Starts mirroring the desktop to the sink. """

    INPUT_VALIDATOR = StartDesktopMirroringInput
    OUTPUT_VALIDATOR = None

    def __init__(
        self,
        *,
        sink_name: str
    ):
        super().__init__(
            sinkName=sink_name
        )


class StartTabMirroringInput(InputModel):

    sinkName: str


class StartTabMirroring(CDPMethod[None]):
    """ Starts mirroring the tab to the sink. """

    INPUT_VALIDATOR = StartTabMirroringInput
    OUTPUT_VALIDATOR = None

    def __init__(
        self,
        *,
        sink_name: str
    ):
        super().__init__(
            sinkName=sink_name
        )


class StopCastingInput(InputModel):

    sinkName: str


class StopCasting(CDPMethod[None]):
    """ Stops the active Cast session on the sink. """

    INPUT_VALIDATOR = StopCastingInput
    OUTPUT_VALIDATOR = None

    def __init__(
        self,
        *,
        sink_name: str
    ):
        super().__init__(
            sinkName=sink_name
        )
